2008-10-28 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
2
3         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
4         found in the TYPESPEC table.
5
6 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
7
8         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
9         too.
10
11         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
12
13         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
14         instead of the RVA, since the RVA can be changed by tools like the cil 
15         stripper.
16
17         * method-to-ir.c (mono_method_to_ir2): Ditto.
18
19         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
20         (deserialize_variable): Ditto.
21
22 2008-10-25  Martin Baulig  <martin@ximian.com>
23
24         * debug-mini.c (write_variable): Use
25         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
26
27 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
28
29         * cpu-x86.md: Add unsigned variants of packd and packw.
30
31         * mini-ops.h: Same.
32
33         * mini-x86.h: Emit the right instruction for packd and packw.
34         Add unsigned variants of packd and packw.
35
36         * simd-intrinsics.c: Packd and packw were used in place of their
37         unsigned variants. Change that.
38         Add intrinsics for (Signed)PackWithSignedSaturation.
39
40         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
41
42 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
43
44         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
45
46 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
47
48         * mini-ops.h: Remove dword packed add/sub with saturation ops.
49
50         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
51
52         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
53         sse instructions.
54
55         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
56
57 2008-10-24  Mark Probst  <mark.probst@gmail.com>
58
59         * method-to-ir.c, mini.c: Special casing for the synchronized
60         wrapper for the ldtoken+GetTypeFromHandle case.
61
62 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
63
64         * mini.c (mono_replace_ins): Move this to branch-opts.c.
65
66         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
67         created/split bblocks.
68
69 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
70
71         * mini-ops.h: Add packed signed mul high.
72         
73         * cpu-x86.md: Same.
74
75         * mini-x86.c (mono_arch_output_basic_block): Same.
76
77         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
78
79         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
80
81 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
82
83         * basic-simd.cs: Tests for Vector16sb.
84
85 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
86
87         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
88
89 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
90
91         * mini-ops.h: Add packed signed min, max and compare greater.
92         
93         * cpu-x86.md: Same.
94
95         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
96         saturation.
97
98         * simd-methods.h: Add CompareGreaterThan.
99
100         * simd-methods.h: Remove CompareEquals.
101
102         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
103
104         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
105
106         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
107         CompareEqual.
108
109 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
110
111         * basic-simd.cs: Fix tests due to change in the API.
112
113 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
114
115         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
116
117 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
118
119         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
120
121         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
122         inst_offset as this has invalid values for LDADDR.
123
124 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
125
126         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
127
128         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
129
130 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
131
132         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
133         for accessing field->data.
134
135 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
136
137         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
138
139 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
140
141         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
142
143         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
144
145 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
146
147         * dominators.c (mono_compute_natural_loops): Allocate GList enties
148         from the cfg mempool.
149
150 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
151
152         * basic-simd.cs: Tests for new methods in Vector8us.
153
154 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
155
156         * mini-ops.h: Add multiply and store high.
157         
158         * cpu-x86.md: Same.
159
160         * mini-x86.c (mono_arch_output_basic_block): Same.
161
162         * simd-methods.h: Same.
163
164         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
165         and CompareEqual.
166
167 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
168
169         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
170         mono_class_setup_vtable ().
171
172         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
173         mono_class_get_vtable_entry () for accessing klass->vtable.
174
175         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
176
177         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
178         found.
179
180         * method-to-ir.c (mono_save_token_info): Don't save references made from
181         wrappers.
182
183         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
184         of generic instances.
185
186         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
187
188 2008-10-19  Mark Probst  <mark.probst@gmail.com>
189
190         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
191         OP_JMP depends on the method signature.  Calculate it properly.
192
193 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
194         
195         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
196         called directly.
197
198         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
199         instances.
200         (emit_extra_methods): Add another table mapping method indexes to 
201         offsets in the extra_method_info table.
202
203         * mini.h: Bump AOT file format version.
204         
205         * aot-runtime.c: Merge most of the code from mono_aot_get_method
206         and mono_aot_get_method_from_token () into one function.
207
208 2008-10-19  Mark Probst  <mark.probst@gmail.com>
209
210         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
211         separate counter.
212
213 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
214
215         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
216         methods.
217
218         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
219         disable_aot.
220
221         * mini.c (mono_patch_info_equal): Compare the generic context as well.
222
223         * mini.h: Bump aot file format version.
224
225         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
226         AOT file can contain native code for methods which are not in the METHOD
227         table. Generate code for non-sharable generic instances of generic methods
228         found in the METHODSPEC table.
229         
230         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
231         encoding generic type handles.
232
233         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
234         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
235
236         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
237         macros + MONO_ADD_INS.
238
239         * mini.c (mono_jump_info_token_new2): New function which takes a generic
240         context as well.
241
242         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
243
244         * mini.h: Bump aot file format version.
245
246         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
247
248 2008-10-17  Mark Probst  <mark.probst@gmail.com>
249
250         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
251         platforms, with definable stack alignment value.  Set to 16 now
252         for all platforms.
253
254         * mini.c, mini.h, driver.c: Command line option for disabling
255         stack alignment.
256
257 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
258
259         * basic-simd.cs: Tests for new methods in Vector4ui.
260
261 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
262
263         * mini-ops.h: Add packed int shuffle.
264         
265         * cpu-x86.md: Same.
266
267         * mini-x86.c (mono_arch_output_basic_block): Same.
268
269         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
270         extract mask, max, min, shuffle.
271
272         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
273
274 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
275
276         * basic-simd.cs: Tests for new methods in Vector8us.
277
278 2008-10-17  Mark Probst  <mark.probst@gmail.com>
279
280         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
281         RuntimeTypeHandle, not a TypedReference.
282
283 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
284
285         * simd-intrinsics.c: remove relocations.
286
287 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
288
289         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
290         optimizations from the x86 backend.
291
292 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
293
294         * simd-methods.h, simd-intrinsics.c: debloat method names and
295         prepare for no relocations.
296
297 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
298
299         * mini-ops.h: Add packed min/equal and sum of absolute differences.
300         
301         * cpu-x86.md: Same.
302
303         * mini-x86.c (mono_arch_output_basic_block): Same.
304
305         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
306         extract mask, max, min and sum of absolute differences.
307
308         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
309         method name.
310
311 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
312
313         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
314         Renamed one test for consistency.
315
316 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
317
318         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
319         fix to the code that deal with other blocks.
320
321 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
322
323         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
324
325 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
326
327         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
328         that deals with vreg interference. Explicitly check for OP_LDADDR to be
329         able to process the source reg.
330
331 2008-10-16  Martin Baulig  <martin@ximian.com>
332
333         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
334
335         * inssel.brg: Add `OP_HARD_NOP'.
336
337         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
338
339         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
340         `OP_HARD_NOP' instruction when running inside the debugger.
341
342         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
343         `OP_HARD_NOP' instruction when running inside the debugger.
344
345 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
346
347         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
348         now works. The issue with the regalloc tripping up no longer
349         happens.
350
351         * simd-intrinsics.c (load_simd_vreg): Same.
352
353 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
354         
355         * basic-simd.cs: Tests for new Vector8ui methods.
356
357 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
358
359         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
360         only for type. This fixes crashes where MonoInst::klass is checked
361         for ops of type != VTYPE or OBJ.
362
363         * simd-intrinsics.c (load_simd_vreg): Same.
364
365 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
366
367         * mini-ops.h: Add ops for packed shuffle/max/avg and
368         extract mask.
369         
370         * cpu-x86.md: Same.
371
372         * mini-x86.c (mono_arch_output_basic_block): Same.
373
374         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
375         extract mask.
376
377         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
378         to emit extract mask op.
379
380         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
381         to emit word shuffles.
382
383 2008-10-15  Mark Probst  <mark.probst@gmail.com>
384
385         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
386         the largest alignment needed by a variable, but at least
387         sizeof(gpointer).
388
389 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
390
391         * basic-simd.cs: Tests for the fixes in the last commit.
392
393 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
394
395         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
396         no longer handles STACK_PTR input.
397
398         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
399
400         * simd-intrinsics.c (load_simd_vreg): New function that works like 
401         get_simd_vreg   but handles STACK_PTR input.
402
403         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
404         as the input can be an arbitrary pointer.
405
406         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
407         LDADDR local optimization directly otherwise use a store op.
408
409 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
410
411         * basic-simd.cs: Tests for dup low and dup high.
412
413 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
414
415         * mini-ops.h: Add dup low and dup high ops.
416         
417         * cpu-x86.md: Same.
418
419         * mini-x86.c (mono_arch_output_basic_block): Same.
420
421         * simd-intrinsics.c (vector4f_intrinsics): Same.
422
423 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
424
425         * basic-simd.cs: Tests for recently added functionality.
426
427 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
428
429         * mini-ops.h: Add remaining sse1 fp ops.
430         
431         * cpu-x86.md: Add remaining sse1 fp ops.
432
433         * mini-x86.c (mono_arch_output_basic_block): Same.
434
435         * mini.h: Add enum for simd FP compare conditions.
436
437         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
438
439         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
440         so the backed can generate the appropriate op.
441
442 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
443         This patch squeese one more byte from the SimdIntrinsc struct.
444
445         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
446         a a shift amount intead of simply or'ing it.
447
448         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
449
450         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
451         byte so we can have an aditional flags field without increasing struct size.
452
453         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
454         against the simd_supported_versions bitmask.
455
456         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
457
458 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
459
460         * mini.c: remove rawbuffer code (the only use here is unsafe because
461         it takes locks during signal handling and the kernel now provides much
462         better info in proc/pid/smaps these days).
463
464 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
465
466         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
467         OP_X86_PUSH_OBJ. Fixes #434620.
468
469         * objects.cs: Add a test.
470         
471 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
472
473         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
474         that the packuswb/packusdw don't work with unsigned numbers for what
475         would be negative numbers in signed format.
476
477         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
478         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
479
480         * mini-ops.h: Add doubleword forms of many ops and packing ones.
481
482         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
483
484         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
485
486         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
487
488         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
489         add more ops.
490
491         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
492         version as the enum in mini.h.
493
494         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
495         for sse3 ops, check the simd_version field if present. This way the code
496         works with all versions of sse.
497
498 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
499
500         * simd-intrinsics.c: Fixed intrinsic name typo.
501
502         * mini.h: Added missing simd exported function.
503
504         * basic-simd.cs: Added tests for Vector4ui.
505         Fixed broken test for Vector16b.
506
507 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
508
509         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
510         the max length to 64.
511
512 2008-10-10  Mark Probst  <mark.probst@gmail.com>
513
514         * method-to-ir.c: Only do the fast virtual generic method call for
515         non-wrapper methods.
516
517         * mini.h, mini-trampolines.c: The new generic virtual remoting
518         trampoline handles virtual method calls via the vtable (as done by
519         the fast virtual generic method calls) to remoting proxies.
520
521         * mini.c (mono_jit_create_remoting_trampoline): For generic
522         methods reate a generic virtual remoting trampoline.
523
524         * mini-amd64.h: Enable fast virtual generic method calls again.
525
526 2008-10-10  Mark Probst  <mark.probst@gmail.com>
527
528         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
529         restore registers when doing tail calls.
530
531 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
532
533         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
534         Vector4ui.
535
536 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
537
538         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
539
540 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
541
542         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
543
544 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
545
546         * basic-simd.cs: Retrofit for API changes.
547
548 2008-10-10  Mark Probst  <mark.probst@gmail.com>
549
550         * mini-ppc.c: Handle integer stack arguments for tail calls.
551
552 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
553
554         * optflags-def.h: Removed sse3 optimization.
555
556         * driver.c: Same.
557
558         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
559         sse3.
560
561         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
562
563         * mini.h: Added enumeration with simd versions.
564
565         * simd-intrinsics.c (emit_intrinsics): Use the new static var
566         for detecting SSE3.
567
568         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
569
570         * mini.c (mini_init): Call mono_simd_intrinsics_init.
571
572 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
573
574         * basic-simd.cs: Added tests for Vector8u and Vector16u.
575
576         * basic-simd.cs: Fixed test naming.
577
578 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
579
580         * mini-ops.h: Added ops for packed and saturated math, shifts
581         and packing/unpacking.
582
583         * cpu-x86.md: Added descriptors for the above ops.
584
585         * mini-x86.c: Added code to emmit the above ops.
586
587         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
588
589 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
590
591         * aot-compiler.c (compile_method): Enable AOT for generic code.
592
593         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
594
595 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
596
597         * mini.c: add a workaround for a common screwup that ends up blamed
598         to mono (other processes blocking signal delivery).
599
600 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
601
602         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
603         in the LDFLD/STFLD opcodes. Fixes #432673.
604
605         * iltests.il.in: Add a new test.
606
607 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
608
609         * mini-arm.c: attach the thread in unmanaged->managed transitions
610         using delegates (bug #433148).
611
612 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
613
614        * basic-simd.cs: Use new ShuffleSel constants.
615
616 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
617
618         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
619
620         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
621         only disable simd intrinsics if no sse2 is detected.
622
623         * optflags-def.h: Added sse3.
624
625         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
626         is disabled.
627
628 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
629
630         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
631         when adding delegate-invoke wrappers.
632
633 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
634
635         * Makefile.am: Reenable the simd tests.
636
637 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
638
639         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
640           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
641           other vreg is allocated to that hreg.
642
643         Contributed under MIT/X11 license.
644
645 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
646
647         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
648         yet checked in.
649
650 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
651
652         * basic-simd.cs: New test suite for SIMD intrinsics.
653
654         * Makefile.am: Added new tests.
655
656 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
657
658         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
659
660         * mini-ops.h: Same.
661
662         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
663
664         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
665         using SSE2 aware opcodes.
666
667         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
668         is enabled, this code path is only reachable if conversion ops are emmited after
669         mono_method_to_ir.
670
671         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
672
673         This optimization saves 6 bytes per conversion against the old version.
674
675 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
676
677         * aot-compiler.c (compile_method): Don't skip methods referencing 
678         generic methods without a corresponding entry in token_info_hash, since
679         encode_method_ref () can handle all generic methods now.
680
681         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
682         generic context is set.
683         
684         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
685         generic sharing of LDTOKEN.
686
687 2008-10-06  Mark Probst  <mark.probst@gmail.com>
688
689         * mini-amd64.h: Temporarily disabled fast virtual generic method
690         calls because it breaks the System.Runtime.Remoting tests.
691
692 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
693
694         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
695
696         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
697         so inlining actually works.
698         (check_inline_caller_method_name_limit): Ditto.
699
700 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
701
702         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
703         64 bit safety (from Olaf Hering and Andreas Färber).
704
705 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
706         
707         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
708         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
709         unused virtual call support code.
710
711         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
712         
713         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
714         which can't use aot trampolines.
715         (decode_patch): Don't create aot trampolines for methods which can't use
716         them.
717
718         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
719         use aot trampolines.
720
721         * mini.h: Bump AOT image format version.
722         
723 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
724
725         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
726         to save_token_info () since cmethod is inflated for constrained calls.
727
728         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
729
730 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
731
732         * Makefile.am: Add build rules for ppc64.
733         This avoids the build failing at pedump with unresolved symbols
734         due to lack of arch_sources. Instead it will now fail earlier
735         due to lack of cpu-ppc64.md.
736
737         Contributed under MIT/X11 license.
738
739 2008-10-04  Mark Probst  <mark.probst@gmail.com>
740
741         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
742         tail calls.
743
744         * iltests.il.in: Add test case for tail call with many arguments.
745
746 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
747
748         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
749         to the fast virtual generic method code until the aot case is fixed.
750
751 2008-10-03  Mark Probst  <mark.probst@gmail.com>
752
753         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
754
755 2008-10-03  Mark Probst  <mark.probst@gmail.com>
756
757         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
758         thunks.
759
760 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
761         
762         * simd-intrinsics.c: Forgot to add this one.
763
764         * mini-codegen.c: Fix macro in case SIMD is not supported.
765
766 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
767         
768         This patch land initial JIT support for simd intrinsics.
769
770         * mini-x86.h: Added new define to make --enable_minimal work on x86.
771
772         * Makefile.am: Added simd-intrinsics.c
773
774         * simd-intrinsics.c: New file with simd instrinsic related
775         code.
776
777         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
778
779         * cpu-x86.md: Add simd related instructions.
780
781         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
782
783         * driver.c: Added two new --regression variants.
784
785         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
786
787         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
788
789         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
790         extract some complicated logic to helper functions.
791
792         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
793
794         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
795
796         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
797         the specialized simplification pass.
798
799         * method-to-ir.c (mono_spill_global_vars): Use new macro.
800
801         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
802
803         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
804         table.
805
806         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
807         if MONO_ARCH_NEED_SIMD_BANK is defined.
808
809         * mini-ops.h: Added the new simd ops.
810
811         * mini-x86.c: Added mono_arch_xregname.
812
813         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
814
815         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
816
817         * mini-x86.h: Define simd related MONO_ARCH macros.
818
819         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
820
821         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
822
823         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
824         MONO_CLASS_IS_SIMD to deal with simd related IR.
825
826         * mini.h (MonoInst): Added spill_var to the backend union.
827
828         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
829
830         * mini.h: Added forward declarations of the new simd fuctions.
831
832         * optflags-def.h: Added new optimization names SIMD.
833
834         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
835
836         * regalloc.h: Added support for working with 3 register banks.
837
838         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
839
840         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
841
842 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
843
844         * mini-exceptions.c: remove 64 bit related ifdef clutter.
845
846 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
847
848         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
849         instead of one on 64 bit systems.
850
851         * method-to-ir.c: Remove unused includes.
852
853 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
854
855         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
856         cfg->used_int_regs, since the two are different on arm.
857
858 2008-10-02  Mark Probst  <mark.probst@gmail.com>
859
860         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
861         mono_method_get_vtable_index() to get the vtable index.
862
863 2008-10-02  Mark Probst  <mark.probst@gmail.com>
864
865         * method-to-ir.c (mono_method_to_ir2): Don't create native
866         wrappers for array methods, because they're never called (and if
867         they were called they wouldn't work).
868
869 2008-10-02  Mark Probst  <mark.probst@gmail.com>
870
871         * method-to-ir.c (mono_method_to_ir2): Array methods are
872         special-cased and must not be invoked indirectly via the (M)RGCTX
873         when generic sharing is turned on.  Fixes #431413.
874
875 2008-10-01  Mark Probst  <mark.probst@gmail.com>
876
877         * method-to-ir.c: When generic sharing is active, call
878         non-interface virtual generic methods via the standard trampoline.
879
880         * mini-trampolines.c: Handle virtual generic shared methods.
881
882         * mini.h, mini-x86.c, mini-x86.h: New argument for
883         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
884         method thunks and which is the trampoline to call if the lookup
885         fails.  Enable the virtual generic method thunk for x86.
886
887         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
888         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
889         argument but assert that it's NULL, because these archs don't yet
890         implement the virtual generic method thunk.  Changes in the IMT
891         thunk data structures.
892
893 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
894
895         * aot-compiler.c (emit_globals): Avoid invalid characters in
896         the static linking symbol.
897
898         * objects.cs: Add a test for the range check optimization. Fix warnings.
899
900         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
901         optimization from the current JIT.
902
903         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
904         later in decompose_array_access_opts () to allow more optimizations.
905
906         * method-to-ir.c (mono_handle_soft_float): Rename this to 
907         mono_decompose_soft_float () for consistency.
908
909         * mini-ops.h: Fix arguments of OP_STRLEN.
910
911         * method-to-ir.c (save_cast_details): Extract the cast details saving code
912         into a separate function.
913         (reset_cast_details): Ditto.
914         (handle_unbox): Save cast details. Fixes #431254.
915
916         * method-to-ir.c: Remove some obsolete FIXMEs.
917
918 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
919
920         * ir-emit.h (alloc_dreg): Write a warning before crashing.
921
922 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
923
924         * mini-codegen.c: More work on macros to make them
925         ready for multiple regbanks.
926
927 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
928
929         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
930
931         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
932
933 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
934
935         * mini-codegen.c (mono_spillvar_offset): Proper support for
936         multiple regbanks.
937
938 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
939
940         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
941         the stack overflow changes.
942
943 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
944
945         * mini-codegen.c: Make all bank macros depend on reg_bank.
946
947         * mini-codegen.c (mono_local_regalloc): Make free mask
948         initialization regbank aware.
949
950 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
951
952         * mini-codegen.c (mono_local_regalloc): Extract callee
953         mask selection to a function and make it regbank aware.
954
955 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
956
957         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
958         code to deal with many regbanks.
959
960 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
961
962         * mini-codegen.c: More fp->regbank changes.
963
964 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
965
966         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
967         of a hardcoded constant.
968
969 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
970
971         * method-to-ir.c (type_from_stack_type): Fix typo.
972
973 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
974
975         * mini-ia64.c (emit_move_return_value): Convert float return values to
976         double.
977
978         * objects.cs: Add a new test.
979         
980         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
981         VARARG methods to fix an assert later.
982
983         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
984         end so it at least compiles.
985
986 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
987
988         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
989
990 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
991
992         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
993         optimization to a new function (emit_optimized_ldloca_ir) and enable
994         it for both ldloca and ldloca_s.
995
996 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
997
998         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
999         gshared CASTCLASS code.
1000
1001         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
1002         amd64, where the libc stack unwinder encounters stack frames referring to
1003         native code in unmapped memory.
1004
1005         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
1006         sharing.
1007
1008         * generics.cs: Add new test.
1009
1010 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
1011
1012         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
1013         add a check that one of the ARM_FPU_ constants is defined.
1014
1015         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
1016         
1017         * mini-exceptions.c: Fix build on non-altstack platforms.
1018
1019         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
1020         sharing of vtypes.
1021
1022         * ir-emit.h: Add a comment to NEW_PCONST.
1023
1024         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
1025
1026         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
1027
1028         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
1029         after the changes to MonoJitDomainInfo.
1030
1031 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1032
1033         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
1034
1035 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1036
1037         * mini-ppc.c: Compiler warning fixes.
1038
1039 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1040
1041         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
1042         for pinvokes.
1043
1044 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1045
1046         * exceptions-ppc.c, mini-ppc.h: Compile
1047         mono_arch_handle_altstack_exception() on Darwin, too.
1048
1049 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1050
1051         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
1052         work on archs which don't have generic sharing implemented, only
1053         without the vtable_arg.
1054
1055 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1056
1057         * mini.c: Added comment explaining why delegate ctor icall
1058         wrappers are compiled.
1059
1060 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1061
1062         * mini.c: Don't produce trampolines to delegate ctor icall
1063         wrappers but compile them upfront.
1064
1065 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
1066
1067         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
1068         runtime-set function when going back to managed code. Currently this
1069         is used to set back the protection on the soft ovf pages and/or to
1070         throw the stack overflow exception that happened in unmanaged code.
1071
1072 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
1073
1074         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
1075         runtime-set function when going back to managed code. Currently this
1076         is used to set back the protection on the soft ovf pages and/or to
1077         throw the stack overflow exception that happened in unmanaged code.
1078
1079 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1080
1081         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
1082         the support code for restoring stack protection after stack overflows
1083         that happen in unmanaged code. Don't set the exec permission on the
1084         soft overflow area.
1085
1086 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
1087
1088         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
1089         delegate->method_ptr is set. Fixes #428054.
1090
1091 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1092
1093         * tests.cs: Rename to ratests.cs.
1094
1095         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
1096         emit_get_rgctx_... functions.
1097
1098 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1099
1100         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
1101
1102 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1103
1104         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
1105         before asserting that method is sharable.
1106
1107 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1108
1109         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
1110         whether method needs a static RGCTX wrapper used instead of
1111         complex conditions.
1112
1113         * generic-sharing.c, mini.h: A few functions moved to
1114         metadata/generic-sharing.c.
1115
1116 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1117
1118         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
1119         Generic code sharing for value types, which essentially means
1120         treating value type methods like static methods.  The RGCTX is
1121         passed in the same way.
1122
1123 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1124
1125         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
1126         opcode when creating multi-dimensional arrays of open types.
1127
1128         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
1129         open generic types.
1130
1131         * generics.cs: Add a test.
1132
1133         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
1134
1135 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1136
1137         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
1138
1139         * mini.c (mini_method_compile): Set it when running under the debugger. 
1140
1141         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
1142         vreg optimization if the flag is set.
1143
1144         * driver.c (mono_main): Add --attach= option to pass options to
1145         the attach agent.
1146
1147         * mini.c (sigquit_signal_handler): Start the attach agent.
1148
1149         * ssapre.c: Disable this to save space since it is not yet ported to
1150         linear IR.
1151
1152         * regalloc2.c: Disable this to save space.
1153
1154         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
1155
1156 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
1157
1158         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
1159         the -v option useful again.
1160
1161 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1162
1163         * mini-amd64.c (mono_arch_output_basic_block): Add support for
1164         --break-at-bb.
1165
1166         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
1167         arrays of arrays. Fixes #428406.
1168
1169         * method-to-ir.c (mini_emit_castclass): Ditto.
1170
1171         * objects.cs: Add new test.
1172         
1173 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
1174
1175         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
1176         was wrong at it choked against target_type_is_incompatible for byref types.
1177
1178 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1179
1180         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
1181         places.
1182
1183 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
1184
1185         * mini-exceptions.c: update a few more exceptions-related counters.
1186
1187 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
1188
1189         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
1190         new functions to allocate from persistent mempools.
1191
1192 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1193
1194         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
1195         multiple register banks in the future.
1196
1197         * mini-codegen.c (mono_local_regalloc): Fix a warning.
1198
1199 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
1200
1201         * mini.c (type_to_eval_stack_type): Remove duplicated function.
1202
1203         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
1204
1205         * mini.h: Export type_to_eval_stack_type.
1206
1207         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
1208         is only ins->klass of byref types.
1209
1210 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
1211
1212         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
1213         (mini_emit_memcpy2): Ditto.
1214
1215         * mini-amd64.c: Fix a warning.
1216
1217 2008-09-21  Mark Probst  <mark.probst@gmail.com>
1218
1219         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
1220         linking.
1221
1222 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
1223
1224         * method-to-ir.c: Extract stloc micro-optimization to a
1225         function and apply it to all cases.
1226
1227 2008-09-19  Mark Probst  <mark.probst@gmail.com>
1228
1229         * method-to-ir.c: Don't fail generic code sharing in cases we
1230         already support.
1231
1232 2008-09-18  Mark Probst  <mark.probst@gmail.com>
1233
1234         * mini-ppc.c: Handle structs in tailcalls on Darwin.
1235
1236 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
1237
1238         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
1239         implementation.
1240
1241 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
1242
1243         * trace.c: make tracing more useful and correct, with per-thread
1244         id and indent info.
1245
1246 2008-09-15  Mark Probst  <mark.probst@gmail.com>
1247
1248         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
1249         doing a method call and the argument is an R4.
1250
1251 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
1252
1253         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
1254         generic methods.
1255
1256 2008-09-13  Mark Probst  <mark.probst@gmail.com>
1257
1258         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
1259
1260 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
1261
1262         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
1263         (MONO_JUMP_TABLE_FROM_INS): Ditto.
1264
1265 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
1266
1267         * driver.c: Add a --agent argument (not supported yet) to load managed
1268         agent assemblies before loading the main assembly, similarly to how the
1269         Java VM handles agents.
1270
1271 2008-09-11  Mark Probst  <mark.probst@gmail.com>
1272
1273         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
1274         function to do stack layout of local variables.
1275
1276 2008-09-11  Mark Probst  <mark.probst@gmail.com>
1277
1278         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
1279         calculation.
1280
1281 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
1282
1283         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
1284         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
1285         JIT if DISABLE_JIT is defined.
1286
1287         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
1288         defined.
1289
1290 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1291
1292         * iltests.il.in: Disable the fconv test on PPC (the result is
1293         undefined according to ECMA).
1294
1295 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1296
1297         * iltests.il.in: Enable tail call tests for PPC.
1298
1299         * mini.h: Add variable for storing incoming valuetype argument
1300         addresses for tail calls.
1301
1302         * mini-ppc.c: Implement valuetype arguments and return values for
1303         tailcalls on Linux.
1304
1305 2008-09-09  Mark Probst  <mark.probst@gmail.com>
1306
1307         * mini-ppc.c: Partially implement tail calls (struct arguments and
1308         return values not supported).
1309
1310         * method-to-ir.c: Enable tail calls on PPC.
1311
1312 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
1313
1314         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
1315         runtime-invoke wrappers to work around the problem of them getting
1316         assigned to a random class.
1317
1318         * aot-runtime.c (mono_aot_get_method): Ditto.
1319         
1320 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
1321
1322         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
1323         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
1324
1325 2008-09-07  Mark Probst  <mark.probst@gmail.com>
1326
1327         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
1328         until they're implemented properly.
1329
1330         * exceptions-ppc.c: Use arch-independent exception-handling code
1331         instead of custom one.
1332
1333         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
1334         for Linear IR.
1335
1336         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
1337
1338         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
1339         applies when __powerpc__ is defined.
1340
1341 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
1342
1343         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
1344         methods to their code to avoid computing the full name of wrappers and
1345         doing a lookup in a string hash table.
1346
1347 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1348
1349         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
1350         we identify bblocks before method_to_ir () is ran.
1351
1352         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
1353         Also avoid optimizing branches pointing to themselves.
1354
1355         * mini.c (mini_method_compile): Ditto. Fixes #422947.
1356
1357 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
1358
1359         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
1360
1361 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1362
1363         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
1364         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
1365         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
1366         'buf'.
1367
1368         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
1369         jumped to the same entry in plt_jump_table.
1370
1371 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
1372
1373         * method-to-ir.c (initialize_array_data): Handle field with RVA from
1374         dynamic images.
1375
1376 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
1377
1378         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
1379         other assignment can be if converted. Saves 1.5% on corlib size and fixes
1380         #421807.
1381
1382 2008-08-29  Geoff Norton  <gnorton@novell.com>
1383
1384         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
1385         segment, and doesn't properly handle .space as .text.  Fixes
1386         AOT Mach/ARM
1387
1388 2008-08-29  Geoff Norton  <gnorton@novell.com>
1389
1390         * mini.c: Disable the mach exception handler when running on 
1391         ARM
1392
1393 2008-08-29  Geoff Norton  <gnorton@novell.com>
1394
1395         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
1396         globals on Darwin/ARM
1397
1398 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
1399
1400         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
1401         since too many things depend on it. Instead, call 
1402         mono_runtime_set_no_exec ().
1403         
1404         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
1405         the new JIT.
1406
1407         * aot-compiler.c: Add an 'asm-only' AOT option.
1408
1409         * mini.c: Avoid initializing the runtime when doing AOT compilation.
1410                 
1411         * aot-compiler.c (compile_method): Disable gshared support for now as it
1412         doesn't yet work.
1413
1414 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1415
1416         * mini-amd64.h : Fix a compiler warning.
1417
1418         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
1419           Changed to use a callback function to retrieve the unwind info.
1420           This avoids problems observed when code blocks were removed by
1421           unloading an app domain.
1422
1423         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
1424           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
1425           to work properly.
1426
1427         Contributed under MIT/X11 license.
1428
1429 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1430
1431         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
1432           case to keep the stack aligned to 8.
1433
1434         Contributed under MIT/X11 license.
1435
1436 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
1437
1438         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
1439         avoid repeated linear searches.
1440
1441 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
1442
1443         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
1444         methods it can't handle.
1445         
1446         * aot-compiler.c (add_method): Avoid adding a method twice.
1447         (add_wrappers): Add runtime invoke wrappers for all methods.
1448
1449         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
1450         function to create an aot-compatible version of this trampoline.
1451
1452         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
1453
1454 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
1455
1456         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
1457
1458         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
1459         with a generic sharing failure.
1460
1461         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
1462
1463         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
1464         CEE_RETHROW. Fixes #419634.
1465
1466         * mini.c (mono_method_to_ir): Ditto.
1467
1468         * exceptions.cs: Add a new test.
1469         
1470         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
1471         to mono_type_stack_size_internal () since some callers might not pass in
1472         an rgctx.
1473
1474         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
1475         instrument_prolog. Fixes #419878.
1476
1477         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
1478         doubles in soft float mode volatile.
1479
1480 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
1481
1482         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
1483
1484         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
1485         to handle soft float correctly.
1486
1487         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
1488         the fast path.
1489
1490         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
1491
1492         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
1493         to sp, since the generics catch code requires it.
1494
1495         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
1496         copying.
1497
1498         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
1499         mono_arch_emit_imt_argument ().
1500
1501         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
1502
1503         * mini-arm.c tramp-arm.c: Generic sharing updates.
1504
1505 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
1506
1507         * mini-arm.c: Fix the arm build.
1508
1509         * generic-sharing.c (mini_type_get_underlying_type): New helper function
1510         handling enums, generic instances and generic sharing.
1511         (mini_type_stack_size_full): Ditto.
1512
1513         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
1514         
1515         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
1516
1517         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
1518
1519         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
1520         trampolines.
1521
1522         * mini-arm.c: Various small generic sharing changes.
1523
1524         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
1525         this for x86.
1526         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
1527         custom code.
1528
1529         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
1530         helper function to return a generic class init trampoline.
1531
1532         * method-to-ir.c mini.c: Use it.
1533         
1534         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
1535         arch-specfic function to return a generic class init trampoline.
1536
1537         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
1538         the GENERIC_CLASS_INIT custom code.
1539
1540         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
1541         a fatal error, not a sharing failure.
1542
1543         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
1544         needed.
1545
1546         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
1547         trampoline argument from MONO_ARCH_VTABLE_REG.
1548
1549         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1550         order of the arguments to the C trampoline: pass 'slot' as the trampoline
1551         argument, and pass the vtable in VTABLE_REG.
1552
1553         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1554         order of the arguments to the C trampoline: pass 'slot' as the trampoline
1555         argument, and pass the vtable in VTABLE_REG.
1556         (mono_arch_create_trampoline_code_full): Remove some special casing for
1557         the rgctx fetch trampoline.
1558
1559         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
1560         Fixes #419273.
1561
1562         * iltests.il: Add a test for it.
1563
1564 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
1565
1566         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
1567
1568         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
1569         no longer needed.
1570
1571         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
1572         use mono_jit_info_table_find () to avoid recursion.
1573         (mono_delegate_trampoline): Add a sync wrapper here.
1574
1575         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
1576         here.
1577
1578         * mini.c (mono_method_to_ir): Ditto.
1579         
1580         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
1581         add_sync_wrapper argument. Don't add a sync wrapper here.
1582         (mono_create_jump_trampoline): Don't add a sync wrapper here.
1583
1584         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
1585         
1586 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1587
1588         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
1589           of nonvolatile registers back from MonoContext to CONTEXT.
1590
1591         Contributed under MIT/X11 license.
1592
1593 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1594
1595         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
1596           arguments on Winx64 there are only 4 argument registers.  For this
1597           logic to work the last argument must be pulled from the stack.  
1598
1599         Contributed under MIT/X11 license.
1600
1601 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
1602
1603         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1604
1605         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
1606         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
1607         encode/decode_method_ref ().
1608
1609         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
1610
1611         * aot-runtime.c (decode_patch): Ditto.  
1612
1613         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
1614         MONO_PATCH_INFO_METHOD.
1615
1616         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
1617         MonoGenericJitInfo.
1618
1619         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
1620         MonoGenericJitInfo.
1621
1622         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
1623
1624         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
1625         one from the caller.
1626
1627         * aot-runtime.c (decode_generic_inst): New function to decode and
1628         return a interned generic inst.
1629         (decode_klass_ref): Use it.
1630         (decode_method_ref): Ditto.
1631
1632         * aot-compiler.c (emit_exception_debug_info): Save 
1633         jinfo->has_generic_jit_info too.
1634
1635 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
1636
1637         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
1638
1639         * iltests.il.in: Add a test for fconv_to_i.
1640
1641         * liveness.c: Disable the liveness2 pass for now to save space.
1642
1643         * regalloc2.c: Include mempool-internals.h to fix warnings.
1644
1645         * aot-compiler.c (encode_method_ref): Encode the context of generic
1646         instance methods.
1647
1648         * aot-runtime.c (decode_method_ref): Inflate generic methods using
1649         the context saved in the aot file.
1650
1651         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1652
1653         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
1654
1655         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
1656         volatile so they won't be optimized away.
1657
1658 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
1659
1660         * ssa.c:
1661         * ssa2.c:
1662         * mini.c:
1663         * regalloc2.c:
1664         * dominators.c: Remove duplicated functions that now are in
1665         mempool-internals.h.
1666
1667 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
1668
1669         * aot-compiler.c: Fix warnings.
1670
1671         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
1672
1673         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
1674
1675         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
1676         as the patch type.
1677
1678         * mini.c (mono_resolve_patch_target): Ditto.
1679         
1680         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
1681         (encode_klass_ref): Add support for encoding VARs/MVARs.
1682
1683         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
1684
1685         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
1686         the handling of the got entries into a separate 'decode_got_entry' function.
1687         Add support for RGCTX_FETCH.
1688
1689         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
1690         clobbered by the trampoline code.
1691
1692         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
1693         not clobbered by the indirect calling code.
1694
1695 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1696
1697         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
1698         to fix the build.
1699
1700 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
1701
1702         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
1703         signature using the compilation mempool otherwise we would leak it.
1704
1705 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1706
1707         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
1708         mono_emit_abs_call ().
1709
1710         * patch-info.h: Add GENERIC_CLASS_INIT.
1711
1712         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
1713
1714         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
1715         as their target as a near call.
1716
1717         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
1718         ABS handling code.
1719         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
1720
1721         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
1722         call to a runtime function described by a patch.
1723
1724         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
1725         mono_emit_abs_call, this has the advantage that the ABS handling code in
1726         mono_codegen () can handle them both, and can handle other stuff in the
1727         future without additional code.
1728
1729         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
1730         entry.
1731         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
1732         abs addresses.
1733
1734         * mini.h: Add missing bblock related prototypes.
1735
1736         * mini.h (MonoCompile): Remove unused reverse_inst_list and
1737         reverse_inst_list_len fields.
1738
1739         * mini.c: Refactor this file a bit by moving branch optimizations to 
1740         branch-opts.c.
1741
1742         * method-to-ir.c: Merge generic sharing changes missed earlier.
1743
1744         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
1745
1746         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
1747         shared patches. Process METHODCONST as a shared patch.
1748
1749         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
1750         as it crashes on the 2.0 mscorlib.
1751
1752         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
1753         to cause crashes.
1754         
1755         * aot-compiler.c: Use is_plt_patch () in a few additional places.
1756         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
1757         by IMT.
1758
1759         * aot-compiler.c: Reorganize the got handling code to be a bit more
1760         understandable.
1761
1762 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1763
1764         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
1765         mono_patch_info_equals/hash, and use it to massively simplify
1766         get_plt_index ().
1767
1768         * mini.c (mono_patch_info_hash): Simplify this and add support for
1769         more patch types.
1770
1771         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
1772
1773         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
1774         handling code, since an offset is not enough to identify a trampoline.
1775
1776         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
1777
1778 2008-08-17  Mark Probst  <mark.probst@gmail.com>
1779
1780         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
1781
1782         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
1783
1784         * mini-ops.h: Argument and result types for OVF_CARRY ops.
1785
1786         * decompose.c: PPC decompositions for various ops.
1787
1788         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
1789
1790 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1791
1792         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
1793         call the generic trampoline code using a call, instead of a jump, to
1794         remove some special casing from the generic trampoline code.
1795
1796         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
1797         (mono_codegen): Ditto.
1798
1799         * aot-compiler.c aot-runtime.c: Ditto.
1800
1801         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
1802
1803         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
1804         helper function to find the offset corresponding to a lazy fetch trampoline.
1805
1806         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
1807         when doing generic sharing.
1808
1809         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
1810         places.
1811         
1812         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
1813         mini-trampolines.c to be with the other trampoline creation functions.
1814
1815         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
1816         as it is equal to method->signature in most cases, add a 
1817         mono_emit_method_call_full variant which takes a signature and an imt
1818         argument as well.
1819
1820 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
1821
1822         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
1823         to this function, since it could be computed easily from the method 
1824         argument.
1825         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
1826         more.
1827
1828         * method-to-ir.c mini.c: Remove references to 
1829         compile_generic_method_wo_context.
1830
1831         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
1832         generic method calls.
1833         
1834         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
1835         dimensional non-szarrays.
1836
1837         * mini.c (mini_init): Register mono_array_new_1.
1838
1839         * jit-icalls.c (mono_array_new_1): New jit icall.
1840
1841         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
1842         pointing to the method.
1843
1844         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
1845         method addresses belonging to METHOD_JUMP patches in the 
1846         jump_target_got_slot_hash.
1847         (mono_aot_load_method): Ditto.
1848
1849         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
1850         METHOD_JUMP patches.
1851
1852         * mini.c (mini_create_jit_domain_info): New helper function which 
1853         initializes/frees domain->runtime_info.
1854         (mini_free_jit_domain_info): Ditto.
1855         (mini_init): Install the domain hook functions with the runtime.
1856
1857         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
1858         information maintained by the JIT.
1859
1860         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
1861         insertion into jump_table_hash into mono_codegen (), also implement proper
1862         locking.
1863
1864         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
1865         tail calls, it is already done by the aot code.
1866         
1867         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
1868         mechanism on amd64.
1869
1870         * iltests.il.in: Make the jmp test a bit more complex.
1871
1872         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
1873         generic instances which doesn't have a token.
1874
1875         * aot-runtime.c (decode_method_ref): Ditto.
1876         
1877         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
1878         can handle this case now.
1879         (handle_box): Ditto.
1880
1881 2008-08-15  Geoff Norton  <gnorton@novell.com>
1882
1883         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
1884         debugging check.
1885
1886 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
1887
1888         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
1889         calling generic methods.
1890
1891         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
1892
1893         * aot-runtime.c (decode_patch_info): Ditto.
1894
1895         * mini.c (mono_resolve_patch_target): Ditto.
1896         
1897         * patch-info.h: Add METHOD_RGCTX.
1898
1899         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
1900
1901 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
1902
1903         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
1904         arguments in registers.
1905
1906         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
1907         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
1908
1909         * mini.c (mini_method_compile): Abort aot compilation for generic
1910         methods if generic sharing is disabled.
1911         
1912         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
1913         an mrgctx.
1914
1915         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
1916         requiring an mrgctx.
1917
1918         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
1919         store instructions when converting a vcall to a normal call.
1920
1921         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
1922         mono_arch_find_jit_info.
1923
1924 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
1925
1926         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
1927         avoid calling mono_method_full_name () for every method even if the
1928         env var is not set.
1929         (check_inline_caller_method_name_limit): Ditto.
1930
1931 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1932
1933         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
1934         assemblies in one run.
1935
1936         * aot-compiler.c (mono_compile_assembly): Only print out a count of
1937         skipped methods if it is not 0.
1938
1939         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
1940
1941 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1942
1943         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
1944           MONO_ARCH_HAVE_UNWIND_TABLE.
1945
1946         Contributed under MIT/X11 license.
1947
1948 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1949
1950         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
1951           from default optimizaton list on Winx64.
1952
1953         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
1954
1955         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
1956           the LMF from the MonoJitTlsData structure.
1957
1958         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
1959
1960         Contributed under MIT/X11 license.
1961
1962 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1963
1964         * mini.c (sigsegv_signal_handler): Fix the build.
1965
1966         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
1967         assembly->aot_module.
1968
1969         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
1970         hash table. This simplifies and speeds up a lot of code, and fixes support
1971         for .netmodules.
1972
1973         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
1974         with the runtime.
1975
1976         * mini-exceptions.c: Ditto.
1977         
1978         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
1979         'native_offset' argument, since these are computed in the 
1980         mono_find_jit_info () function.
1981
1982         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
1983         is used by exceptions-ppc.c.
1984
1985         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
1986         mono_arch_find_jit_info ().
1987         
1988         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
1989         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
1990         generic code in mini-exceptions.c.
1991
1992 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
1993
1994         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
1995
1996         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
1997         
1998         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
1999         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
2000         called while holding the loader lock. Fixes #415608.
2001         (mono_aot_get_method_from_token_inner): Ditto.
2002
2003 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
2004
2005         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
2006         to reduce differences between this and the generic implementation in
2007         mini-exceptions.c.
2008         (ves_icall_get_frame_info): Ditto.
2009
2010         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
2011
2012         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
2013         longer neccesarry.
2014
2015         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
2016         mono_arch_get_call_filter () and make it non-static, for consistency with the
2017         other architectures.
2018
2019 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
2020
2021         * mini.c:
2022         * local-propagation.c:
2023         * mini-x86.c: Correct the name of arch defines.
2024
2025 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
2026
2027         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
2028         NO_EMULATE_LONG_SHIFT_OPS define.
2029
2030 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
2031
2032         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
2033         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
2034
2035         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
2036         MACH fixes. Merged from the 2.0 branch.
2037
2038         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
2039
2040         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
2041         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
2042
2043         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
2044
2045         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
2046         mono_marshal_get_native_wrapper () signature changes.
2047
2048 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
2049
2050         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
2051         conversion bug under arm.
2052
2053 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
2054
2055         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
2056
2057         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
2058         with overflow checking.
2059
2060 2008-08-05  Marek Habersack  <mhabersack@novell.com>
2061
2062         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
2063         to the genmdesc.pl file
2064
2065 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
2066
2067         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
2068         arg_array in the soft-float versions of the LOAD/STORE macros.
2069
2070         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
2071         implementation.
2072
2073         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
2074
2075 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2076
2077         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
2078         a float HFA. Fixes #413621.
2079
2080 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
2081
2082         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
2083         frame_size to args_size. Fixes build.
2084
2085 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2086
2087         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
2088         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
2089
2090         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
2091         the stack are not unaligned. Fixes #413247.
2092         
2093 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
2094
2095         * mini.c: update jitted methods performance counters.
2096
2097 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
2098
2099         * mini-exceptions.c: increase the exceptions thrown performance
2100         counter in mono_handle_exception ().
2101
2102 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
2103
2104         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
2105         can work with netmodules.
2106
2107 2008-07-28  Geoff Norton  <gnorton@novell.com>
2108
2109         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
2110         regression tests.
2111
2112 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2113
2114         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
2115         correct place.
2116
2117 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
2118
2119         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2120           The float param registers and other param registers must be the 
2121           same index on Windows x64.
2122
2123         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
2124           ArgValuetypeAddrInIReg argument case.  Setting the argument
2125           op to OP_VTARG_ADDR (OP_REGOFFSET)).
2126
2127         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
2128           variable computed above as the copy length for arguments of storage
2129           type ArgValuetypeAddrInIReg.
2130
2131         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
2132           ArgValuetypeAddrInIReg argument case.  This case will rely on
2133           mono_arch_emit_outarg_vt to emit the correct code later in the process.
2134
2135         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
2136           a 32 byte stack allocation for all calls.  We will omit the adjustment for
2137           jump and tail call instructoins as they do not follow the typical call behavior.
2138
2139         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
2140           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2141           local variable and pass the local variable by reference to the called method.
2142
2143         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
2144           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
2145           of a struct is passed in a register it must be saved with the other
2146           volatile argument on the stack.
2147
2148         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
2149           frame pointer the stack adjustment value must be saved to the unwind 
2150           info structure.
2151
2152         Contributed under MIT/X11 license.
2153
2154 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2155
2156         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
2157         which got lost in the merge.
2158
2159 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2160
2161         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
2162         build.
2163
2164         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
2165         
2166         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
2167         icalls, since they won't be patched.
2168
2169         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
2170         different code sequence when running under valgrind to prevent some valgrind
2171         errors.
2172
2173         * iltests.il.in: Add new regression test.
2174
2175         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
2176         end with a throw.
2177
2178         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
2179         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
2180
2181         * iltests.il.in: Add new test.
2182
2183         * aot-compiler.c: Fix some warnings.
2184
2185         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
2186         Fixes #412494.
2187
2188 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2189
2190         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
2191         (mini_usage_jitdeveloper): Add a missing --wapi option.
2192
2193 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2194
2195         * mini-codegen.c: Simplify the is_fp macros.
2196         (free_up_ireg): Remove, use free_up_reg instead.
2197         (free_up_reg): Fix the fp case.
2198
2199 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2200
2201         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
2202         lowered earlier.
2203
2204         * exceptions-x86.c: Merge some changes which seemed to have got lost
2205         in the linear-ir merge.
2206
2207         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
2208
2209         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
2210         long vreg volatile even if the variable was already created.
2211
2212         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
2213         volatile variables.
2214
2215 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2216
2217         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
2218
2219         * mini.c (mono_jit_compile_method_inner): Add support for 
2220         MONO_EXCEPTION_BAD_IMAGE.
2221
2222         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
2223         mini_method_get_context () returns NULL. Fixes #356531.
2224
2225         * mini.c (mono_method_to_ir): Ditto.
2226         
2227         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
2228         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
2229
2230 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2231
2232         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
2233         in the LDFTN implementation.
2234
2235 2008-07-25  Mark Probst  <mark.probst@gmail.com>
2236
2237         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
2238         code, patch calls to icalls, too, even if they're not in the
2239         shared generic code hash.  Fixes #411962.
2240
2241 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2242
2243         * cpu-x86.md: Increase the length of the fcall opcodes.
2244
2245         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
2246         calls returning floats.
2247
2248         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
2249         on NEWARR.
2250         
2251         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
2252         missed earlier.
2253
2254         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
2255         into the domain->method_code_hash.
2256
2257         * aot-compiler.c: Fix win32 build.
2258
2259         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
2260         
2261         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
2262         gshared NEWARR implementation.
2263
2264         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
2265
2266         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
2267         can be used outside of method_to_ir.
2268
2269         * mini.h (MonoCompile): Add arg_types field.
2270
2271         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
2272         
2273         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
2274         the values of the local arg_array and param_types array.
2275
2276 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2277
2278         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
2279         got accesses might only get generated later when NEWOBJ is decomposed.
2280         
2281         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
2282         looking up the native code of the target method when a delegate is called
2283         for the first time.
2284
2285         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
2286         optimization.
2287
2288         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
2289
2290         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
2291         AOT work on platforms without a working dlsym implementation.
2292
2293         * mini.h: Bump AOT image format version.
2294         
2295 2008-07-24  Mark Probst  <mark.probst@gmail.com>
2296
2297         * mini-exceptions.c: Free a MonoType with
2298         mono_metadata_free_type() instead of g_free().
2299
2300         * aot-runtime.c: Free a MonoType.
2301
2302 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2303
2304         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
2305         optimization.
2306
2307         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
2308         fp stack on x86.
2309
2310 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
2311         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
2312         profiler hook.
2313
2314 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2315
2316         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
2317         NEWOBJ calls on valuetypes.
2318
2319         * iltests.il.in: Add new test.
2320
2321         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
2322
2323 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2324
2325         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
2326         is no longer needed.
2327
2328         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
2329         non register sized integer arguments.
2330         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
2331         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
2332         emit_memcpy2 ().
2333
2334         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
2335         CEE_MONO_RETOBJ.
2336         
2337         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
2338         two a binop with different sized arguments is emitted.
2339
2340         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
2341         instruction in the ins==NULL case.
2342
2343 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2344
2345         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
2346
2347         * mini-x86.c: Fix osx build.
2348
2349         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
2350         opcodes as well.
2351
2352         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
2353         instruction for non int sized variables.
2354
2355         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
2356         implementation.
2357
2358 2008-07-23  Robert Jordan  <robertj@gmx.net>
2359
2360         * method-to-ir.c: Fix MSVC build.
2361
2362 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2363
2364         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
2365         a non int sized type, widen it to an int since newer versions of gcc seem to
2366         generate code which needs this.
2367
2368         * ssa2.c abcremoval2.c: Fix warnings.
2369
2370         * *: Merge the Linear IR branch.
2371
2372         The original branch is at trunk/branches/vargaz/mini-linear-il, and
2373         the ChangeLog file there describes all the changes done over the years. 
2374         Further documentation can be found at www.mono-project.com/Linear_IL.
2375
2376 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2377
2378         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2379           The float param registers and other param registers must be the 
2380           same index on Windows x64.
2381
2382         Contributed under MIT/X11 license.
2383
2384 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
2385
2386         * mini.c: Make the previous fix GC safe.
2387
2388 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
2389
2390         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
2391
2392 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2393
2394         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
2395           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
2396           ArgValuetypeAddrInIReg instead.
2397
2398         Contributed under MIT/X11 license.
2399
2400 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
2401
2402         * mini-codegen.c (get_register_spilling): Fix a warning.
2403
2404 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
2405
2406         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
2407         for types which the initialization fails. Raises the provided exception
2408         at the right stop after cleanup.
2409
2410 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
2411
2412         * aot-compiler.c: Free most of the memory allocated during compilation.
2413
2414         * mini.c (mini_parse_debug_options): Fix a leak.
2415         
2416         * mini.c (mini_method_compile): Don't add the method to the jit info tables
2417         during aot compilation.
2418
2419 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
2420
2421         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
2422         it has too much register pressure.
2423
2424 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
2425
2426         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
2427
2428 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
2429
2430         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2431         on x86.
2432
2433         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2434         on amd64 similar to the way it is done on arm.
2435
2436         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2437
2438         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
2439         consistency, normalize error messages, avoid loading aot-only modules in
2440         normal mode.
2441
2442         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
2443         for consistency.
2444
2445         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
2446
2447 2008-07-11  Martin Baulig  <martin@ximian.com>
2448
2449         * debug-debugger.h
2450         (MonoDebuggerInfo): Add `interruption_request'.
2451
2452 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
2453
2454         * aot-compiler.c (emit_plt): Remove some dead code.
2455
2456         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
2457
2458         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
2459         return the plt info offset belonging to a given plt entry.
2460
2461         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
2462         mono_aot_get_plt_info_offset.
2463         
2464         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
2465         similar to the amd64 code by makeing jumps through a separate jump table 
2466         instead of embedding the jump addresses into the code.
2467
2468 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
2469
2470         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
2471         method.
2472
2473 2008-07-10  Martin Baulig  <martin@ximian.com>
2474
2475         * mini.c (mini_method_compile): Disable generics sharing when
2476         running in the debugger.
2477
2478 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
2479
2480         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
2481
2482         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
2483         the local register allocator from running out of registers on x86 when 
2484         using aot.
2485
2486 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
2487
2488         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
2489         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
2490         C4146.
2491
2492         Contributed under MIT/X11 license.
2493
2494 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
2495
2496         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
2497         speed up the assembler.
2498
2499 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
2500
2501         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
2502         support.
2503
2504         * mini.c: Move the soft float handling macros a bit earlier, add 
2505         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
2506         place.
2507
2508         * mini.h: Add prototype for mono_arch_fixup_jinfo.
2509
2510         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
2511         read-only to help catch code allocation requests.
2512         
2513         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
2514         and turn it off when using --aot-only or when compiling with --aot=full.
2515
2516         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
2517         jump table for switches from the normal domain mempool, not the code
2518         manager.
2519
2520         * mini-trampolines.c (get_unbox_trampoline): New function to return an
2521         unbox trampoline which handles aot-only mode too.
2522
2523         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
2524         an AOTed unbox trampoline.
2525
2526         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
2527
2528 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
2529
2530         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
2531         ""
2532
2533         Contributed under MIT/X11 license.
2534
2535 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
2536
2537         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
2538           the unwind information for the method at the end of the allocated block.
2539           
2540         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
2541           MonoCompileArch to hold the unwind info for SEH on Winx64
2542         
2543         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
2544           frame pointer info for the method being compiled.
2545           
2546         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
2547           the call to mono_exception_from_token.
2548           
2549         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
2550           storing the method prolog information in a format that the Winx64 SEH can understand.  This
2551           information is stored a the end of the method block because it is all 32-bit offset based.
2552
2553         Contributed under MIT/X11 license.
2554
2555 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
2556
2557         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
2558
2559         * wapihandles.c: Fix warnings.
2560
2561         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
2562         mode.
2563
2564         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
2565         mono_jit_compile_method in aot-only mode since that calls the type 
2566         initializer.
2567         
2568         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
2569         get_delegate_invoke_impl in aot-only mode.
2570
2571         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
2572
2573 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
2574
2575         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
2576
2577         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
2578         is on by default.
2579
2580         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
2581
2582         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
2583         init trampoline from the AOT file as well.
2584
2585         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
2586         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
2587         code.
2588
2589         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
2590         mono_init.
2591
2592         * exceptions-amd64.c: Add _full variants for the remaining exception code
2593         creation functions as well, allow emission of relocatable code, remove
2594         caching since that is now done by the caller.
2595
2596         * mini-exceptions.c: Add _full variants for the remaining exception code
2597         creation functions as well, add aot-only support.
2598
2599         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
2600         if we can determine a proper token for them.
2601         (add_wrappers): Add a few more wrappers.
2602         (emit_method_code): Remove some dead code.
2603         (emit_trampolines): Emit exception code too.
2604
2605         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
2606
2607         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
2608         mono_array_new_va which avoids varargs.
2609
2610         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
2611
2612         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
2613         mono_arch_create_specific_trampoline () in all places.
2614
2615         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
2616         a bit so it can be used for other things as well.
2617         
2618         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
2619         on demand as well.
2620
2621         * exceptions-amd64.c: Rename the caching from the exception code creation
2622         functions, it is done by the caller instead.
2623         
2624         * exceptions-amd64.c: Change the signature of the exception code creation 
2625         functions to allow the creation of relocatable code later.
2626
2627         * mini-exceptions.c: Add a set of functions to query the various 
2628         runtime-generated exception functions.
2629
2630         * mini.c mini-exceptions.c: Use the newly added functions instead of the
2631         mono_arch_.. () functions.
2632         
2633 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
2634
2635         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
2636
2637         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
2638
2639         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
2640         (mini_get_vtable_trampoline): Ditto.
2641
2642         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
2643         code in the AOT case by returning the code size and a list of relocations to
2644         the caller.
2645
2646         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
2647
2648 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
2649
2650         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
2651           clean the stack.
2652
2653         Contributed under MIT/X11 license.
2654
2655 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
2656
2657         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
2658         so the buffer size can be computed correctly. Fixes #404735.
2659
2660         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
2661         normally as cfg->debug_info is already freed.
2662
2663 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
2664
2665         * mini-amd64.c: For calls returning vtypes in registers, don't store
2666         the return address on the stack, instead allocate a separate local for
2667         it. Fixes #404729.
2668
2669 2008-07-05  Mark Probst  <mark.probst@gmail.com>
2670
2671         * mini-trampolines.c, mini.h: Add an argument to
2672         mono_create_jit_trampoline_in_domain() for turning off the adding
2673         of the sync wrapper.
2674
2675         * mini.c: Use the JIT trampoline without sync instead of
2676         ldftn_nosync in static RGCTX invoke wrappers so that the call can
2677         be patched.
2678
2679 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2680
2681         * driver.c: Turn on GSHARED optimization by default.
2682
2683 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
2684
2685         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
2686         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
2687
2688         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
2689         create a variant of the generic trampoline code callable from AOTed trampolines.
2690
2691         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
2692         trampoline code callable from AOTed trampolines.
2693
2694         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
2695
2696 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2697
2698         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
2699         pass-through manner.
2700
2701         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
2702         and don't fail sharing for them anymore.
2703
2704         * mini-exceptions.c: Handle exceptions in shared generic methods.
2705
2706         * generic-sharing.c: When checking the context of a generic
2707         method, also check its class's context.  Don't treat wrappers as
2708         sharable.
2709
2710         * mini-trampolines.c: Some code factored out to
2711         metadata/generic-sharing.c.  Handle the MRGCTX case.
2712
2713         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
2714         we must deal with the method being of another instantiation of the
2715         class.  Add static rgctx invoke wrappers to generic methods.
2716
2717 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2718
2719         * mini.c: Provide all jit infos of generic shared methods with a
2720         generic jit info.
2721
2722         * mini-exceptions.c: Handle the new situation that a generic info
2723         might be available, but not info about the this/vtable/mrgctx
2724         variable.
2725
2726 2008-07-03  Mark Probst  <mark.probst@gmail.com>
2727
2728         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
2729         generic methods.
2730
2731 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
2732
2733         * dominators.c (check_dominance_frontier): Fix a warning.
2734
2735         * mini.h: Add some missing prototypes.
2736
2737         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
2738
2739         * driver.c (mono_jit_init_version): Correct the comments since the first
2740         argument should be the name of the root domain, not a filename.
2741
2742         * aot-runtime.c (make_writable): Error out if this is called while running
2743         with --aot-only.
2744         (load_aot_module): Ditto.
2745
2746         * aot-compiler.c: Really fix the computation of method indexes.
2747
2748         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
2749         optimizations as this is no longer called frequently.
2750
2751         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
2752         method and the invoke impl code and pass it to the delegate trampoline instead of
2753         just the delegate class.
2754
2755 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
2756
2757         * aot-compiler.c: Fixup the computation of method indexes.
2758         (add_wrappers): Create the base methods of the runtime invoke wrappers using
2759         the method builder infrastructure.
2760
2761         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
2762         has no header.
2763
2764         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
2765         mode, load the method right away instead of creating a trampoline.
2766
2767         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
2768
2769         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
2770         some checks a bit.
2771
2772 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
2773
2774         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
2775         (mono_aot_load_method): Use method_index instead of method->token.
2776
2777         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
2778         can handle icalls etc. properly.
2779
2780         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2781
2782         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
2783
2784         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
2785         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
2786         JIT_ICALL_ADDR patch type.
2787
2788         * patch-info.h: Add JIT_ICALL_ADDR patch type.
2789
2790         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
2791         request flag.
2792         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
2793
2794         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
2795
2796 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
2797
2798         * mini.c: Use domain->jit_code_hash_lock for controlling access to
2799         domain->jit_code_hash.
2800
2801 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
2802
2803         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
2804
2805 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
2806
2807         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
2808         get_this_arg_from_call, let it compute it when needed.
2809
2810         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
2811         gsctx from code only when needed.
2812
2813         * mini-trampolines.c (get_generic_context): Rename this to 
2814         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
2815         it can be called by the arch backends.
2816
2817         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
2818
2819 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
2820
2821         * driver.c (mono_main): Add experimental --aot-only command line option.
2822
2823         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
2824         set.
2825
2826 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
2827
2828         * driver.c (DllMain): Remove mono_module_handle.
2829
2830         Contributed under MIT/X11 license.
2831
2832 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
2833
2834         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
2835         for emitting methods which are not in the source assembly. Detect and report
2836         failure of assembling+linking.
2837         
2838         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
2839
2840         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
2841
2842 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
2843
2844         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
2845
2846 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
2847
2848         * mini.h: Remove some obsolete prototypes.
2849
2850         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
2851
2852 2008-06-24  Mark Probst  <mark.probst@gmail.com>
2853
2854         * mini.c (get_object_generic_inst): Variable-sized arrays are not
2855         supported by Visual Studio, so use alloca().
2856
2857 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
2858
2859         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
2860         Fixes #402585.
2861
2862 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2863
2864         * mini.c: Fail sharing of a generic method if it contains an open
2865         catch clause (because we don't pass MRGCTXs yet).
2866
2867 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2868
2869         * mini.c: When compiling a method with generic sharing, insert the
2870         method instantiated with an all-Object generic context into the
2871         jit info table, instead of the context of the first instantiation
2872         of the method we happen to compile.
2873
2874 2008-06-18  Martin Baulig  <martin@ximian.com>
2875
2876         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
2877         `major_version' and `minor_version'.
2878
2879 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2880
2881         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
2882         mono_method_is_generic_sharable_impl() takes an additional
2883         argument specifying whether to treat type variables as reference
2884         types.
2885
2886 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2887
2888         * mini.h: Removed obsolete prototypes.
2889
2890 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2891
2892         * mini.c: Don't fail generic sharing for initobj and sizeof - we
2893         already handle them.
2894
2895 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2896
2897         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
2898         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
2899         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
2900         tramp-x86.c: Added a MonoGenericContext* argument to
2901         mono_arch_get_unbox_trampoline() so that it can call other
2902         functions which require it.
2903
2904 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2905
2906         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
2907         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
2908         mono_arch_get_this_arg_from_call() takes a
2909         MonoGenericSharingContext* as well.
2910
2911 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2912
2913         * mini.c: Factor out code for emitting unbox into emit_unbox() and
2914         implement generic sharing of unbox.
2915
2916 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2917
2918         * mini.c: Don't compute the vtable to determine whether a field is
2919         special static, because it might not work for open types.
2920
2921 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2922
2923         * mini.c: Removed the unused token_type and token_source arguments
2924         from get_runtime_generic_context_ptr().
2925
2926 2008-06-17  Marek Habersack  <mhabersack@novell.com>
2927
2928         * mini.c (ADD_BINOP): fix the build
2929
2930 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
2931
2932         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
2933         a widening op.
2934
2935 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2936
2937         * mini.h: Removed class relations enum that's not used anymore.
2938
2939 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2940
2941         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
2942
2943         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
2944         the lazy fetch trampoline access code.
2945
2946 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
2947
2948         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
2949
2950 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
2951
2952         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
2953
2954         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
2955
2956         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
2957
2958 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2959
2960         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
2961         intrinsics.
2962
2963         * mini-ops.h: Add MIN/MAX_UN opcodes.
2964
2965         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
2966         intrinsics.
2967
2968         * basic-math.cs: Add more min/max tests.
2969
2970         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2971
2972 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2973
2974         * mini.c: Small fix in the prologue of emit_castclass.
2975
2976 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2977
2978         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2979
2980         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
2981         do not work even for unsigned types. Fixes #400014.
2982
2983         * basic-math.cs: Add regression tests for unsigned Min/Max.
2984
2985 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2986
2987         * mini.c: Added additional context_used argument to several
2988         functions, which will be needed for sharing generic methods.  Use
2989         GET_RGCTX macro wherever appropriate.  Declare only one
2990         context_used in mono_method_to_ir().
2991
2992 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2993
2994         * mini.c, generic-sharing.c: Removed generic class relations.
2995
2996         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
2997         functions due to MRGCTX changes.
2998
2999 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3000
3001         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
3002         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
3003         with calculated IMT.
3004
3005         * mini.c: Generic sharing of calls via generic interfaces.
3006
3007         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
3008         generic method with non-constant MonoGenericContext*.  Instead,
3009         the context is taken out of the method itself.
3010
3011 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3012
3013         * mini.c: Generic sharing of ldvirtftn.
3014
3015 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3016
3017         * mini.c: Generic sharing of ldftn.
3018
3019 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3020
3021         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
3022
3023 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3024
3025         * mini.c: Generic sharing of the special case of ldtoken followed
3026         by a call to GetTypeFromHandle.
3027
3028 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3029
3030         * mini.c: Generic sharing of box for nullable types.
3031
3032 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3033
3034         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
3035         are passed on the stack. Fixes #324807.
3036
3037 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
3038
3039         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
3040         for the ArgValuetypeAddrInIReg case.
3041
3042         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
3043         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
3044
3045         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
3046         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
3047         local variable and pass the local variable by reference to the called method.
3048           
3049         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
3050         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
3051
3052         Contributed under MIT/X11 license.
3053
3054 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
3055
3056         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
3057
3058         * debug-mini.c (mono_debug_print_vars): Release memory after printing
3059         everything.
3060
3061 2008-06-10  Martin Baulig  <martin@ximian.com>
3062
3063         * debug-mini.c
3064         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
3065
3066 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
3067
3068         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
3069         possible error when no arguments are passed.
3070
3071         Contributed under MIT/X11 license.
3072
3073 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
3074
3075         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
3076         where the file name is NULL.
3077
3078 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
3079
3080         * mini.c: Fix s390 build.
3081
3082 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
3083
3084         * trace.c (mono_trace_parse_options): Fix warnings.
3085
3086         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
3087
3088 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
3089
3090         * mini.c (remove_block_if_useless): Avoid printing the method name.
3091         
3092         * mini.c: Remove needless setting of ins->cil_code which is now done by 
3093         MONO_INST_NEW.
3094
3095         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
3096         LMF. Not yet used.
3097
3098         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
3099         translated code after it has been patched.
3100
3101 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
3102
3103         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
3104         avoid problems during code patching on SMP systems.
3105         (emit_call): Avoid adding a patch info which is already added by 
3106         emit_call_body.
3107         (mono_arch_emit_exceptions): Ditto.
3108
3109 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
3110
3111         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
3112         MONO_TYPE_ISSTRUCT already checks for it.
3113
3114 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
3115
3116         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
3117           structs with floats on Winx64 the float registers are not used.  
3118           The integer registers are always used..
3119         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
3120           only one register will be used and only if the size of the struct 
3121           is 1,2,4, or 8 bytes.
3122
3123         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
3124           to work for Winx64.
3125
3126         Contributed under MIT/X11 license.
3127
3128 2008-06-05  Martin Baulig  <martin@ximian.com>
3129
3130         * debug-debugger.c (debugger_lookup_class): Also call
3131         mono_class_setup_methods() here; we're only called from RTI.
3132
3133 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
3134
3135         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
3136         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
3137         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
3138         Post-process object files and add dtrace-generated object, if necessary.
3139
3140         Contributed under MIT/X11 license.
3141
3142 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3143
3144         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
3145         element class.
3146
3147         * mini.c: Generic sharing for unbox.any and castclass.
3148
3149 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3150
3151         * mini.c: Ignore tailcall prefix in shared generic code and when
3152         doing calls which require a vtable/rgctx argument.
3153
3154 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3155
3156         * mini.c: Don't free the JIT info.
3157
3158         * driver.c: Changes in the JIT info table testing code.
3159
3160 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
3161
3162         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
3163         interruption. Fix some warnings.
3164
3165         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
3166         interruption_checkpoint.
3167
3168 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
3169
3170         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
3171         from embedding applications.
3172
3173 2008-06-02  William Holmes  <billholmes54@gmail.com>
3174
3175         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
3176           reserving 32 bytes on the stack when making calls. 
3177
3178         Contributed under MIT/X11 license.
3179
3180 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
3181
3182         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
3183         the linear IL branch.
3184
3185         * driver.c: Print out more information for --version on arm.
3186
3187 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
3188
3189         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
3190         bb_exit instead, since out of line bblocks might not actually be emitted
3191         out-of-line.
3192         
3193         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
3194         maximum epilog size for out of line bblocks if tracing is enabled.
3195
3196         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
3197
3198 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
3199
3200         * arrays.cs: Regression tests for allocating arrays with negative sizes.
3201
3202 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
3203
3204         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
3205         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
3206         opcodes.
3207
3208 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
3209
3210         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
3211         the 'value' to store is a constant.
3212
3213         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
3214
3215         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
3216         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
3217
3218 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
3219
3220         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
3221         for accessing method->generic_container.
3222
3223 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
3224
3225         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
3226         
3227         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
3228
3229         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
3230
3231         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
3232         fails.
3233
3234 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
3235
3236         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
3237
3238         * mini.c: Handle the case when mono_class_vtable () fails.
3239
3240 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
3241         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
3242         the stat profiler.
3243
3244 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3245
3246         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
3247         together with domain sharing.
3248
3249 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3250
3251         * mini.c: Treat callvirts to final methods like non-virtual calls
3252         when doing generic sharing, i.e. look them up in the runtime
3253         generic context.
3254
3255 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3256
3257         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
3258         with computed types (for generic sharing).
3259
3260         * mini.c: Generic sharing for mkrefany and refanyval.
3261
3262 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
3263
3264         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
3265         possible.
3266
3267         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
3268         the generic sharing code.
3269         
3270         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
3271         when needed.
3272
3273 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3274
3275         * mini.h: Remove the declaration of mono_aot_init_vtable ().
3276
3277 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
3278
3279         * driver.c: updated copyright date
3280
3281 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3282
3283         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
3284         needed.
3285
3286 2008-05-19  Martin Baulig  <martin@ximian.com>
3287
3288         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
3289         pointing to the new `_mono_debug_using_mono_debugger' variable.
3290
3291         * driver.c
3292         (mono_main): Check mono_debug_using_mono_debugger() rather than
3293         the `MONO_INSIDE_MDB' environment variable to check whether we're
3294         inside the debugger.
3295
3296 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
3297
3298         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
3299         argument.
3300
3301 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
3302
3303         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
3304
3305         * mini.c: Added mini_assembly_can_skip_verification. This
3306         function checks if the assembly requested to skip verification. 
3307         Fixes part of #387274.
3308
3309 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
3310
3311         * mini.c (mini_get_method): Disable the check for open generic classes when
3312         using generic sharing.
3313
3314         * generics.cs: Add a test for #387034.
3315
3316         * mini.c (mini_get_method): Check whenever the method class is an open generic
3317         type, and return NULL in that case, causing a verification error. Fixes
3318         #384123.
3319
3320 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3321
3322         * driver.c (mono_main): Revert r102623. The right
3323         thing to do is to enable the verifier under verifiable
3324         unless a --security flag was passed.
3325
3326         We need this non-trivial behavior for --verify-all otherwise
3327         mcs-compileall won't be able to use it. As it needs everything to
3328         be verified under validil.
3329
3330 2008-05-06  Martin Baulig  <martin@ximian.com>
3331
3332         Fix #383749.
3333
3334         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
3335         (mono_debugger_thread_cleanup): Likewise.
3336         (mono_debugger_extended_notification): Likewise.
3337
3338 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3339
3340         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
3341         against both inflated and non-inflated methods. We need to check against the
3342         generic definition for cases where the instantiated method is not visible.
3343         We need to check against the inflated types for cases where the instantiation
3344         changes any super type. This fixes #382986.
3345
3346         Note that this doesn't need to be applied to other parts of mono_method_to_ir
3347         that check for visibiliy as generic params only appears as the type subject
3348         of tokens on call opcodes. Field manipulation and ldftn must always
3349         target an exact type.
3350
3351 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3352
3353         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
3354         if no related --security flag is passed.
3355
3356 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3357
3358         * mini-arch.h: Prepare support for ppc64.
3359
3360         Contributed under MIT/X11 license.
3361
3362 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3363
3364         * aot-runtime.c: Prepare support for ppc64.
3365
3366         Contributed under MIT/X11 license.
3367
3368 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3369
3370         * mini-ops.h: Prepare support for ppc64.
3371
3372         Contributed under MIT/X11 license.
3373
3374 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
3375
3376         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
3377
3378         Contributed under MIT/X11 license.
3379
3380 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
3381
3382         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
3383         assemblies, since aot_name is not a full path, causing us to load MS.NET 
3384         assemblies on windows.
3385
3386 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
3387
3388         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
3389         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
3390         * main.c: Use UTF-8 encoded command line instead of Windows default code
3391         page on Windows to support Unicode.
3392         * driver.c (DllMain): New function for mixed-mode assembly support.
3393         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
3394         export __stdcall functions without decoration.
3395
3396         Contributed under MIT/X11 license.
3397
3398 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3399
3400         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
3401         saving it very early.
3402
3403 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3404
3405         * mini.h, mini.c: Lots of code for accessing the old RGCTX
3406         deleted.  The only way to access the new RGCTX is via the
3407         trampline.
3408
3409         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
3410         vtable instead of the RGCTX to static methods.
3411
3412         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
3413         accessing the new RGCTX.
3414
3415         * generic-sharing.c: There is no separation between self, type
3416         arguments and other types in the RGCTX anymore.
3417
3418 2008-04-25  Jonathan Chambers <joncham@gmail.com>
3419
3420         * mini-amd64.c (add_general): Remove previous stack adjustment.
3421         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
3422         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
3423         for 32 bytes of stack space reserved for all calls.
3424         
3425         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
3426         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
3427         adjustment.
3428         
3429         Code contributed under MIT/X11 license.
3430
3431 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
3432
3433         * mini.c (mini_method_verify): Only verify non-inflated methods, check
3434         against the root definition, peeling out method and type instantiations.
3435         Cache verify success results, code that fails verification is still
3436         checked multiple times.
3437
3438 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
3439
3440         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
3441
3442 2008-04-23  Jonathan Chambers <joncham@gmail.com>
3443
3444         * mini-amd64.c (add_general): Always increment stack on Win64.
3445         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
3446         on Win64.
3447         
3448         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
3449         stack based argument handling on Win64.
3450         
3451         Code contributed under MIT/X11 license.
3452
3453 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
3454
3455         * Makefile.am (version.h): Add support for git-svn.
3456
3457 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
3458
3459         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
3460         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
3461         avoiding allocations and libc functions which might deadlock.
3462         
3463         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
3464         'no-gdb-backtrace' option is set.
3465
3466         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
3467
3468         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
3469
3470 2008-04-21  Martin Baulig  <martin@ximian.com>
3471
3472         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
3473         and `get_lmf_addr'; `notification_address' is no longer a pointer.
3474
3475 2008-04-21  Martin Baulig  <martin@ximian.com>
3476
3477         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
3478         `thread_vtable', `event_handler_ptr' and `event_handler'.
3479
3480 2008-04-21  Martin Baulig  <martin@ximian.com>
3481
3482         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
3483         allows delayed initialization of the `executable_code_buffer' when
3484         attaching.
3485
3486 2008-04-21  Martin Baulig  <martin@ximian.com>
3487
3488         * mini.h (mono_debugger_create_notification_function): Removed.
3489         * tramp-*.c (mono_debugger_create_notification_function): Removed.
3490
3491         * mdb-debug-info64.s
3492         (MONO_DEBUGGER__notification_function): Added this in the .text section.
3493
3494         * mdb-debug-info32.s
3495         (MONO_DEBUGGER__notification_function): Added this in the .text section.
3496
3497         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
3498         currently only works on x86 and x86_64, so don't create it on ppc.
3499
3500 2008-04-21  Martin Baulig  <martin@ximian.com>
3501
3502         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
3503
3504         * mini.c
3505         (mini_method_compile): In the fp elimination check, check
3506         `debug_options.mdb_optimizations' in addition to
3507         mono_debug_using_mono_debugger().       
3508
3509         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
3510         disable some JIT optimizations which are only disabled when
3511         running inside the debugger.
3512         Added `--help-debug' option to describe the debugging options.
3513         (parse_debug_options): New static function to parse the `--debug'
3514         options, so we can easily add more stuff in future.
3515
3516 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
3517
3518         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
3519         the method has no body.
3520
3521 2008-04-19  Jonathan Chambers <joncham@gmail.com>
3522
3523         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
3524         assembly is not allowed in MSVC 64-bit compiler. 
3525         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
3526         as we get floating point exceptions everywhere.
3527         
3528         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
3529         correctly align arguments for call to throw_exception.
3530         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
3531         
3532         Code contributed under MIT/X11 license.
3533
3534 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
3535
3536         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
3537
3538 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
3539
3540         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
3541
3542         * mini-amd64.c (NEW_INS): Set cil_code.
3543
3544         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
3545         from mini-amd64.c so all debugger related logic is in one place.
3546
3547         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
3548         later won't have a random ip assigned to them.
3549
3550 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
3551
3552         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
3553         the arch specific function initializes code_size.
3554         (mono_create_delegate_trampoline): Ditto.
3555
3556         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
3557         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
3558         platforms.
3559
3560         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
3561         running under the debugger.
3562
3563         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
3564         debugger.
3565
3566         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
3567         debugger. Also move the disabling of optimizations here from driver.c.
3568         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
3569         debugger.
3570
3571         * mini.h (MonoCompile): Add a few new flags.
3572
3573 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
3574
3575         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
3576         so the cil_code field of created MonoInst's is properly set.
3577         (mini_select_instructions): Ditto.
3578
3579         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
3580         (MONO_INST_NEW_CALL): Ditto.
3581
3582         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
3583         in many places so the ins->cil_code field is properly initialized.
3584
3585         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
3586         place.
3587
3588 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
3589
3590         * mini.c (mini_method_compile): Print a different message when compiling a 
3591         shared method.
3592         
3593         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
3594         > 1.
3595
3596 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3597
3598         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
3599         SSE2 instructions.
3600
3601         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
3602         
3603 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3604
3605         * mini.c (handle_stack_args): Make this return void since its return value was
3606         never used. Also set cfg->unverifiable for invalid IL instead of calling
3607         G_BREAKPOINT ().
3608
3609 2008-04-10  Mark Probst  <mark.probst@gmail.com>
3610
3611         * mini.c: Make sure "this" is live in catch clauses with type
3612         variables in shared generic code.
3613
3614 2008-04-08  Mark Probst  <mark.probst@gmail.com>
3615
3616         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
3617         generic_class_is_reference_type() to ensure the proper behaviour
3618         when sharing generic code and the type in question is a type
3619         argument.
3620
3621 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
3622
3623         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
3624         race conditions when printing thread dumps. Fixes #377738.
3625
3626 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
3627         
3628         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
3629         shows up when both MonoInst arguments can cause aliasig.
3630         There is likely no way in the current JIT to trigger this problem, but
3631         it showed up in the development of generics sharing, when in a new
3632         opcode both args of an OP_GROUP can be aliases (addresses of a local).
3633         When the generics sharing code will be committed, its tests will be
3634         valid also for this bug.
3635
3636 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
3637
3638         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
3639         PATCH_INFO_METHOD.
3640
3641         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
3642         NULL.
3643
3644 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
3645
3646         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
3647         use a more detailed exception message for InvalidCastException.
3648
3649         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
3650
3651         * driver.c (mono_main): Add --debug=casts option to turn on better 
3652         InvalidCastException message details.
3653
3654         * mini.c (mini_get_debug_options): New helper function to return the address of
3655         the debug_options variable.
3656
3657         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
3658         the jit_tls TLS variable.
3659
3660         * mini.c (mono_jit_tls): New TLS variable.
3661
3662         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
3663         option is used.
3664
3665 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
3666
3667         * mini.h: Removed verifer related stuff. This code was moved to verify.c
3668
3669         * mini.c: Removed verifer related stuff, code moved to verify.c.
3670
3671         * driver.c: Using code from verify.c instead of mini.c.
3672
3673 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
3674
3675         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
3676         longer valid.
3677
3678 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
3679
3680         * mini.c (check_for_method_verify): Enabling verification of
3681         corlib if mono_verify_all is set. Bugs in the verifier preventing that
3682         have been fixed.
3683
3684 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
3685
3686         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
3687         caller saved registers as well.
3688         
3689         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
3690         saved registers as well.
3691
3692 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
3693
3694         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
3695
3696         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
3697         code.
3698
3699 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
3700
3701         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
3702         to get_call_info.
3703         (get_call_info): Take a gsctx argument instead of 'cfg'.
3704
3705 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
3706
3707         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
3708         mono_verify_all is set.
3709
3710         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
3711
3712         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
3713
3714 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
3715
3716         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
3717         an exception.
3718
3719         * driver.c mini.c mini.h: Add a --verify-all development option to test the
3720         verifier and the code generated by the compiler.
3721
3722 2008-03-25  Mark Probst  <mark.probst@gmail.com>
3723
3724         * mini.c: Generic sharing of the non-nullable case of the box
3725         instruction.
3726
3727 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
3728
3729         * inssel.brg: Fix the build.
3730
3731         * iltests.il.in: Add a test for lconv.ovf.u8.un.
3732
3733 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
3734
3735         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
3736         Array:Address. Fixes #372410.
3737
3738         * iltests.il.in: New tests for readonly prefix.
3739
3740 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
3741
3742         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
3743         mini-trampolines.c.
3744
3745         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
3746         mini-exceptions.c.
3747
3748         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
3749         
3750         * mini.c (mono_decompose_op_imm): New helper function.
3751
3752         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
3753         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3754         return value.
3755
3756         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3757         mono_arch_output_basic_block. Fix warnings.
3758
3759         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
3760         for now.
3761
3762 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
3763
3764         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
3765         since the extra frame is now detected automatically inside the loop.
3766
3767         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
3768         opts which are now in mono_peephole_ins ().
3769         
3770         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
3771
3772         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
3773         frames and skip duplicate managed-to-native frames. Fixes #367665.
3774
3775         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3776         opts which are now in mono_peephole_ins ().
3777         (mono_arch_peephole_pass_2): Ditto.
3778
3779         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
3780
3781         * mini-codegen.c (mono_peephole_ins): New helper function containing the
3782         arch independent peephole optimizations.
3783
3784         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3785         opts which are now in mono_peephole_ins ().
3786
3787         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
3788         
3789         * mini-s390.c (mono_arch_output_basic_block): Fix build.
3790
3791         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
3792         pattern.
3793
3794         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
3795         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
3796         opcode. 
3797
3798 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
3799
3800         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
3801         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3802         return value.
3803
3804         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3805         mono_arch_output_basic_block. Fix warnings.
3806
3807 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3808
3809         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3810         conv.ovf.u.un.
3811
3812 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3813
3814         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3815         conv.ovf.u.un.
3816
3817         * iltests.il: Add new tests.
3818
3819 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
3820
3821         * mini.c: Removed Windows version macros.
3822
3823 2008-03-20  Mark Probst  <mark.probst@gmail.com>
3824
3825         * generic-sharing.c: Put reflection types in the extensible part
3826         of the runtime generic context.
3827
3828         * mini.c: Generic sharing of the GetTypeHandle special case of the
3829         ldtoken instruction.
3830
3831 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3832
3833         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
3834
3835         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
3836         
3837         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
3838         consistency with the other version on the linear IR branch.
3839
3840         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
3841
3842         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
3843
3844         * iltests.il.in: Add new tests.
3845
3846 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
3847
3848         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
3849
3850         * iltests.il.in: Add new tests.
3851
3852 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3853
3854         * mini.c: Two variables with the same name were declared in
3855         nesting contexts and one wasn't initialized.  Fixed.
3856
3857 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3858
3859         * mini.c: Generic sharing of the initobj instruction.
3860
3861 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
3862
3863         * mini.c: make the test to optimize ldtoken from typeof() more
3864         precise.
3865
3866 2008-03-18  Mark Probst  <mark.probst@gmail.com>
3867
3868         * mini.c: Generic sharing of the initobj instruction for reference
3869         types.
3870
3871 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
3872
3873         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
3874         the mono_breakpoint_clean_code() code to perform bound checks.
3875
3876 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
3877
3878         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
3879         mono_arch_patch_callsite() to include the start of the managed method
3880         to be able to perform bound checks.
3881
3882 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3883
3884         * mini.c: Generic sharing for the isinst instruction.
3885
3886 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3887
3888         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3889         inssel-long32-mips.brg: Added opcodes for doing indirect calls
3890         with the runtime generic context argument.
3891
3892         * mini.c: Share calls to several types of unsharable methods by
3893         putting the address of the method code in the runtime generic
3894         context and doing an indirect call.
3895
3896         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3897         to switches.
3898
3899 2008-03-16  Mark Probst  <mark.probst@gmail.com>
3900
3901         * generic-sharing.c: Change due to a change in the runtime genric
3902         context API.
3903
3904 2008-03-15  Martin Baulig  <martin@ximian.com>
3905
3906         * tramp-x86.c
3907         (mono_arch_nullify_class_init_trampoline): Add call to
3908         mono_breakpoint_clean_code() to make things work when running
3909         inside the debugger.
3910
3911         * tramp-amd64.c
3912         (mono_arch_nullify_class_init_trampoline): Add call to
3913         mono_breakpoint_clean_code() to make things work when running
3914         inside the debugger.
3915
3916 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3917
3918         * inssel-long.brg (reg): Fix 64 bit build.
3919
3920 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3921
3922         * mini.c, mini.h: Share static generic code by passing it an
3923         implicit argument pointing to the runtime generic context.
3924
3925         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3926         inssel-long32-mips.brg: New opcodes for calling shared static,
3927         which need to be passed the runtime generic context.
3928
3929         * mini-amd64.c, mini-x86.c: Save the runtime generic context
3930         argument on the stack in the prologue if needed.  New function for
3931         finding the runtime generic context argument from the registers
3932         saved by the trampoline.
3933
3934         * mini-amd64.h, mini-x86.h: Specify which register to use for the
3935         runtime generic context argument.
3936
3937         * tramp-amd64.c: Also restore the register used for the runtime
3938         generic context argument.
3939
3940         * mini-trampoline.c: Resolve shared static calls by consulting the
3941         runtime generic context via the new argument.
3942
3943         * generic-sharing.c: Add an argument to sharability-checking
3944         functions that specifies whether type variables should be treated
3945         as sharable type arguments.
3946
3947         * inssel-x86.brg: Removed a superfluous, buggy rule.
3948
3949         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3950         to switches.
3951
3952 2008-03-14  Martin Baulig  <martin@ximian.com>
3953
3954         * debug-debugger.c (main_thread_handler): Call
3955         mono_runtime_run_main() without sending any notifications.
3956
3957         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
3958
3959 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3960
3961         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
3962
3963 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3964
3965         * tramp-x86.c: Fixed register restore offsets in the trampoline
3966         code for ECX and EDX.
3967
3968 2008-03-12  Geoff Norton  <gnorton@novell.com>
3969
3970         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
3971         different ucontext_t implementations.
3972         * exceptions-arm.c: Use the above defines to get exceptions working on 
3973         iPhone (based on a patch by Luke Howard lukeh@padl.com)
3974         * mini-arm.c: Implement iPhone icache support (based on a patch by
3975         Luke Howard lukeh@padl.com)
3976
3977 2008-03-12  Mark Probst  <mark.probst@gmail.com>
3978
3979         * mini.c: Enable generic sharing of calls to non-static
3980         non-interface non-generic non-value-type methods.
3981
3982         * mini-trampolines.c: Resolve calls from shared generic code.
3983
3984 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
3985
3986         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
3987
3988         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
3989
3990 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
3991
3992         * mini.c: some fixes for the AOT compiler.
3993
3994 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3995
3996         * cpu-amd64.md: Add clob:1 to some float opcodes.
3997
3998 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
3999
4000         * mini.h: Added MiniVerifierMode enumeration.
4001
4002         * mini.c: Added mini_verifier_set_mode to control
4003         the usage of the new verifier.
4004
4005         * mini.c (mono_method): Integrated the new verifier.
4006
4007         * driver.c: Extended --security option with validil and
4008         verifiable options to activate the new verifier.
4009
4010 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
4011
4012         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
4013         optimization to ctors taking 0 or 2 arguments too.
4014
4015         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
4016         a bit.
4017
4018         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
4019
4020         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
4021
4022 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
4023
4024         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
4025         non-aot case as well.
4026
4027         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
4028
4029         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
4030         changes.
4031
4032         * aot-compiler.c (encode_patch): Ditto.
4033
4034         * mini.h (G_MININT32): Fix the definition of this.
4035
4036 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
4037
4038         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
4039
4040         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
4041
4042 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4043
4044         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
4045         methods returning vtypes in registers.
4046         (mono_arch_allocate_vars): Ditto.
4047
4048         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
4049
4050         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
4051
4052         * generics.cs: Add a test from the linear IR branch.
4053
4054         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
4055
4056         * mini.c (inline_method): Cache failed inline attempts.
4057
4058 2008-03-04  Mark Probst  <mark.probst@gmail.com>
4059
4060         * mini.c: For shared methods of generic classes put the location
4061         of "this" into the MonoGenericJitInfo.
4062
4063         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
4064         register out of a MonoContext by register number.  Add the generic
4065         sharing context as an argument to mono_arch_find_this_argument().
4066
4067         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4068         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
4069         for new arch function.
4070
4071         * mini-exception.c: Handle open exception clauses in shared
4072         generic code.
4073
4074         * mini-trampolines.c: Supply additional argument to
4075         mono_arch_find_this_argument().
4076
4077 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4078
4079         * Makefile.am (regtests): Run the bench.exe tests last.
4080
4081 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
4082
4083         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
4084         a bit.
4085
4086 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
4087
4088         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
4089         with MS.
4090
4091         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
4092         
4093         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
4094
4095         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
4096         whose class has no cctor.
4097
4098         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
4099
4100 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
4101
4102         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
4103         unverified.
4104
4105 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
4106
4107         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
4108         to be in sync with the code on the linear IR branch.
4109
4110         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
4111
4112         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
4113
4114 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
4115
4116         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
4117
4118         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
4119
4120         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
4121
4122         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
4123
4124         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
4125         
4126         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
4127         body.
4128
4129 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
4130
4131         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
4132         OP_LOADR4_MEMBASE emission.
4133
4134         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
4135         (mono_spillvar_offset_float): Ditto.
4136
4137         * mini-mips.c (mono_arch_emit_prolog): Ditto.
4138
4139         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
4140         emission.
4141
4142         * basic-long.cs: Add regression tests for them.
4143
4144         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
4145         use.
4146         (mono_arch_allocate_vars): Fix representation of single-precision float
4147         argument.
4148         (mono_arch_output_basic_block): Ditto.
4149
4150         * inssel-mips.brg: Ditto, remove duplicate items.
4151
4152         * mini-mips.c (emit_load_volatile_arguments): New function to handle
4153         arguments of tail calls as on other platforms.
4154         (mono_arch_output_basic_block): Handle tail calls.
4155
4156         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
4157         register.
4158
4159         * objects.cs (test_5_pass_static_struct): Add test for it.
4160
4161         Contributed under MIT/X11 license.
4162
4163 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
4164
4165         * Makefile.am: Use gmcs for compiling the regression tests.
4166
4167         * *.2.cs *.2.il: Rename to *.cs and *.il.
4168
4169 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
4170
4171         * regalloc.h: Make the vassign array smaller.
4172
4173         * mini.c (mini_method_compile): Remove an unused field in cfg.
4174
4175         * mini-codegen.c: Add a bunch of micro optimizations.
4176
4177 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
4178
4179         * regalloc.h: Remove some unused fields.
4180
4181 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
4182
4183         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
4184
4185         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
4186
4187 2008-02-22  Mark Probst  <mark.probst@gmail.com>
4188
4189         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
4190
4191         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
4192         trampoline: Fetch an entry from the runtime generic context.  If
4193         it's NULL, jump to the actual trampoline to fill the runtime
4194         generic context.  Otherwise, return it.
4195
4196         * mini.c: Call the lazy fetch trampoline to get entries out of the
4197         runtime generic context.
4198
4199         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
4200         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
4201         tramp-sparc.c: Stubs for the lazy fetch trampoline.
4202
4203 2008-02-21  Mark Probst  <mark.probst@gmail.com>
4204
4205         * mini.c: Fetch data out of the extensible part of the runtime
4206         generic context instead of calling a helper function.
4207
4208         * generic-sharing.c: Some functions moved into
4209         metadata/generic-sharing.c.  Helper function for fetching other
4210         types now checks and asserts against extensible rgctx (just for
4211         debugging purposes - the helper function isn't called anymore
4212         unless for debugging).
4213
4214 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
4215
4216         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
4217         for tail calls up to the point that the tests in iltests.exe run. Also add a
4218         dummy CKFINITE implementation.
4219         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
4220         needed for trampoline LMF frames.
4221
4222         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
4223         trampoline LMF frames.
4224
4225 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
4226
4227         * mini.c (inline_method): clean any pending loader error when inlining fail.
4228         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
4229
4230 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
4231
4232         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
4233
4234         * aot-runtime.c (decode_patch_info): Ditto.
4235
4236         * mini.c (mono_resolve_patch_target): Ditto.
4237         
4238         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
4239         icall wrappers.
4240
4241         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
4242         
4243         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
4244         if it references an icall address.
4245
4246 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
4247
4248         * cpu-s390x.md: Remove some more unused opcodes.
4249         
4250         * cpu-s390x.md: Remove some unused opcodes.
4251
4252         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
4253         mono_op_imm_to_op ().
4254
4255         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
4256         instead of a switch statement.
4257         
4258         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
4259         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
4260
4261         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
4262         
4263         * mini-codegen.c: Remove unused mono_regstate2_... functions.
4264
4265         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
4266         -1.
4267
4268 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
4269
4270         * driver.c (mono_main): Improve error reporting when an assembly cannot be
4271         opened. Fixes #362607.
4272
4273         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
4274
4275         * iltests.il.in: Add a test for static methods in interfaces.
4276
4277 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
4278
4279         * genmdesc.c (build_table): Fix a crash on older glib versions.
4280
4281         * cpu-sparc.md: Remove some unused opcodes.
4282         
4283         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
4284         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
4285
4286         * cpu-amd64.md: Remove some unused opcodes.
4287
4288         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
4289         like the other opcodes.
4290
4291 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
4292
4293         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
4294
4295         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
4296
4297         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
4298         variables 'cfg' instead of 'm' for consistency.
4299
4300         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
4301
4302         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
4303         argument holding the vtype return address, to avoid the ambigious use of
4304         cfg->ret for this purpose.
4305
4306         * mini.c (NEW_RETLOADA): Use vret_addr if set.
4307
4308         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
4309         
4310         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
4311         new mono_print_ins () function which only takes one argument.
4312
4313 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
4314
4315         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
4316         macro arguments.
4317
4318 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
4319
4320         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
4321
4322         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
4323
4324         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
4325         opcodes and other small changes.
4326
4327         * mini-ops.h: Add some new opcodes from the linear IR branch.
4328
4329         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
4330
4331         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
4332         opcodes, use the REG_MEMBASE opcodes instead.
4333         
4334         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
4335         opcodes, use the REG_MEMBASE opcodes instead.
4336         
4337         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
4338         linear IR branch.
4339
4340         * mini.c (mono_op_imm_to_op): New helper function.
4341
4342         * mini-ops.h: Add some opcodes from linear IR branch.
4343
4344 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
4345
4346         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
4347         <tsv@solvo.ru>.
4348
4349 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
4350
4351         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
4352         OP_ICONV_TO_R4/R8.
4353
4354         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
4355
4356 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
4357
4358         * aot-compiler.c (emit_method_code): Add an assert.
4359
4360         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
4361         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
4362         methods.
4363
4364 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
4365
4366         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
4367         some load/store opcodes so they are consistent. 
4368         (mono_arch_emit_prolog): Simplify some code.
4369
4370         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
4371
4372         * objects.cs: Add tests for large argument offsets on ARM.
4373
4374         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
4375         stack offsets. Fixes #359651.
4376
4377         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
4378
4379         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
4380
4381         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
4382
4383         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
4384
4385         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
4386
4387         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
4388         rid of CEE_CONV_R_UN.
4389
4390         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
4391
4392 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
4393
4394         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
4395
4396         * mini.c (mono_normalize_opcodes): Add some more opcodes.
4397
4398         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
4399
4400         * cpu-amd64.md: Remove some unused opcodes.
4401
4402         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
4403
4404         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
4405
4406         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
4407         arch specific functions for its parts. Call the peephole pass after local
4408         regalloc so the prolog can compute a more accurate max_offset.
4409         
4410         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
4411         the corresponding OP_I/OP_L opcodes.
4412
4413         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
4414
4415         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
4416
4417 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4418
4419         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
4420         as they are handled in mini.c.
4421
4422         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
4423         
4424         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
4425         case since it is handled in mini.c.
4426
4427         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
4428
4429         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
4430
4431         * *.c: Use the new opcodes in the IR and back end code.
4432
4433         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
4434
4435         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
4436
4437 2008-02-06  Mark Probst  <mark.probst@gmail.com>
4438
4439         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
4440         an assert because it has a race condition.
4441
4442 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4443
4444         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
4445
4446         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
4447
4448         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
4449
4450         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
4451         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
4452
4453 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
4454
4455         * cpu-amd64.md (move): Correct the maximum size of move.
4456
4457 2008-02-05  Mark Probst  <mark.probst@gmail.com>
4458
4459         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
4460         the generic class init trampoline to return quickly if the class
4461         is already inited.
4462
4463 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
4464
4465         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
4466         issues where an 32 bit callsite cannot be patched by a 64 bit address.
4467
4468 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
4469
4470         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
4471         branch.
4472
4473 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
4474
4475         * objects.cs: Add some soft-float tests.
4476
4477         * mini.c: Fix a couple more soft-float issues.
4478
4479         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
4480
4481         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
4482         avoid a REX prefix.
4483
4484 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
4485
4486         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
4487         exception happens while compiling a virtual method.
4488
4489 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
4490
4491         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
4492         
4493         * mini-sparc.c: Fix build.
4494
4495         * mini-sparc.c (get_call_info): Add support for generic sharing.
4496
4497         * mini-exceptions.c: Add a FIXME.
4498
4499 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
4500
4501         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
4502         altstack handling code.
4503
4504         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
4505         
4506         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
4507
4508         * mini-s390.c: Add support for generic sharing.
4509
4510         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
4511         Fix CAS on s390.
4512         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4513
4514         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
4515
4516         * mini-s390x.c: Add support for generic sharing.
4517         
4518         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
4519         Fix CAS on ia64.
4520         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4521
4522         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
4523         can be used since it takes a 16 bit signed immediate.
4524
4525         * inssel-s390x.brg: Fix OP_SETRET.
4526
4527         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
4528
4529         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
4530
4531         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
4532
4533         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
4534
4535         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
4536         in one place.
4537
4538         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
4539         stuff.
4540
4541         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
4542         of the unused mono_arch_patch_delegate_trampoline stuff.
4543
4544 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
4545
4546         * basic-long.cs: Move the fp related tests to basic-float.cs.
4547
4548         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
4549
4550         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
4551
4552         * basic-calls.cs: Add a test for proper float argument passing.
4553
4554         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
4555         if the context corresponds to an exception received through a signal.
4556
4557         * exceptions.cs: Add a test for nullref handling at the start of a try
4558         clause.
4559
4560         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
4561
4562         * jit-icalls.c (mono_break): New JIT icall.
4563
4564         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
4565
4566         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
4567
4568 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
4569
4570         * cpu-*.md: Get rid of unused opcodes.
4571
4572         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
4573
4574         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
4575         by all platforms.
4576
4577         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
4578         define.
4579
4580         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
4581         the arch independent trampoline code in mini-trampolines.c.
4582
4583         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
4584
4585         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
4586
4587         * mini-s390.h: Remove an unused define.
4588         
4589         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
4590         the arch independent trampoline code in mini-trampolines.c.
4591
4592         * mini-arm.c (mono_arch_emit_prolog): Fix build.
4593
4594 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
4595
4596         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
4597
4598         * mini-s390.c (mono_arch_emit_prolog): Fix build.
4599
4600         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
4601
4602         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
4603
4604         * cpu-amd64.md: Use smaller sizes for int opcodes.
4605
4606         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
4607
4608         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
4609         objects.cs.
4610
4611         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
4612         debugging.
4613
4614         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
4615         instead of though a pointer to save an indirection when accessing elements of
4616         the array.
4617
4618         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
4619         some typos.
4620         (NOT_IMPLEMENTED): New helper macro.
4621         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
4622         of a bb.
4623
4624         * *.c: Use the new helper macro.
4625
4626 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
4627
4628         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
4629
4630 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
4631
4632         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
4633         stack slots.
4634
4635 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
4636
4637         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
4638         profiling is enabled.
4639         
4640         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
4641         the end.
4642         (mono_arch_emit_prolog): Add more first bblock optimizations.
4643
4644         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
4645         in order if possible.
4646         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
4647         bblock, since the arguments are still in their original registers.
4648
4649         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
4650
4651 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
4652
4653         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
4654         as well.
4655
4656         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
4657         offset 0.
4658
4659         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
4660
4661         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
4662         process async exceptions received while in unmanaged code.
4663
4664         * mini.c (mini_init): Install a callback with the runtime which will be called
4665         when a thread receives an async exception while in unmanaged code.
4666
4667         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
4668
4669         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
4670
4671 2008-01-16  Wade Berrier  <wberrier@novell.com>
4672
4673         * cpu-g4.md:
4674         * cpu-arm.md:
4675         * cpu-s390x.md:
4676         fix build
4677
4678 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
4679
4680         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
4681         compilation with sun cc.
4682
4683         * cpu-*.md: Fix the build.
4684
4685         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
4686
4687         * mini-amd64.h: Add some comments to the MonoLMF structure.
4688
4689         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
4690         
4691         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
4692         in the LMF structure if possible. This saves two instructions in the
4693         managed->native wrappers.
4694
4695         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
4696
4697 2008-01-16  Mark Probst  <mark.probst@gmail.com>
4698
4699         * generic-sharing.c: New type argument lookup code which uses the
4700         runtime generic context template.
4701
4702 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
4703
4704         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
4705
4706         * mini-arm.c (add_general): Fix arm eabi parameter passing.
4707         (mono_arch_output_basic_block): Fix localloc implementation.
4708
4709         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
4710
4711         * mini-ia64.c (peephole_pass): Fix ia64 build.
4712
4713         * mini-amd64.c (peephole_pass): Fix a warning.
4714         
4715         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
4716         at a constant offset from sp/fp.
4717
4718         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
4719         instead of obtaining it from *lmf in the managed method case.
4720
4721 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
4722
4723         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
4724
4725 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
4726
4727         * mini.h (MonoInstList): New type.
4728         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
4729         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
4730         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
4731         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
4732         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
4733         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
4734         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
4735         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
4736         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
4737         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
4738         MONO_INST_LIST_FOR_EACH_ENTRY,
4739         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
4740         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
4741         mono_inst_list_first, mono_inst_list_last,
4742         mono_inst_list_next, mono_inst_list_prev): New instruction
4743         list handling interfaces.
4744         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
4745         list head 'ins_list'.
4746         (MonoInst): Replace next pointer with list head 'node'.
4747         (MonoCallInst): Make 'out_args' a MonoInstList.
4748         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
4749         (MonoCompile): Delete reverse_inst_list and
4750         reverse_inst_list_len.
4751         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
4752         mono_arch_lowering_pass, mono_arch_local_regalloc,
4753         mono_arch_output_basic_block, mono_arch_emit_prolog):
4754         Convert to new instruction lists.
4755         (insert_after_ins): Delete.
4756         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
4757         instruction lists.
4758         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
4759         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
4760         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
4761         mono_emulate_opcode, mono_emit_load_got_addr,
4762         inline_method, mono_method_to_ir, mono_print_bb_code,
4763         print_dfn, decompose_pass, nullify_basic_block,
4764         replace_out_block_in_code, remove_block_if_useless,
4765         merge_basic_blocks, move_basic_block_to_end,
4766         try_unsigned_compare, optimize_branches, mono_print_code,
4767         mini_select_instructions, remove_critical_edges): Likewise.
4768         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
4769         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
4770         mono_arch_output_basic_block, mono_arch_emit_prolog):
4771         Likewise.
4772         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
4773         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4774         mono_arch_output_basic_block): Likewise.
4775         (inst_list_prepend, insert_after_ins): Delete.
4776         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
4777         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
4778         instruction lists.
4779         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
4780         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
4781         mono_arch_emit_prolog): Likewise.
4782         * cfold.c (mono_constant_fold): Likewise.
4783         * liveness.c (visit_bb, mono_analyze_liveness,
4784         optimize_initlocals): Likewise.
4785         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
4786         * graph.c (mono_draw_code_cfg): Likewise.
4787         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
4788         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
4789         mono_ssa_cprop): Likewise.
4790         * abcremoval (get_relations_from_previous_bb, process_block):
4791         Likewise.
4792         * local-propagation (mono_cprop_invalidate_values,
4793         mono_local_cprop_bb): Likewise.
4794         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
4795         peephole_pass, mono_arch_output_basic_block,
4796         mono_arch_emit_prolog): Likewise.
4797         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
4798         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4799         mono_arch_emit_prolog): Likewise.
4800         (insert_after_ins): Delete.
4801         * aliasing.c (print_code_with_aliasing_information,
4802         mono_build_aliasing_information, mono_aliasing_deadce):
4803         Convert to new instruction lists.
4804         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
4805         peephole_pass, NEW_INS, mono_arch_lowering_pass,
4806         mono_arch_local_regalloc, mono_arch_output_basic_block):
4807         Likewise.
4808         (insert_after_ins): Delete.
4809         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
4810         peephole_pass, mono_arch_output_basic_block): Convert to
4811         new instruction lists.
4812         * mini-codegen (InstList, inst_list_prepend,
4813         insert_after_ins): Delete.
4814         (insert_before_ins, get_register_force_spilling,
4815         get_register_spilling, free_up_ireg, free_up_reg,
4816         create_copy_ins, create_spilled_store, alloc_int_reg,
4817         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
4818         to new instruction lists.
4819         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
4820         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4821         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
4822         (insert_after_ins): Delete.
4823         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
4824         mono_arch_local_regalloc, mono_arch_output_basic_block,
4825         mono_arch_call_opcode): Convert to new instruction lists.
4826         (insert_after_ins): Delete.
4827         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
4828         peephole_pass, mono_arch_output_basic_block,
4829         mono_arch_emit_prolog): Convert to new instruction lists.
4830
4831 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
4832
4833         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
4834
4835         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
4836         Fixes #353182.
4837
4838         * Makefile.am (version.h): Make this work with non-bash shells.
4839
4840 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
4841
4842         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
4843
4844 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
4845
4846         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
4847         the InitializeArray optimization.
4848
4849 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
4850
4851         * mini.c driver.c: Don't include os/gc_wrapper.h.
4852
4853 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
4854
4855         * mini.c (print_jit_stats): Print GC statistics if available.
4856
4857 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
4858
4859         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
4860
4861 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
4862
4863         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
4864
4865 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
4866
4867         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
4868         
4869         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
4870
4871         * driver.c (mono_main): Ditto.
4872
4873 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
4874
4875         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
4876
4877         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
4878         in the vtable can't be encoded.
4879         (compile_method): Ditto.
4880
4881 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
4882
4883         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
4884         defined.
4885
4886         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
4887         lmf->rbp.
4888
4889         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
4890         the top LMF entry belongs to the current method.
4891
4892         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
4893
4894 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
4895
4896         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
4897         
4898         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
4899
4900         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
4901
4902         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
4903
4904         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
4905
4906         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
4907         implementation.
4908
4909         * basic-float.cs: Add an ulong->double cast test.
4910
4911 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
4912
4913         * mini.c (mono_method_to_ir): Fix a warning.
4914
4915 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
4916
4917         * mini-ops.h: Add OP_SWITCH.
4918
4919         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
4920         CEE_SWITCH in back-end code, use OP_SWITCH instead.
4921
4922 2007-12-11  Geoff Norton  <gnorton@novell.com>
4923
4924         * mini-s390x.c: Minor change to the MAX() define to allow
4925         it to compile with other gcc versions.
4926
4927 2007-12-11  Geoff Norton  <gnorton@novell.com>
4928
4929         * cpu-s390x.md:
4930         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
4931
4932 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4933
4934         exceptions-arm.c (mono_arch_get_restore_context): Restore
4935         the frame pointer.
4936
4937         exceptions-arm.c (throw_exception): Save the frame pointer.
4938         This is a partial fix for #323747. Only the client side is
4939         fixed.
4940
4941 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4942
4943         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
4944         was using an unrelated variable to log the class which
4945         needed the cctor to be called. This was crashing on arm.
4946
4947 2007-12-09  Robert Jordan  <robertj@gmx.net>
4948
4949         * mini-x86.c (mono_arch_emit_epilog):
4950         Consider all kinds of 64-bit types. Fixes #323114.
4951
4952 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
4953
4954         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
4955
4956 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4957
4958         * mini-amd64.c (peephole_pass): Add a missing instruction check.
4959
4960 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4961
4962         * mini.c: run type ctor before allocating an object, not only
4963         when running it's constructor method (fixes at least part of bug #342507).
4964
4965 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4966         
4967         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
4968         
4969         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
4970         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
4971         function.
4972
4973         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
4974         mono_generic_class_init_trampoline () the same as it is done with the other
4975         trampolines.
4976
4977         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
4978         aot-runtime.c aot-compiler.c: Implement AOT support.    
4979
4980 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4981
4982         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
4983         build for archs which don't have the vtable trampoline defined
4984         yet.
4985
4986 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4987
4988         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
4989
4990         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
4991
4992         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
4993
4994         * tramp-<ARCH>.c: Use the new helper function.
4995
4996 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4997
4998         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
4999         trampoline call, which takes a vtable argument.
5000
5001         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
5002         OP_TRAMPCALL_VTABLEs like other calls.
5003
5004         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
5005         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
5006         call.  Implemented a support function which fetches the vtable
5007         from a register set.
5008
5009         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
5010         Implemented a generic class init trampoline, using the
5011         OP_TRAMPCALL_VTABLE opcode.
5012
5013         * mini.c: Implemented static field access when sharing generic
5014         code.  This implies initing the class using the new
5015         OP_TRAMPCALL_VTABLE call.
5016
5017 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5018
5019         * mini.c: Don't compile methods with sharing enabled if their
5020         classes are disabled for sharing.
5021
5022 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5023
5024         * inssel.brg: Add a missing sign extension to the GETCHR and array access
5025         opcodes. Fixes #346563.
5026
5027         * objects.cs: Add a new test.
5028
5029         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
5030
5031         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
5032         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
5033
5034 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5035
5036         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
5037
5038 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
5039
5040         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
5041         code stream.
5042
5043 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
5044
5045         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
5046
5047         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
5048         optimization in the AOT case.
5049         
5050 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
5051
5052         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
5053         
5054         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
5055
5056         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
5057
5058         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
5059
5060         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
5061         is created by the inlined delegate ctor.
5062
5063         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
5064
5065         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
5066
5067 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
5068
5069         * cpu-x86.md: Fix the length of ckfinite.
5070
5071 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
5072
5073         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
5074         
5075         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
5076         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
5077
5078         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
5079
5080         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
5081         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
5082
5083 2007-11-28  Martin Baulig  <martin@ximian.com>
5084
5085         * mini-x86.c
5086         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
5087         after creating the trampoline.
5088
5089 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
5090
5091         * aot-runtime.c (load_aot_module): Check runtime version if needed.
5092
5093         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
5094         the same version.
5095
5096         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
5097         instead of the calling method to help AOT.
5098
5099         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
5100
5101 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
5102
5103         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
5104         is defined.
5105
5106 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
5107
5108         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
5109         
5110         * aot-compiler.c (compile_method): Correct check for generic method definitions.
5111         (encode_method_ref): No need to handle generic method definitions specially.
5112
5113         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5114
5115         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
5116         decode_klass_info.
5117
5118         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
5119         encode_klass_info.
5120         (compile_method): Enable generic sharing.
5121
5122 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
5123
5124         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
5125         (mini_method_compile): Add preliminary support for AOTing shared generic code.
5126
5127         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
5128         generic code.
5129
5130         * mini-trampolines.c: Fix a warning.
5131
5132         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
5133         NEW_PCONST.
5134         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
5135         (generic_class_is_reference_type): Remove unused function.
5136
5137         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
5138         in the generic vtable trampoline case.
5139
5140         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
5141         
5142         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
5143         return an AOT method based on a vtable slot.
5144
5145         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
5146
5147         * mini.c (mini_get_vtable_trampoline): Export this.
5148
5149 2007-11-22  Martin Baulig  <martin@ximian.com>
5150
5151         * debug-debugger.h
5152         (MonoDebuggerInfo): Move `debugger_version' up.
5153
5154 2007-11-22  Martin Baulig  <martin@ximian.com>
5155
5156         * mini-amd64.c
5157         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
5158
5159         * mini-trampolines.c
5160         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
5161         after compiling the method.
5162
5163 2007-11-20  Martin Baulig  <martin@ximian.com>
5164
5165         * debug-mini.c
5166         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
5167         (mono_debugger_remove_breakpoint): Likewise.
5168         (mono_debugger_check_breakpoints): Likewise.
5169
5170         * debug-debugger.c: Implement the new breakpoint interface here.
5171
5172 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
5173
5174         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
5175         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
5176
5177         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
5178
5179 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
5180
5181         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
5182
5183         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
5184         mini.c.
5185
5186         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
5187         mini.c.
5188
5189         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
5190         returning a vtype in a register.
5191
5192         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
5193         here from the arch specific code.
5194
5195         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
5196         mini.c.
5197
5198         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
5199         (mono_arch_emit_prolog): Increment maximum prolog size.
5200
5201         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
5202         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
5203
5204         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
5205         MonoGenericSharingContext.
5206
5207         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
5208         MonoGenericSharingContext. Allocate memory from the cfg mempool.
5209
5210 2007-11-15  Mark Probst  <mark.probst@gmail.com>
5211
5212         * mini.c, mini.h, generic-sharing.c: Functions for producing code
5213         which extract fields out of the runtime generic context.  Full
5214         sharing of the NEWARR opcode.
5215
5216 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
5217
5218         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
5219         --enable-minimal=ssa.
5220
5221 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
5222
5223         * mini-trampolines.c (mono_delegate_trampoline): Update after 
5224         mono_marshal_get_delegate_invoke () signature change.
5225
5226 2007-11-13  Mark Probst  <mark.probst@gmail.com>
5227
5228         * mini.c: Removed the shared context in favor of the generic
5229         sharing context.  Allocate the MonoJitInfo structure with room for
5230         the generic sharing context if it's needed.
5231
5232         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
5233         domain-internals.h now.
5234
5235         * mini-x86.c: Pass the generic sharing context to get_call_info ().
5236
5237         * generic-sharing.c: Several changes for working without a shared
5238         context and instead operating on open types instead.
5239
5240 2007-11-12  David S. Miller  <davem@davemloft.net>
5241
5242        * inssel-sparc.brg: Fix double instruction emit.
5243
5244 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
5245
5246         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
5247         Get/Set/Address methods.
5248         
5249         * mini.c debug-debugger.c mini-trampolines.c: Update after 
5250         mono_marshal_get_delegate_invoke signature change.
5251
5252 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5253
5254         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
5255         This can happens with dynamic methods. Fixes the other bug in #322722.
5256
5257 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5258
5259         * tramp-arm.c (mono_arch_patch_callsite): Support patching
5260         BX call sequence.
5261
5262         * mini-arm.c (arm_patch): Implement patching of BX call
5263         sequence. Fixes one of the bugs in #322722.
5264
5265 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
5266
5267        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
5268        under Linux.  We only need to flush every 32-byte cache line.    
5269
5270 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
5271
5272         * mini.c:
5273         move_basic_block_to_end: Add branches when needed, eventually creating
5274         a new BB.
5275         optimize_branches: added a parameter that tells if it's ok to create
5276         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
5277         and avoid calling move_basic_block_to_end when it's not ok.
5278         Fixes bug 318677.
5279
5280 2007-11-07  Mark Probst  <mark.probst@gmail.com>
5281
5282         * mini.c: Abort inlining call to InitializeArray if something
5283         looks wrong.  Let the icall handle it, which now has proper safety
5284         checks.
5285
5286 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5287
5288         * mini.c (mono_spill_call): add support for soft-float.
5289
5290         * mini.c (mono_method_to_ir): add support for soft-float
5291         to inlined functions that return float.
5292
5293         * mini.c (mono_method_to_ir): add support for soft-float
5294         to cee_stsfld opcode on float fields.
5295
5296 2007-11-05  Geoff Norton  <gnorton@novell.com>
5297
5298         * mini-x86.h: Fix the structure access for X86 Leopard.
5299
5300
5301 2007-11-05  Martin Baulig  <martin@ximian.com>
5302
5303         * mini-trampolines.c
5304         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
5305         after compiling the method to notify the debugger.
5306
5307 2007-11-05  Martin Baulig  <martin@ximian.com>
5308
5309         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
5310
5311 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
5312
5313         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
5314         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
5315
5316 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
5317
5318         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
5319         native-to-managed wrappers.
5320         
5321 2007-11-01  Geoff Norton  <gnorton@novell.com>
5322
5323         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
5324         members.
5325
5326 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5327
5328         * mini.c, mini-x86.c: when getting back from unmanaged code
5329         to managed via a marshaled delegate we also need to set the
5330         right domain.
5331
5332 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5333
5334         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
5335         for amd64.
5336
5337 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
5338
5339         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
5340         let the debugger or other external agents to tell the JIT when
5341         a sw breakpoint has been inserted in the code that the JIT needs
5342         to be able to inspect.
5343
5344 2007-10-31  Martin Baulig  <martin@ximian.com>
5345
5346         * debug-debugger.h
5347         (MonoDebuggerInfo): Remove `runtime_class_init'.
5348
5349 2007-10-30  Martin Baulig  <martin@ximian.com>
5350
5351         * debug-mini.h
5352         (mono_debugger_thread_created): Added `MonoThread *' argument.
5353         (mono_debugger_extended_notification): New public method.
5354         (mono_debugger_trampoline_compiled): New public method.
5355
5356         * debug-mini.c
5357         (MonoDebuggerThreadInfo): Added `thread' and
5358         `extended_notifications' fields.
5359
5360         * debug-debugger.c
5361         (debugger_executable_code_buffer): New static variable.
5362
5363         * debug-debugger.h
5364         (MonoDebuggerInfo): Added `executable_code_buffer',
5365         `executable_code_buffer_size', `breakpoint_info_area',
5366         `breakpoint_table' and `breakpoint_table_size'.
5367
5368 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
5369
5370         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
5371         that IP  either is an unused value or the vtable pointer. IMT 
5372         calls use vtable + offset now. Reduced by almost half the size
5373         of IMT entries.
5374
5375 2007-10-26  Jonathan Chambers <joncham@gmail.com>
5376
5377         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
5378         defines to access param registers. Replace long usage with
5379         gsize as sizeof(long) != sizeof(void*) on Win64.
5380
5381         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
5382         on Win64. Fix intrinsic, use _AddressOfReturnAddress
5383         instead of non-existant _GetAddressOfReturnAddress.
5384
5385         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
5386         param registers. Save/restore %rdi and %rsi in MonoLMF.
5387
5388         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
5389         param registers. Modify (throw_exception) signature to take 
5390         %rdi and %rsi on Win64. 
5391
5392         Code is contributed under MIT/X11 license.
5393
5394 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5395
5396         * helpers.c: unlink debugging output files.
5397
5398 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
5399
5400         * mini.c: Move mono_create_ftnptr () to object.c.
5401
5402 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5403
5404         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
5405         optional. This function can now be used to disassemble code generated
5406         outside the JIT such as trampolines and IMT thunks.
5407
5408         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
5409
5410         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
5411         vtable pointer from a ldr instruction.
5412
5413         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
5414         new IMT call sequence.
5415
5416         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
5417         call sequence for interface invocations.
5418
5419         * mini-arm.c (mono_arch_emit_imt_argument): added, required
5420         for imt support. This function is empty since IMT on ARM requires no
5421         special handling on the IR side.
5422
5423         * mini-arm.c (mono_arch_find_imt_method): added, required for
5424         imt support.
5425
5426         * mini-arm.c (mono_arch_find_this_argument): added, required
5427         for imt support.
5428
5429         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
5430         a ldr instruction to load a value stored in the code stream.
5431
5432         * mini-arm.c (mono_arch_build_imt_thunk):added, required
5433         for imt support.
5434
5435
5436 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
5437
5438         * mini.c (mini_init): Install the jump trampoline callback.
5439
5440 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5441
5442         * mini-trampolines.c: handle synchronized methods with the common
5443         vtable trampoline (bug #335601).
5444
5445 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
5446
5447         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
5448
5449         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
5450         64 bit platforms.
5451
5452         * mini-ia64.h mini-ia64.c: Add support for IMT.
5453
5454         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
5455         prolog. Fixes #331958.
5456
5457 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
5458
5459         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
5460
5461 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5462
5463         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
5464         trampoline.
5465
5466 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5467
5468         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
5469         trampoline.
5470
5471 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
5472
5473         * mini-x86.c, mini-x86.h: x86 support for the common vtable
5474         trampoline.
5475
5476 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
5477
5478         * mini-trampolines.c: changed the magic rampoline to understand
5479         the common vtable trampoline method: the method to invoke is
5480         determined by the vtable displacement of the call.
5481
5482 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5483
5484         * mini.c, mini.h: register the common vtable trampoline if the
5485         architecture supports it.
5486
5487 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5488
5489         * cpu-amd64.md: use the correct max length for tls_get.
5490
5491 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
5492
5493         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
5494         CEE_STELEM_ANY. Fixes #333696.
5495
5496 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5497
5498         * exceptions-x86.c: provide more graceful handling of the case where
5499         we followed a bogus function pointer from managed code (bug #332866).
5500
5501 2007-10-11  Mark Probst  <mark.probst@gmail.com>
5502
5503         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
5504         replaces the generic_shared flag and will carry more information
5505         in the future.
5506
5507         * generic-sharing.c: Added mini_type_stack_size() which allows
5508         allows open types if given a generic sharing context.
5509         mini_get_basic_type_from_generic() takes a
5510         MonoGenericSharingContext* instead of a MonoCompile* now.
5511
5512         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
5513         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
5514         mini-sparc.c, mini-x86.c: Trivial changes required by the two
5515         changes above.  Just passing arguments through to the right
5516         places.
5517
5518 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5519
5520         * mini-arm.c: unify the call emission to emit_code_seq().
5521
5522 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
5523
5524         * tramp-arm.c: reduced the trampoline size.
5525
5526 2007-10-10  Mark Probst  <mark.probst@gmail.com>
5527
5528         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
5529         variable handling out of arch-specific code.
5530
5531 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
5532
5533         * mini-arm.c: implemented fast delegate dispatch.
5534
5535 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
5536
5537         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
5538         that fp elimination is turned off if the space required by locals is too
5539         big. Fixes #331958.
5540
5541 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5542
5543         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
5544         ARM to the new style trampoline.
5545
5546 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
5547
5548         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
5549
5550         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
5551
5552 2007-10-09  Martin Baulig  <martin@ximian.com>
5553
5554         * debug-debugger.h
5555         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
5556         `field_info_offset_offset'.     
5557
5558 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
5559
5560         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
5561         removed more internal usage of the r11 register and made it available
5562         to the register allocator.
5563
5564 2007-10-08  Mark Probst  <mark.probst@gmail.com>
5565
5566         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
5567         when sharing generics and treat type variables as references.
5568
5569 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5570
5571         * mini-ppc.c: started removing the internal uses of register r11
5572         to eventually allow the register allocator to manage it as an
5573         additional available register.
5574
5575 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5576
5577         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
5578
5579 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
5580
5581         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
5582         specific trampolines as they are not performance critical as a jump
5583         target (maybe align as before only for AOT code?). This saves about
5584         200 KB of native code on x86 for monodevelop startup.
5585
5586 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
5587
5588         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
5589         monodevelop startup.
5590
5591 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
5592
5593         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
5594
5595         * mini-sparc.h mini-sparc.c: Implement IMT support.
5596
5597         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
5598         its smaller and doesn't clobber sparc_g1.
5599
5600         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
5601
5602 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
5603
5604         * mini-ppc.c: optimized the size of the IMT thunks a bit.
5605
5606 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5607
5608         * mini-ppc.c: implemented fast delegate invocation.
5609
5610 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
5611
5612         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
5613
5614 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5615
5616         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
5617         code to the new style trampoline in preparation for IMT support.
5618
5619 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
5620
5621         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
5622         systems already. This also reduces the specific trampiline sizes and
5623         prepares for the use of r12 as the IMT identifier register.
5624
5625 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5626
5627         * mini-mips.h: endianess fix (simplified from a patch by
5628         Thomas Kunze <thommy@tabao.de>, bug #323737).
5629
5630 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5631
5632         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
5633         to access ucontext fields and enable netbsd support
5634         (partially from Magnus Henoch <mange@freemail.hu>).
5635
5636 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5637
5638         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
5639         use the preprocessor from the CPP env var if it is set.
5640
5641 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5642
5643         * mini-trampolines.c: fixed an assertion and moved it earlier in the
5644         code, before interface_offset gets used.
5645
5646 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
5647
5648         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
5649         mono_class_setup_vtable () before accessing klass->vtable.
5650
5651 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
5652
5653         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
5654         hackish.
5655
5656 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5657
5658         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
5659         IMT slots (this saves hundreds of KB of memory in programs like
5660         IronPython and Monodevelop).
5661
5662 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5663
5664         * mini.c: print the delegate counter.
5665
5666 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
5667
5668         * mini-x86.c: make it easier to enable the debugging code for IMT
5669         slots.
5670
5671 2007-09-28  Martin Baulig  <martin@ximian.com>
5672
5673         * debug-debugger.h
5674         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
5675         `mono_method_klass_offset' and `mono_method_token_offset'.
5676
5677 2007-09-20  Mark Probst  <mark.probst@gmail.com>
5678
5679         * mini.c: First generics sharing implementation.  Can only share
5680         in very simple cases.  If sharing doesn't work it falls back to
5681         dedicated compilation.
5682
5683         * mini.h: Flag in MonoCompile to specify whether generic
5684         compilation is shared.  Flags enum for marking which generic inst
5685         of a context is used.  Prototypes for helper functions.
5686
5687         * generic-sharing.c: Helper functions for generic method sharing.
5688
5689         * optflags-def.h: Optimization flag (gshared) for enabling generic
5690         method sharing added.
5691
5692         * Makefile.am: generic-sharing.c added.
5693
5694 2007-09-19 Daniel Nauck <dna@mono-project.de>
5695
5696         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
5697
5698 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
5699         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
5700         fixes bug 325507.
5701
5702 2007-09-19  Martin Baulig  <martin@ximian.com>
5703
5704         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
5705         mono_debug_cleanup() is now part of mono_cleanup().
5706
5707 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
5708
5709         * driver.c (mono_main): Fix a warning.
5710
5711 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
5712
5713         * aot-compiler.c: Optimize various parts when processing large assemblies.
5714         Fixes ##325568.
5715
5716         * mini.c (mono_patch_info_hash): Improve hash function.
5717
5718 2007-09-14  Jonathan Chambers <joncham@gmail.com>
5719
5720         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
5721         
5722         Code is contributed under MIT/X11 license.
5723
5724 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5725
5726         * mini.c (mini_init): Fix a leak.
5727
5728         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
5729
5730 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5731
5732         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
5733
5734 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5735
5736         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
5737
5738 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
5739
5740         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
5741         variance tests.
5742
5743         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
5744
5745         * mini.c (handle_alloc): Enable managed allocators in AOT code.
5746
5747         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
5748
5749         * aot-runtime.c (decode_patch_info): Ditto.
5750
5751 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5752
5753         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
5754         static case. Cache delegates in architecture specific code, 
5755         based on number of parameters.
5756         
5757         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
5758         in architecture specific code, based on number of parameters.
5759         
5760         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
5761         caching happen in architecture specific code now.
5762         
5763         Code is contributed under MIT/X11 license.
5764
5765 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5766
5767         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
5768         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
5769         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
5770
5771         Code is contributed under MIT/X11 license.
5772
5773 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5774         * mini.c: (mono_thread_abort) Fixed bug #82416.
5775
5776 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5777
5778         * mini.: hook the new managed GC allocation feature into the JIT.
5779
5780 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5781
5782         * mini.c: implementation for the new runtime tls opcode.
5783
5784 2007-09-11  Martin Baulig  <martin@ximian.com>
5785
5786         * debug-debugger.h
5787         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
5788         `mono_method_inflated_offset'.
5789
5790 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
5791
5792         * driver.c mini.h mini.c: Add a new devel command line option for injecting
5793         async exceptions into a method.
5794
5795         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
5796         purpose of testing whenever the unwinder works at every instruction.
5797
5798 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
5799
5800         * mini.c: check accessibility of method used in ldftn (fixes
5801         bug #82635).
5802
5803 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
5804
5805         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
5806
5807         * inssel.brg: Fix a warning.
5808
5809 2007-09-03  Martin Baulig  <martin@ximian.com>
5810
5811         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
5812         now takes the `main_method' as argument.
5813
5814 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
5815
5816         * cpu-sparc.md (endfilter): Add missing src1:i argument.
5817
5818 2007-08-30  Jonathan Chambers <joncham@gmail.com>
5819
5820         * driver.c: include the cil-coff.h header on Windows.
5821         
5822         Code is contributed under MIT/X11 license.
5823
5824 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5825
5826         * mini.c, driver.c: don't include the cil-coff.h header.
5827
5828 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5829
5830         * mini.c: flag places that needs fixes fo soft-float support.
5831
5832 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
5833
5834         * mini.h, inssel-float.brg: fix soft-float constant loads on big
5835         endian systems (partially from Dean Jenkins, bug #81924).
5836
5837 2007-08-28  Mark Probst  <mark.probst@gmail.com>
5838
5839         * mini.c (check_linkdemand): Remove embedded reference object in
5840         call to LinkDemandSecurityException.
5841         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
5842         with an IntPtr instead of a reference object.
5843
5844 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
5845
5846         * mini.c (handle_initobj): Handle alignment properly.
5847
5848         * inssel.brg (mini_emit_memset): Ditto. 
5849
5850         * inssel.brg (mini_emit_memcpy): Ditto. 
5851
5852         * inssel-sparc.brg: Ditto.              
5853
5854         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
5855
5856 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
5857
5858         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
5859         exceptions raised in unmanaged code. Fixes part of #82594.
5860
5861 2007-08-24  Mark Probst  <mark.probst@gmail.com>
5862
5863         * mini.c (mono_method_to_ir), declsec.c
5864         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
5865
5866 2007-08-22  Martin Baulig  <martin@ximian.com>
5867
5868         * debug-mini.h
5869         (MonoDebuggerThreadInfo): New typedef.
5870         (mono_debugger_thread_table): New global variable.
5871         (mono_debugger_thread_created): New public function.
5872         (mono_debugger_thread_cleanup): New public function.
5873
5874         * debug-debugger.h
5875         (MonoDebuggerInfo):
5876         - removed `get_current_thread' and `lookup_assembly'.
5877         - removed `data_table'.
5878         - added `thread_table'.
5879
5880         * mini.c
5881         (mono_thread_start_cb): Call mono_debugger_thread_created().
5882         (mono_thread_attach_cb): Likewise.
5883         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
5884         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
5885         initial domain.
5886
5887         * driver.c (mono_main): Move mono_debug_init() up, before calling
5888         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
5889
5890 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5891
5892         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
5893         together when passing several arguments of type double (gives a small
5894         speedup and saves a few bytes of generated code).
5895
5896 2007-08-20  Jb Evain  <jbevain@novell.com>
5897
5898         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
5899
5900 2007-08-20  Jb Evain  <jbevain@novell.com>
5901
5902         * mini.c (mono_method_to_ir): throw MethodAccessException
5903         and FieldAccessException instead of InvalidProgramException.
5904
5905 2007-08-20  Mark Probst  <mark.probst@gmail.com>
5906
5907         * mini.c: CoreCLR security checks.
5908
5909         * mini.h: Removed MonoSecurityMode (moved to
5910         metadata/security-manager.h) and mono_security_mode global var
5911         (replaced by set/get functions in security-manager.h).
5912
5913         * driver.c: Added "core-clr-test" security mode for testing.  Used
5914         set-function for setting security mode.
5915
5916 2007-08-17  Mark Probst  <mark.probst@gmail.com>
5917
5918         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
5919         the new jit_info_table.
5920
5921         * driver.c: Test code for the new jit_info_table (enabled by the
5922         define MONO_JIT_INFO_TABLE_TEST).
5923
5924 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
5925
5926         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
5927         detection of call <REG> instruction sequence. Fixes build on freebsd.
5928
5929 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
5930
5931         * mini-exceptions.c: Fix a warning.
5932
5933 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
5934
5935         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
5936         stack overflow handling code on amd64 too.
5937
5938         * mini-exceptions.c (mono_setup_altstack): Make this use 
5939         mono_thread_get_stack_bounds ().
5940
5941         * mini-x86.h: Disable sigaltstack on solaris x86.
5942
5943 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
5944
5945         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
5946
5947 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
5948
5949         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
5950
5951 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
5952
5953         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
5954
5955         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
5956
5957 2007-08-03  Neale Ferguson <neale@sinenomine.net>
5958
5959         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
5960         due to alignment.
5961
5962 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5963
5964         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
5965         to be emitted (bug #82281).
5966
5967 2007-08-01  Martin Baulig  <martin@ximian.com>
5968
5969         Merged the `debugger-dublin' branch.
5970
5971         * debug-debugger.h (MonoDebuggerInfo):
5972         Removed the `old_*' compatibility entries.
5973         Added `debugger_version' and `data_table'.
5974         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
5975         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
5976
5977         * debug-mini.c
5978         (MiniDebugMethodBreakpointInfo): Add `address_list'.
5979         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
5980         instead of a `gconstpointer'.
5981         (mono_debugger_insert_method_breakpoint): Return a
5982         `MonoDebugMethodAddressList *'.
5983
5984 2007-06-28  Martin Baulig  <martin@ximian.com>
5985
5986         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5987
5988 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
5989
5990         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
5991         __builtin_frame_address () since it is broken on older gcc versions.
5992
5993 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5994
5995         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
5996         on the stack overflow handling and made the managed stack overflows
5997         catchable in most cases using soft guard pages.
5998         * exceptions-x86.c: added code to restore the protection in the soft
5999         guard pages at the end of exception handling.
6000
6001 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
6002
6003         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
6004
6005 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6006
6007         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
6008         exception handling.
6009
6010 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6011
6012         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
6013         signal handling support until it has been ported to the new mechanism.
6014         * mini.c: fixed stack overflow detection and use the new
6015         architecture code  to handle signals on the altstack.
6016
6017 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
6018
6019         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
6020         stack overflows on the alt stack.
6021
6022 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
6023
6024         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
6025         stack overflows on the alt stack.
6026
6027 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
6028
6029         * exceptions-ppc.c: cleanup preparing for altstack support.
6030
6031 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6032
6033         * exceptions-arm.c: cleanup preparing for altstack support.
6034
6035 2007-07-27  Mark Probst  <mark.probst@gmail.com>
6036
6037         * mini.c (print_jit_stats): Output hazard pointer stats.
6038
6039 2007-07-26  Mark Probst  <mark.probst@gmail.com>
6040
6041         * driver.c, mini.c: Replaced security mode flags with a single
6042         enum variable.
6043
6044 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6045
6046         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
6047
6048 2007-07-25  Mark Probst  <mark.probst@gmail.com>
6049
6050         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
6051         (which doesn't do anything yet) for activating Core CLR
6052         (Silverlight) security.
6053
6054 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
6055
6056         * mini-codegen.c: work around a possible gcc bug on arm.
6057
6058 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6059
6060         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
6061         message for platforms that don't support AOT compilation.
6062
6063 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6064
6065         * mini.h, mini.c, driver.c: temporary smcs hack.
6066
6067 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
6068
6069         * mini-arm.h, mini-arm.c: arm EABI fixes.
6070
6071 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
6072
6073         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
6074         case.
6075
6076         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
6077         trampolines taking a method argument.
6078
6079         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
6080
6081         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
6082         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
6083
6084         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
6085         JIT compilation throws an exception. Fixes #82050.
6086
6087 2007-07-19  Mark Probst  <mark.probst@gmail.com>
6088
6089         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
6090         with the MONO_EXCEPTION_ defines.
6091
6092 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
6093
6094         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
6095         #82117.
6096         
6097         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
6098         the cause of an assertion.
6099
6100 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
6101
6102         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
6103         removed.
6104
6105 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
6106
6107         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
6108         assert. Should fix #82103.
6109
6110 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
6111
6112         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
6113         here too. Fixes #82095.
6114
6115         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
6116         addresses.
6117
6118         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
6119
6120         * mini-amd64.h: Enable IMT for amd64.
6121         
6122         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
6123
6124 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
6125
6126         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
6127
6128 2007-07-12  Mark Probst  <mark.probst@gmail.com>
6129
6130         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
6131         as soon as check_linkdemand sets an exception_type.
6132
6133 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6134
6135         * mini-x86.c: fixed offsets for IMT call sequence.
6136         * mini-x86.h: enable IMT again.
6137
6138 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6139
6140         * trace.c (mono_trace_enter_method): Decode MonoType too.
6141
6142         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
6143
6144         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
6145
6146         * mini-amd64.c: Add preliminary IMT implementation.
6147         
6148 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6149
6150         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
6151         understand the new IMT-base interface invocation (thanks to
6152         Daniel Nauck for the report and the remote debugging session).
6153
6154 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6155
6156         * mini-x86.c: size and speed optimizations for the IMT bsearch.
6157
6158 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6159
6160         * Makefile.am (aotcheck): Make this actually use the AOTed code.
6161
6162 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
6163
6164         * mini-trampolines.c: implement AOT IMT support.
6165         * mini-x86.h: enable IMT support for wider testing.
6166
6167 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6168
6169         * inssel.brg (emit_imt_argument): Add aot support here.
6170
6171         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
6172
6173 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6174
6175         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
6176         of the IMT implementation, partially from massi, with my
6177         implementation of the bsearch sequence. Disabled by default until
6178         the AOT code is implemented.
6179
6180 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6181
6182         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
6183
6184         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
6185
6186 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6187
6188         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
6189         arch-independent IMT JIT code from Massimiliano
6190         Mantione (massi@ximian.com) with small cleanups from me.
6191
6192 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6193
6194         * Makefile.am: fix svn invocation to get the svn revision to be
6195         independent of the local language (build fix).
6196
6197 2007-07-09  Mark Probst  <mark.probst@gmail.com>
6198
6199         * mini.c (inline_method): Reset cfg->exception_type if the
6200         inlining is aborted.  Fixes: 82049.
6201
6202 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
6203
6204         * mini.c: remove assert from exception handling code when exception_ptr
6205         is not set.
6206
6207 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
6208
6209         * mini.c (mono_codegen): Add an assert.
6210
6211         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
6212         enter and leave code.
6213         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
6214
6215 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6216
6217         * mini-ppc.c: fixed memory corruption for localloc(0)
6218         (bug #81852).
6219
6220 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
6221         
6222         * mini.c: Fix warnings.
6223
6224 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
6225
6226         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
6227         to emit better double->int conversions.
6228
6229 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6230
6231         * mini.c: the provided Min/Max optimizations are valid for unisgned
6232         ints.
6233
6234 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
6235
6236         * mini.c (can_access_method, can_access_field): methods moved to metadata/class.c and renamed to mono_method_can_access_method and mono_method_can_acesss_field
6237
6238 2007-06-28  Miguel de Icaza  <miguel@novell.com>
6239
6240         * mini.c (mono_running_on_valgrind): Add support for reporting the
6241         method and  its boundaries to valgrind.
6242
6243 2007-06-28  Martin Baulig  <martin@ximian.com>
6244
6245         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6246
6247 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
6248
6249         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
6250
6251         * generic.2.cs: Add new test case.
6252
6253 2007-06-25  Martin Baulig  <martin@ximian.com>
6254
6255         Merged the `debugger-dublin' branch.
6256
6257         * debug-mini.c
6258         (mono_debugger_insert_method_breakpoint): New public method.
6259         (mono_debugger_remove_method_breakpoint): Likewise.
6260         (mono_debugger_check_breakpoints): New static method.
6261         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
6262
6263         * debug-debugger.h (MonoDebuggerInfo):
6264         Renamed (to keep backward compatibility in the vtable):
6265         `insert_breakpoint' -> `old_insert_breakpoint'.
6266         `remove_breakpoint' -> `old_remove_breakpoint'.
6267         `create_string' -> `old_create_string'.
6268         `lookup_class' -> `old_lookup_class'.
6269         `lookup_type' -> removed; changed into a dummy field.
6270         `lookup_assembly' -> `old_lookup_assembly'.
6271         Added (same functionality, but different signature):
6272         `create_string', `lookup_class', `lookup_assembly'
6273         Added new:
6274         `get_method_addr_or_bpt', `remove_method_breakpoint',
6275         `runtime_class_init'.
6276
6277         * debug-debugger.c: Merged the `debugger-dublin' branch.
6278
6279 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
6280
6281         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
6282         well.
6283         (peephole_pass): Likewise.
6284
6285 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
6286
6287         * driver.c: hopefully make setaffinity work also for ancient
6288         versions of linux.
6289
6290 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
6291
6292         * driver.c : win32 build fix.
6293
6294 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6295
6296         * driver.c: check for the MONO_NO_SMP env var and bind to a single
6297         processor if it is set.
6298
6299 2007-06-21  Martin Baulig  <martin@ximian.com>
6300
6301         * debug-mini.h: New file.
6302
6303         * debug-mini.c
6304         (mono_debugger_insert_breakpoint_full): Moved here from
6305         ../metadata/mono-debug-debugger.c.
6306         (mono_debugger_remove_breakpoint): Likewise.
6307         (mono_debugger_breakpoint_callback): Likewise.
6308
6309 2007-06-15  Raja R Harinath  <rharinath@novell.com>
6310
6311         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6312         changes in MonoGenericClass.
6313
6314 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
6315
6316         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
6317
6318 2007-06-14  Raja R Harinath  <rharinath@novell.com>
6319
6320         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6321         removal of MonoGenericMethod.
6322
6323 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6324
6325         * mini-exceptions.c: hooks for the exception events profiling API.
6326
6327 2007-06-14  Randolph Chung  <tausq@debian.org>
6328
6329         * Makefile.ma: Add hppa target.
6330         * mini-arch.h: Include mini-hppa.h
6331         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
6332         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
6333         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6334
6335 2007-06-14  Randolph Chung  <tausq@debian.org>
6336
6337         * inssel.brg: Add rules for "chained" compare-branch operations so that
6338         a single compare op can affect multiple branches.  Adjust cost for
6339         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
6340         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
6341         cost for some rules so that they can more easily be overridden by
6342         per-arch rules (with fixes from lupus).
6343         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6344
6345 2007-06-13  Randolph Chung  <tausq@debian.org>
6346
6347         * mini-ops.h: Reorder branch ops so that they match the order of the
6348         corresponding CEE_* ops.  The code expects them this way.
6349         Add new ops for HPPA target.
6350         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6351
6352 2007-06-13  Randolph Chung  <tausq@debian.org>
6353
6354         * mini-exceptions.c: Handle cases where the stack grows towards
6355         larger addresses.
6356         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6357
6358 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6359
6360         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
6361         counter.
6362         * driver.c: explain where a non-matching corlib is found.
6363
6364 2007-06-13  Mark Probst  <mark.probst@gmail.com>
6365
6366         * mini.c (print_jit_stats): Output dynamic code allocation stats.
6367
6368 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
6369
6370         * mini-exceptions.c: Generate a method profile leave event during
6371         an exception to ensure that the profiler gets notified.
6372
6373 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
6374
6375         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
6376         branch.
6377
6378         * cpu-amd64.md: Add long_and/or/xor opcodes.
6379
6380 2007-06-06  Wade Berrier  <wberrier@novell.com>
6381
6382         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
6383         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
6384         length of instruction shr_imm (expected 8, got 10)
6385
6386 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
6387
6388         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
6389
6390 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6391
6392         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6393         MonoInternalHashTable again (fixed bug in the internal hash table
6394         code).
6395
6396 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6397
6398         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
6399         Have to figure out what makes it crash the SWF regression.
6400
6401 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
6402
6403         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
6404
6405 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6406
6407         * mini.c: optimize out the type check when storing null in a
6408         reference array.
6409
6410 2007-06-04  Mark Probst  <mark.probst@gmail.com>
6411
6412         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6413         MonoInternalHashTable.
6414
6415 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6416
6417         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
6418         signed integer methods.
6419
6420 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
6421
6422         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
6423         permanently since the current approach doesn't work.
6424
6425 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
6426
6427         * inssel.brg (stmt): Only call delegate->invoke_impl if 
6428         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
6429
6430 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
6431
6432         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
6433         the sreg2==rdx case.
6434         
6435         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
6436         account if it contains a rex prefix.
6437         (peephole_pass): Handle OP_FMOVE as well.
6438
6439 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
6440
6441         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
6442         as it causes regressions.
6443
6444 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
6445
6446         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
6447         static case as well.
6448
6449         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
6450
6451         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6452         (mono_arch_get_this_arg_from_call): Ditto.
6453
6454         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
6455
6456         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
6457         invoke_impl field.
6458
6459         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6460         (mono_arch_get_this_arg_from_call): Ditto.
6461
6462         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
6463         
6464         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
6465         try to create optimized invoke code and use that for further invocations. 
6466         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
6467
6468         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
6469
6470 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
6471
6472         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
6473         sealed classes or methods.
6474         *devirtualization.cs: tests for the new optimization
6475
6476 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
6477
6478         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
6479         by the update_volatile () function.
6480
6481 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
6482
6483         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
6484         require it.
6485
6486         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
6487
6488 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
6489
6490         * mini.c: Add configure checks for header files.
6491         * mini-x86.c: Add configure checks for header files.
6492         * trace.c: Add configure checks for header files.
6493         * aot-runtime.c: Add configure checks for header files.
6494         * aot-compiler.c: Add configure checks for header files.
6495         * driver.c: Add configure checks for header files.
6496         * mini-codegen.c: Add configure checks for header files.
6497         
6498         Code is contributed under MIT/X11 license.
6499
6500 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
6501
6502         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
6503         icompare_imm -128 + op_iclt. Fixes #81703.
6504
6505 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
6506
6507         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
6508
6509 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
6510
6511         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
6512         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
6513         so that all isinst checks now use "interface_bitmap".
6514
6515 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
6516
6517         * cpu-amd64.md (jmp): Fix a warning.
6518
6519         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
6520
6521         * basic.cs: Add new regression test.
6522
6523         * basic.cs: Remove test which is now in basic-long.cs.
6524
6525         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
6526
6527         * basic-long.cs: Add new test.
6528         
6529 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
6530
6531         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
6532
6533 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
6534
6535         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
6536
6537         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
6538         places.
6539         
6540         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
6541         throwing code a bit.
6542
6543         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
6544         the exception throwing code a bit.
6545
6546         * mini-x86.c (get_call_info): Allocate result from a mempool.
6547
6548 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
6549
6550         * aot-compiler.c (find_typespec_for_class): Fix the assert.
6551
6552         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
6553
6554         * mini.h (MonoCompile): Add 'token_info_hash' field.
6555
6556         * mini.c: Save token->method associations during compilation so the AOT 
6557         compiler can use it.
6558         
6559         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
6560         which reference generic classes and methods.
6561
6562 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
6563
6564         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
6565
6566         * aot-compiler.c (compile_method): Fix a typo in a comment.
6567
6568         * aot-runtime.c (decode_cached_class_info): Skip generic types.
6569
6570         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
6571         everything generic.
6572
6573         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
6574
6575 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
6576
6577         * mini.h (MonoCompile): Add 'args' field.
6578
6579         * mini.c (mono_compile_create_vars): Store variables representing the arguments
6580         into cfg->args.
6581
6582         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
6583
6584 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
6585
6586         * mini.c (mono_compile_get_interface_var): Remove this unused function.
6587
6588         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
6589
6590         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
6591         opcodes for some opcodes.
6592
6593         * mini.h *.brg *.c: Use the new opcodes.
6594
6595 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
6596
6597         * mini.h: Bumped aot revision.
6598
6599         * inssel.brg: modified code generation of type checks for interfaces
6600         to use the new "MonoClass.interface_bitmap" instead of the old
6601         "MonoClass.interface_offsets".
6602
6603 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
6604
6605         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
6606
6607 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
6608
6609         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
6610         64 bit platforms.
6611
6612 2007-04-27  Neale Ferguson <neale@sinenomine.net>
6613
6614         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
6615
6616 2007-04-27  Wade Berrier  <wberrier@novell.com>
6617
6618         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
6619         mini.h) to fix build.
6620
6621 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
6622
6623         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
6624         
6625         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
6626         causes the corlib unit tests to fail.
6627
6628 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
6629
6630         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
6631
6632         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
6633
6634         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
6635         opcodes to the comparison relations.
6636
6637         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
6638         opcodes to their types.
6639         
6640         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
6641
6642         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
6643         it in cfg->arch.cinfo.
6644
6645         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
6646
6647         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
6648         cfg->cil_offset_to_bb.
6649
6650 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
6651
6652         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
6653         created becase of initlocals.
6654
6655 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
6656
6657         * mini-alpha.c cpu-alpha.md: More alpha port work from 
6658         Sergey Tikhonov <tsv@solvo.ru>.
6659
6660 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
6661
6662         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
6663
6664 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
6665
6666         * cpu-s390.md (break): Correct the length of break instruction.
6667
6668 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6669
6670         * mini.c: fix a couple of soft-float issues and comments.
6671
6672 2007-04-15  Miguel de Icaza  <miguel@novell.com>
6673
6674         * trace.c (is_filenamechar): - is also a filename char.
6675
6676 2007-04-15  Neale Ferguson <neale@sinenomine.net>
6677
6678         * mini-s390.c: Correct checking for enum type in return value processing.
6679
6680 2007-04-14  Raja R Harinath  <rharinath@novell.com>
6681
6682         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
6683         (version.h): Makefile is in the build directory.
6684
6685 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
6686
6687         * mini-amd64.h: fix for assertion failure on Solaris/amd64
6688
6689 2007-04-11  Martin Baulig  <martin@ximian.com>
6690
6691         * mini.c (can_access_member): Fix handling of generic classes;
6692         fixes #81259.
6693
6694 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
6695
6696         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
6697
6698 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
6699
6700         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
6701
6702 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6703
6704         * mini-codegen.c: make sure the right spill amount is
6705         used for fp or integer registers (fixes the float_sub_spill() on ppc).
6706
6707 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
6708
6709         * mini-ppc.c: fixes for the fp_branch_nan test.
6710
6711 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
6712
6713         * basic.cs: Comment out new test which still fails on ia64.
6714
6715 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6716
6717         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
6718
6719 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6720
6721         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
6722
6723 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
6724
6725         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
6726         on 64 bit machines. Fixes part of #80738.
6727
6728         * basic.cs: Add regression test.
6729
6730 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6731
6732         * inssel.brg basic.cs: Revert previous change to fix build.
6733
6734         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
6735         platforms.
6736         
6737         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
6738
6739         * basic.cs: Add new regression test.
6740
6741 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6742
6743         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
6744         many arguments.
6745
6746 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6747
6748         * cpu-s390x.md: Correct length of break instruction.
6749
6750 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6751
6752         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
6753         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
6754
6755 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
6756
6757         * *.c: Begin WIN64 port.
6758         * mini.c:  Use correct register in profiler.
6759         * mini-amd64.c: No inline assembly on Win64.
6760         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
6761         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
6762         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
6763         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
6764         mono_arch_ip_from_context for Win64.
6765         
6766         Contributed under MIT/X11 license.
6767
6768 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
6769
6770         * exceptions-amd64.c (seh_handler): Ditto.
6771
6772         * exceptions-x86.c (seh_handler): Fix a memory leak.
6773
6774 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
6775
6776         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
6777         mini-s390x.c: fixed peephole optimizations to deal
6778         correctly with 1 and 2 byte reload avoidance.
6779
6780 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
6781
6782         * cpu-s390.md, cpu-s390x.md: update localloc length.
6783
6784 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6785
6786         * cpu-g4.md: added missing descriptions.
6787
6788 2007-03-14  Miguel de Icaza  <miguel@novell.com>
6789
6790         *  Makefile.am: Add support so the tail tests are not executed on
6791         PowerPC as that is a known limitation of the PowerPC port.
6792
6793 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6794
6795         * runmdesc.bat:  Move to msvc directory.
6796         
6797 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6798
6799         * runmdesc.bat:  Run executable that was produced by the current
6800         target and sent via an argument.
6801         
6802 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
6803
6804         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
6805         #81102.
6806
6807         * generics.2.cs: Add regression test.
6808
6809 2007-03-09  Wade berrier  <wberrier@novell.com>
6810
6811         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
6812
6813 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
6814
6815         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
6816         AOT code depends on this.
6817
6818 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6819
6820         * mini.c: more precise tracking of types in the eval stack
6821         (part of fix for bug #81044).
6822
6823 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
6824
6825         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
6826
6827         * aot-compiler.c (encode_patch): Remove an obsolete comment.
6828
6829 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
6830
6831         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
6832
6833         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
6834
6835 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
6836
6837         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
6838         a pointer on 64 bit systems. Fixes #80190.
6839
6840         * iltests.il: Add new regression test.
6841
6842 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6843
6844         * mini.c: inline a constant for Environment.IsRunningOnWindows.
6845
6846 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
6847
6848         * trace.c: Remove an erroneous alignemnt check when tracing.
6849           Fixes --trace on OSX86.
6850
6851 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6852
6853         * mini-$(arch).h: initialize SP in context for all the archs.
6854
6855 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
6856
6857         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
6858         regressions in the thread tests.
6859
6860 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
6861
6862         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
6863         - fixed implementation of LOCALLOC opcode
6864         - implemented non-un compare for floats
6865         - code cleanup
6866         - implementation of FDIV and CKFINITE opcodes
6867         - fixes for latest mono updates
6868         - additional arch opcodes
6869
6870 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6871
6872         * Makefile.am: simplify and merge rules for cross-compilation.
6873
6874 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
6875
6876         * local-propagation.c: Actually *apply* the fix for bug 80591...
6877
6878 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6879
6880         * mini-exceptions.c: backuot part of the last change
6881         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
6882
6883 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
6884         * inssel.brg: Fix bug 59286.
6885
6886
6887 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
6888
6889         * mini-exceptions.c: patch from Zoltan to correctly check for
6890         stack boundaries (using the stack register, not the frame register),
6891         fixes bugs #80724, #79717.
6892
6893 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
6894
6895         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
6896         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
6897
6898         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
6899         presence of frame pointer elimination.
6900
6901 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
6902         
6903         * mini-x86.h: NetBSD UCONTEX_REG defines.
6904
6905 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
6906
6907         * inssel-amd64.brg: Fix amd64 build.
6908
6909 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
6910
6911         * mini.h: remove extern to workaround what looks likes gcc bug 26905
6912         on amd64.
6913
6914 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
6915
6916         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
6917         ends.
6918
6919         * mini-<ARCH>.c: Use mono_is_regsize_var ().
6920
6921 2007-01-30 Mark Mason <mason@broadcom.com>
6922
6923            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
6924            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
6925            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
6926            beginning support for CEE_JMP [not quite working yet]
6927            * tramp-mips.c: LMF handling now works
6928         
6929 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
6930
6931         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
6932
6933         * mini.h (NULLIFY_INS): New macro.
6934
6935 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6936
6937         * mini.c: statistical profiler fix for windows, patch
6938         from Tor Lillqvist (tml@novell.com).
6939
6940 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
6941         * local-propagation.c: Fix bug 80591.
6942
6943 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6944
6945         * Makefile.am: put back the --export-dynamic option as with
6946         the previous gmodule flags (thanks to Robert Jordan).
6947
6948 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
6949
6950         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
6951
6952         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
6953         simplify and speed up the local register allocator. Also rename some fields
6954         like iassign->vassign.
6955         
6956         * regalloc.c: Remove some functions which are no longer used since their
6957         inlined version is in mini-codegen.c.
6958         
6959         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
6960
6961         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
6962
6963 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
6964
6965         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
6966         narrowing. Fixes #80622.
6967
6968         * iltests.il: Add new regresssion test. 
6969
6970 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6971
6972         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
6973         debug-debugger.c, debug-debugger.h: warning fixes.
6974         * driver.c: updated copyright year and made it fit in one line.
6975
6976 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
6977
6978         * aot-runtime.c: updated to use mono-dl instead of gmodule.
6979
6980 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
6981
6982         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
6983
6984         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
6985
6986         * iltests.il: Add new test for bug #80507.
6987
6988 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6989
6990         * mini-arm.h: use soft-float also on vfp for now.
6991
6992 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6993
6994         * mini.c: fix some more soft-float issues.
6995
6996 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
6997
6998         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
6999
7000 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
7001         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
7002         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
7003         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
7004
7005 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
7006
7007         * mini-arm.c: typo fix.
7008
7009 2007-01-23  Neale Ferguson <neale@sinenomine.net>
7010
7011         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
7012
7013 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
7014
7015         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
7016         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
7017
7018         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
7019
7020         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
7021
7022         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
7023         
7024         * inssel.brg: Fix a warning.
7025
7026         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
7027
7028         * abcremoval.c ssa.c ssapre.c: Update after this change.
7029         
7030         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
7031
7032         * dominators.c (df_set): Use mono_bitset_union_fast.    
7033
7034 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7035
7036         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
7037         mini-codegen.c: reduce relocations and memory usage for the cpu
7038         description.
7039
7040 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
7041
7042         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
7043
7044         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
7045         to reduce their size.
7046
7047 2007-01-19 Mark Mason <mason@broadcom.com>
7048
7049         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
7050         * mini-mips.c: more configuration macros, support long conditional branches, additional
7051         asserts, fix epilog instrumentation.
7052         * mini-mips.h: use standard stack walk
7053         * cpu-mips.md: increase size of div, rem and conditional branches
7054         
7055 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
7056
7057         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
7058         to cpu spec data.
7059
7060 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
7061
7062         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
7063         (compile_method): Ditto.
7064
7065         * aot-runtime.c (decode_klass_info): Ditto.
7066
7067         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
7068         needed by the code generated by inssel.brg. Also fix a warning.
7069
7070 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
7071
7072         * mini.c: deal with enums that become genericinsts by
7073         being nested in a generic class (bug #79956).
7074
7075 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7076
7077         * mini.c: match the generic definition to check for
7078         private access with generic types (bug #78431).
7079
7080 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7081
7082         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
7083         to make life easier for people cross-compiling that insist on not
7084         using scratchbox.
7085
7086 2007-01-17 Mark Mason <mason@broadcom.com>
7087
7088         * inssel-long.brg: patch to deal with mips missing flags
7089         * inssel-long32-mips.brg: implement overflow checks
7090         * insset-mips.brg: implement overflow checks
7091         * mini-mips.h: implement conditional exception handling
7092         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
7093           Remove unused code, minor cleanups.
7094         * exceptions-mips.c: minor cleanups
7095         * mini-ops.h: add mips conditional exception ops
7096         * cpu-mips.md: add mips conditional exception ops
7097
7098         
7099 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7100
7101         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
7102         to deal with mips missing of flags.
7103
7104 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7105
7106         * exceptions-ppc.c: execute fault handlers.
7107
7108 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
7109
7110         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
7111
7112 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7113
7114         * mini.c: handle also floating point values in initialize_array.
7115
7116 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7117
7118         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
7119         array initialization and make it conditional on the intrins option.
7120
7121 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7122
7123         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
7124         relocations and put the patch info names close to the enum definition.
7125
7126 2007-01-15 Mark Mason <mason@broadcom.com>
7127
7128         * basic.cs, exceptions.cs: break up large tests to increase debugability.
7129
7130 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7131
7132         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
7133
7134 2007-01-12  Raja R Harinath  <rharinath@novell.com>
7135
7136         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
7137
7138 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
7139
7140         * Makefile.am: distribute the mips sources.
7141
7142 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7143
7144         * mini-codegen.h: handle bug #80489 here, by excluding ecx
7145         directly.
7146
7147 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
7148
7149         * cpu-x86.md: back out for now as this triggers other regressions.
7150
7151 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7152
7153         * cpu-x86.md: force src1 and dest regpair for long shift instructions
7154         to eax:edx, so ecx can't get allocated to them (bug #80489).
7155
7156 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
7157
7158         * mini.c, mini-exceptions.c: enabled running fault handlers
7159         (bug #80469).
7160
7161 2007-01-03  Miguel de Icaza  <miguel@novell.com>
7162
7163         * driver.c: If nothing fail, do not use the string "failed",
7164         because it makes it very annoying to view test result logs on the
7165         web. 
7166
7167 2006-12-30  Miguel de Icaza  <miguel@novell.com>
7168
7169         * debug-debugger.c (mono_debugger_main): Rename "main" to
7170         "main_method" to prevent a warning.
7171
7172         Remove a warning for unused field.
7173
7174 2006-12-28  Martin Baulig  <martin@ximian.com>
7175
7176         * debug-debugger.c
7177         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
7178
7179 2006-12-22  Martin Baulig  <martin@ximian.com>
7180
7181         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
7182         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
7183         seperate `.mdb_debug_info' section, so we can access it from the
7184         debugger even if the binary is stripped.
7185
7186         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
7187         from the `.mdb_debug_info' here to prevent the linker from
7188         removing that section.
7189
7190         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
7191         mdb-debug-info64.s.
7192
7193 2006-12-19  Robert Jordan  <robertj@gmx.net>
7194
7195         * mini-x86: enable the code to return small structures in
7196         registers for FreeBSD as well. Fixes bug #80278.
7197         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
7198
7199 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7200
7201         * mini-x86.c: align the stack when calling the profiler
7202         function instrumenting the prolog (on OSX).
7203
7204 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
7205
7206         * mini.c: emit a break opcode where Debugger.Break () is called.
7207
7208 2006-12-13  Miguel de Icaza  <miguel@novell.com>
7209
7210         * mini.c (mono_method_to_ir): Provide useful information on this
7211         assert, to prevent others from debugging like I did.
7212
7213 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7214
7215         * mini.c: enable code which was incorrectly commented
7216         (bug #80235).
7217
7218 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7219
7220         * mini-x86.c: enable on OSX, too, the code to return small
7221         structures in registers.
7222
7223 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7224
7225         * mini-x86.c: remove the use of the dynamic code manager here, too.
7226
7227 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7228
7229         * mini.h, debug-debugger.c, tramp-*.c: fixed 
7230         mono_debugger_create_notification_function() to use
7231         mono_global_codeman_reserve () instead of a dynamic code manager.
7232
7233 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
7234
7235         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
7236         ves_array_element_address() jit icall and use a generated
7237         managed method instead (which is about 4 times faster for a rank 3
7238         array access).
7239
7240 2006-11-29  Mark Mason  <mason@broadcom.com>
7241
7242         * basic-calls.cs: additional tests for passing
7243         structures as function arguments.
7244
7245 2006-11-29  Mark Mason  <mason@broadcom.com>
7246
7247         * mini-mips.h: disable custom exception handling
7248         * mini-mips.c: throw/rethrow should use jalr to call
7249         exception stubs.  Fixed bug with passing structures
7250         by value. More support for tracing floating point
7251         functions.
7252
7253 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7254
7255         * mini.c: fixed typo in the soft-float ldind.r4 handling
7256         (bug #80086).
7257
7258 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7259
7260         * mini.c, mini.h, driver.c: added --runtime command line
7261         option to select a different runtime than the autodetected one.
7262         * jit.h: added API for embedders to initialize with a specific
7263         runtime version.
7264
7265 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
7266
7267         * mini.c: handle also boxing of r4 values (bug #80024).
7268
7269 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
7270
7271         * mini-ppc.c: force indirect calls until we reserve
7272         enough address space for all the generated code.
7273
7274 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
7275
7276         * exceptions-arm.c: workaround bugs in the libc definition
7277         of struct ucontext.
7278
7279 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7280
7281         * inssel.brg: fixes from me and Mark Mason.
7282
7283 2006-11-23  Dick Porter  <dick@ximian.com>
7284
7285         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
7286         semaphore display now we've fixed the initial value
7287
7288 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7289
7290         * inssel.brg: partially revert the last change to fix the build.
7291
7292 2006-11-21  Mark Mason  <mason@broadcom.com>
7293
7294         * inssel.brg: Add and use compare-and-branch macros to support
7295         architectures that do not have condition code registers (ie. MIPS).
7296         * *-mips.{c,brg,md}: Fix copyright statements
7297
7298 2006-11-20  Mark Mason  <mason@broadcom.com>
7299
7300         * Makefile.am: remove mini-codegen.c from list of MIPS sources
7301         * mini.c: Allow GET_CONTEXT to be specified by the arch port
7302         * mini.h: Added declaration for mono_print_ins()
7303         * mini-codegen.c: added ins_spec initializer for MIPS
7304         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
7305         vreg to be virtual and hreg to be non-virtual.
7306         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
7307         is not yet working/implemented correctly.
7308         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
7309         non-static, fixup calls to print_ins() from other parts in the file.
7310
7311 2006-11-20  Mark Mason  <mason@broadcom.com>
7312
7313         * basic-calls.cs: added tests for passing structures as arguments
7314         to calls.
7315
7316 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7317
7318         * inssel-long32.brg: optimize signed division by power of two.
7319
7320 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
7321
7322         * mini-arm.c: added support for interworking with thumb code
7323         (mono must be still be built using the ARM instruction encoding).
7324
7325 2006-11-19  Miguel de Icaza  <miguel@novell.com>
7326
7327         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
7328         verifier has different rules for it.   Fixes a few verifier issues
7329         in the test suite.
7330
7331         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
7332         at the end, so people know what happened.
7333
7334 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7335
7336         * brach-opts.c: in optimize_exception_target() make sure we
7337         are in a catch clause (fixes bug #79871).
7338
7339 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7340
7341         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
7342         more soft-float support fixes.
7343
7344 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
7345
7346         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
7347         that are passed half on the stack and half in registers.
7348
7349 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
7350
7351         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
7352         more mips integration work from Mark E Mason 
7353         <mark.e.mason@broadcom.com>.
7354
7355 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7356
7357         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
7358         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
7359         tramp-mips.c: added sources for the mips port, not
7360         integrated in the build yet. Contributed by
7361         Mark E Mason <mark.e.mason@broadcom.com>.
7362
7363 2006-11-14  Neale Ferguson <neale@sinenomine.net>
7364
7365         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
7366
7367 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7368
7369         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
7370         put the soft-float rules in its own file since it seems to
7371         break s390 compilation.
7372
7373 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7374
7375         * mini-arm.c: fixed wrnings.
7376
7377 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
7378
7379         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
7380         inssel-arm.brg: ARM support for soft-float.
7381
7382 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7383
7384         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
7385         loads and stores of 32 bit fp values.
7386
7387 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
7388
7389         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
7390
7391         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
7392         works. Fixes #79852 and #79463.
7393
7394 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7395
7396         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
7397         more soft-float support WIP and fixes.
7398
7399 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
7400
7401         * mini-arm.c: some VFP updates.
7402
7403 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7404
7405         * mini-exceptions.c: 0 is a valid local var offset in some
7406         architectures, don't assert (bug #78508).
7407
7408 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
7409
7410         * exceptions-arm.c: fixed off by one error in stack walk code.
7411
7412 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
7413
7414         * mini.h, mini.c: more precise tracking of type load exceptions.
7415
7416 2006-11-03  Robert Jordan  <robertj@gmx.net>
7417
7418         * Makefile.am: [WIN32] Add monow.exe target.
7419         * driver.c: [WIN32] Don't detach the console when debugging.
7420         Fixes bug #79797.
7421         
7422 2006-10-30  Miguel de Icaza  <miguel@novell.com>
7423
7424         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
7425
7426 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
7427
7428         * aot-compiler.c (emit_method_info): Add a case missed earlier.
7429
7430         * driver.c (mini_regression): Fix --regression with AOT.
7431
7432         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
7433
7434 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
7435
7436         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
7437
7438         * mini-sparc.h: Don't use sigaction on sparc/linux.
7439
7440         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
7441
7442         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
7443
7444         * mini-exceptions.c: Add proper include files for getpid ().
7445
7446 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
7447
7448         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
7449         address instead of a MonoJitInfo* to avoid decoding the exception info for the
7450         method.
7451
7452         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
7453         name cache to reduce its size.
7454
7455         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7456
7457 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
7458
7459         * mini-x86.c: Save/restore the current LMF structure more efficiently using
7460         the mono_lmf TLS variable.
7461
7462         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
7463         trampoline lmf frames.  
7464
7465         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
7466
7467 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
7468
7469         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
7470         the mono_lmf TLS variable.
7471
7472         * mini-exceptions.c: Access the LMF structure through accessors.
7473
7474         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
7475         variable instead of in jit_tls->lmf.
7476
7477         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
7478         
7479         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
7480         trampoline lmf frames.
7481
7482         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
7483
7484 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
7485
7486        * mini.c trace.c mini-x86.c: Revert these too.
7487         
7488        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
7489        signature change.
7490
7491 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
7492
7493         * genmdesc.c: removed now dead code.
7494
7495 2006-10-09  Robert Jordan <robertj@gmx.net>
7496
7497         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
7498
7499 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
7500
7501         * mini.h: do not leave gaps in the opcode values.
7502
7503 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
7504
7505         * jit-icalls.h: flag functions as internal here, too.
7506
7507 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
7508
7509         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
7510         functions with the internal attribute.
7511
7512 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
7513
7514         * aot-compiler.c: fclose the file descriptor in the profile read loop.
7515
7516 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
7517
7518         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
7519         for soft-float.
7520
7521 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
7522
7523         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
7524         tail calls as on other platforms.
7525
7526         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
7527
7528         * iltests.il: Add a few tailcall tests.
7529
7530 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7531
7532         * driver.c: fix loop for old compilers (bug #79521).
7533
7534 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
7535
7536         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
7537
7538         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
7539
7540         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
7541         metadata without any code.
7542
7543         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
7544         more precise debugging information using gdb.
7545
7546 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
7547
7548         * inssel-ia64.brg: Make the helper methods static.
7549
7550 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7551
7552         * inssel-x86.brg: make the helper methods static.
7553
7554 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
7555
7556         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
7557
7558 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7559
7560         * mini.c: updates for monoburg changes.
7561         * inssel.brg: make a few helper functions static as they should.
7562
7563 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
7564
7565         * Makefile.am: Move mini-codegen.c to common_sources.
7566
7567 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7568
7569         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
7570         instructions.
7571         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
7572         mini-ppc.h: port to use the common local register allocator.
7573
7574 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7575
7576         * mini.h: Remove the comment too then.
7577
7578 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
7579
7580         * mini.h: put back backend.data which is to be used shortly and
7581         doesn't increase the size of MonoInst. If any 64 bit arch aligned
7582         pointers on 4 byte boundaries it'd have much bigger issues running
7583         and you can ifdef it out anyway.
7584
7585 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7586
7587         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
7588         MonoInst size by 4 bytes on 64 bit machines.
7589
7590 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
7591
7592         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
7593         replacement with more meaningful field names. Arch maintainers, please
7594         check the assigned names are good enough for your arch.
7595
7596 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7597
7598         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
7599         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
7600
7601 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
7602
7603         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
7604         relocations and memory requirements, put the optimization flags
7605         definitions in their own file.
7606
7607 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
7608
7609         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
7610
7611         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
7612
7613 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
7614
7615         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
7616
7617 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
7618
7619         * inssel.brg: use the correct function to get the size of an item
7620         in an array, given an element class.
7621         * aot-compiler.c: do not access class->class_size directly.
7622
7623 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
7624
7625         * mini.h, debug-mini.c: added a debugging function to print
7626         info about local variables and arguments in a jitted method.
7627
7628 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
7629
7630         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7631
7632         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
7633
7634 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
7635
7636         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
7637         inner and outer loops when passing vtypes.
7638
7639 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
7640
7641         * mini-ppc.c: take into account the cpu errata for cache flushing
7642         which caused some random errors (bug #79381).
7643
7644 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
7645
7646         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
7647         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
7648
7649 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
7650
7651         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
7652         loaded.
7653
7654         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
7655         freebsd ports tree.
7656
7657         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
7658         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
7659
7660         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
7661         displacement.
7662
7663 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
7664
7665         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
7666
7667 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
7668
7669         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
7670         macro does not have to be changed during debugging.
7671
7672         * cpu-alpha.md inssel-alpha.brg mini-alpha.h mini-alpha.c exceptions-alpha.c tramp-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7673
7674         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
7675
7676         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
7677         
7678         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
7679         MONO_ARCH_NO_EMULATE_MUL is defined.
7680
7681         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
7682
7683         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
7684
7685         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
7686
7687         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
7688         
7689 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
7690
7691         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
7692         stuff to mini-exceptions.c where it is used.
7693
7694         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
7695         setup code, the real one is in mini-exceptions.c.
7696
7697         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
7698         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
7699         some changes from the freebsd ports tree.
7700
7701         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
7702         constants.
7703         
7704         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
7705
7706 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
7707
7708         * mini.c: on Linux, check for /proc to be mounted
7709         (bug# 79351, novell bug#201204).
7710
7711 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
7712
7713         * mini.c: handle cases where pthread_attr_getstack() behaves
7714         incorrectly (bug #78096).
7715
7716 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
7717
7718         * mini-arm.c: support larger stack frames (bug #79272).
7719
7720 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
7721
7722         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
7723
7724         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
7725         tokens.
7726
7727         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
7728         mono_class_from_name () to find a class from its name.
7729
7730         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
7731
7732 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
7733
7734         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
7735
7736 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
7737
7738         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
7739
7740 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
7741
7742         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
7743         callinfo->trampoline.
7744
7745         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
7746         fixes #79271.
7747         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
7748         future.
7749
7750 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
7751
7752         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
7753
7754 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
7755
7756         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
7757         stats.method_trampolines, it is already done by the generic trampoline code.
7758
7759         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
7760         
7761 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
7762
7763         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
7764
7765         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
7766
7767         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
7768
7769         * mini.c (print_jit_stats): Print mscorlib mempool size too.
7770         
7771         * mini.c (print_jit_stats): Print new stats.
7772
7773         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7774
7775 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
7776
7777         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
7778         Address on two dimensional arrays. Fixes #78729.
7779
7780         * mini.h (MonoCompile): Add a 'skip_visibility' field.
7781
7782         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
7783         a method.
7784
7785         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
7786
7787         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
7788         #79130.
7789         
7790         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
7791         a race condition.
7792         (mini_get_ldelema_ins): Ditto.
7793
7794 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
7795
7796         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
7797         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
7798         Fixes #79213.
7799
7800 2006-08-29 Neale Ferguson <neale@sinenomine.net>
7801
7802         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
7803         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
7804
7805         * exceptions-s390x.c: Cosmetic change.
7806
7807         * tramp-s390.c: Fix warning.
7808
7809         * cpu-s390.md: Correct length of mul_imm.
7810
7811 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
7812
7813         * aot-compiler.c: added binary writer with ELF backend
7814         implementation (only on Linux/x86 for now).
7815
7816 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7817
7818         * Makefile.am: Don't run net 2.0 AOT tests.
7819
7820         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
7821         (mono_compile_assembly): Skip net 2.0 assemblies as well.
7822
7823         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
7824
7825 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7826
7827         * aot-compiler.c: simplified and refactored the asm-writing code
7828         to allow different backends.
7829
7830 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7831
7832         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7833
7834         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
7835         little. Share patches of type TYPE_FROM_HANDLE as well.
7836
7837         * mini.c (mono_patch_info_equal): New helper function.
7838         (mono_patch_info_hash): Ditto.
7839
7840         * aot-compiler.c (emit_method_code): Fix s390 build.
7841
7842         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
7843         is not handled because it is stored as a flag and not as a type ctor. Fixes
7844         #79016.
7845
7846 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
7847
7848         * aot-compiler.c: Fix computation of GOT slot statistics.
7849         
7850         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
7851         Also remove support for not PIC AOT.
7852
7853         * mini.h: Bump AOT file format version.
7854
7855         * objects.cs: Add a test for #78990.
7856
7857         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
7858         (peter.dettman@iinet.net.au). Fixes #79087.
7859
7860         * basic-long.cs: Add a test for the above.
7861
7862 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
7863
7864         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
7865         
7866         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
7867         code somewhat.
7868
7869 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
7870
7871         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
7872         exceptions.
7873
7874 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
7875
7876         * mini.c: Don't verify COM proxy invoke calls
7877         
7878
7879 2006-08-10  Dick Porter  <dick@ximian.com>
7880
7881         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
7882         which process is holding semaphores locked.
7883
7884 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
7885
7886         * mini-ia64.c mini-amd64.c: Fix #79027.
7887
7888         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
7889
7890         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
7891
7892         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
7893         implicit arguments in a vararg call. Fixes #79027.
7894
7895 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
7896
7897         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
7898         (mono_get_array_new_va_signature): Ditto.
7899
7900 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
7901
7902         * aot-runtime.c: Call init_plt lazily.
7903
7904         * inssel-long.brg: Fix unsigned long->int conversion.
7905
7906         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
7907
7908         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
7909         that most data is now in the .rss/.data section.
7910
7911 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
7912
7913         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
7914
7915         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
7916
7917         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
7918
7919         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
7920
7921         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
7922         virtual call. Fixes #79010.
7923
7924         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
7925         and use the result as the this argument in the real call.
7926
7927         * generics.2.cs: Add a new test for #79010.
7928         
7929 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
7930
7931         * mini-x86.c: Fix a warning.
7932
7933         * aot-compiler.c: Add a bunch of statistics.
7934
7935         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
7936
7937 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
7938
7939         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
7940
7941 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
7942
7943         * cpu-alpha.md inssel-alpha.brg mini-alpha.h mini-alpha.c exceptions-alpha.c tramp-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7944
7945 2006-07-13  Miguel de Icaza  <miguel@novell.com>
7946
7947         * mini.c (mono_method_to_ir): Obtain the original method in the
7948         CIL stream and use this to perform validation.
7949
7950         Fixed: #78816
7951
7952 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
7953
7954         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
7955         (mono_arch_call_opcode): Ditto.
7956
7957         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
7958         #78826.
7959
7960         * mini.c (mono_patch_info_dup_mp): New helper function.
7961         
7962         * aot-compiler.c (compile_method): Fix some of the memory allocated during
7963         compilation. Fixes #78827.
7964
7965 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
7966
7967         * declsec.c: Use original security informations for
7968           MONO_WRAPPER_MANAGED_TO_MANAGED.
7969
7970 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
7971
7972         * mini.c: Allow Com Interop methods/classes and
7973         don't verify COM wrapper calls
7974         
7975
7976 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
7977
7978         * inssel-long32.brg: Fix long->i4 checked conversion.
7979
7980         * exceptions.cs: Add a test for the above.
7981
7982 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
7983
7984         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
7985
7986         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
7987         leaks.
7988
7989         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
7990         #78775.
7991
7992 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
7993
7994         * mini.c: Fix solaris/x86 exception handling.
7995
7996         * Makefile.am: Get rid of $(ICU_LIBS).
7997
7998 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
7999
8000         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
8001         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
8002         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
8003
8004         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
8005
8006         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
8007         this function causes a SIGSEGV.
8008
8009 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
8010
8011         * mini.c: Remove unused solaris/x86 includes.
8012
8013 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
8014
8015         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
8016
8017 2006-06-20  Jb Evain  <jbevain@gmail.com>
8018
8019         * cpu-g4.md: fix max length of start_handler instruction.
8020
8021 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
8022         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
8023
8024 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
8025         * ssa.c: Fixed bug 78653 for SSA based deadce.
8026         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
8027         MonoInst.flags, used in SSA based deadce.
8028         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
8029         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
8030
8031 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
8032
8033         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
8034         it can end up using non executable memory on ppc64 systems
8035         running ppc32 userspace (fix from Johannes Berg).
8036
8037 2006-06-14  Dick Porter  <dick@ximian.com>
8038
8039         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
8040         4.1.1
8041
8042 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
8043         * mini.c: Made so that inline is locally disabled if it would
8044         trigger a .cctor, because too many apps depend on this behavior
8045         (which seems to be also the one of the MS CLR).
8046
8047 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
8048
8049         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
8050         No idea why this worked before.
8051
8052         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
8053         which branch to outer exception clauses since they could skip the
8054         inner finally clauses. Fixes #78633.
8055
8056         * exceptions.cs: Add a test for the above.
8057
8058         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
8059         Fixes #78629.
8060
8061         * iltests.il: Add a test for the above.
8062
8063 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
8064
8065         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
8066         after the end of a try bblock, to prevent asserts in mini_method_compile ().
8067
8068         * iltests.il: Add a test for the above.
8069
8070 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
8071
8072         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
8073         
8074         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
8075         methods as instrinsics.
8076
8077 2006-06-09  Wade Berrier <wberrier@novell.com>
8078
8079         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
8080         (simple-cee-ops.h ssapre-mini-ops.h)
8081
8082 2006-06-09  Neale Ferguson <neale@sinenomine.net>
8083
8084         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
8085         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
8086         instruction).
8087         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
8088         * cpu-s390x.md: Fix max. length values for a couple of instructions.
8089
8090 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
8091
8092         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
8093
8094 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
8095
8096         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
8097         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
8098         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
8099         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
8100         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
8101         of opcodes, so that bug 78549 should not happen again.
8102         * ssapre.c: Updated to use the renamed files.
8103
8104 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
8105
8106         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
8107         in OP_ATOMIC_EXCHANGE_I4.
8108
8109 2006-06-07  Wade Berrier <wberrier@novell.com>
8110
8111         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
8112         in mono_debugger_create_notification_function)
8113
8114 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
8115
8116         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
8117         
8118         * mini.c (type_from_stack_type): Disable some changes which do not
8119         seem to work.
8120
8121         * driver.c: Reenable opts.
8122
8123         * mini.h (MonoStackSlot): New structure to keep track of the verification state
8124         of the evaluation stack.
8125         
8126         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
8127         evaluation stack trace at entry to the bblock.
8128
8129         * mini.c (merge_stacks): New function to perform verification of stack merges.
8130         Turned off by default.
8131
8132         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
8133         STACK_MP.
8134         
8135 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
8136
8137         * local-propagation.c: Fixed bug 78549.
8138
8139 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
8140
8141         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
8142
8143 2006-06-02  Miguel de Icaza  <miguel@novell.com>
8144
8145         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
8146         tramp-arm.c, tramp-ia64.c
8147         (mono_debugger_create_notification_function): Update signature to
8148         new signature and use new protocol for creating the notification
8149         function.  
8150
8151         Should fix the build.
8152
8153 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
8154
8155         * exceptions-ppc.c (mono_jit_walk_stack)
8156         (ves_icall_get_frame_info): Fix the build
8157
8158 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
8159
8160         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
8161
8162 2006-05-31  Raja R Harinath  <rharinath@novell.com>
8163
8164         * il2tests.2.il: New file for generics CIL tests.  Add test for
8165         #78019.
8166         * Makefile.am: Update.
8167
8168         Fix #78019
8169         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
8170         to nullable types.
8171
8172 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
8173
8174         * aliasing.c: Fixed bug 78311.
8175
8176 2006-05-29  Martin Baulig  <martin@ximian.com>
8177
8178         * mini-exceptions.c (mono_find_jit_info): When computing the
8179         native offset, check whether we're actually inside the method's
8180         code; call mono_debug_print_stack_frame() to format the frame.
8181         (ves_icall_System_Exception_get_trace): Call
8182         mono_debug_print_stack_frame() to format the stack frame.
8183         (ves_icall_get_trace): Update to the new debugging API.
8184         (mono_jit_walk_stack_from_ctx): Likewise.
8185         (ves_icall_get_frame_info): Likewise.
8186
8187         * mini.c (get_method_from_ip): Use the new debugging API.
8188         (mono_print_method_from_ip): Likewise.
8189
8190         * exceptions-ppc.c
8191         (mono_jit_walk_stack): Use the new debugging API.
8192         (ves_icall_get_frame_info): Likewise.   
8193
8194 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
8195
8196         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
8197
8198 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
8199
8200         * mini.c: Added "limitator" to inline for debugging.
8201
8202 2006-05-24  Martin Baulig  <martin@ximian.com>
8203
8204         * debug-debugger.c (mono_debugger_init): Create a private,
8205         malloc()-based code manager for the notification function and
8206         intentionally leak it on exit.  This fixes the crash-on-exit race
8207         condition.
8208
8209         * tramp-amd64.c
8210         (mono_debugger_create_notification_function): Added
8211         `MonoCodeManager *' argument.
8212
8213         * tramp-x86.c
8214         (mono_debugger_create_notification_function): Added
8215         `MonoCodeManager *' argument.
8216
8217 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
8218
8219         * aliasing.c: Fixed 64 bit issue.
8220         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8221         default since all known bugs are fixed (one more time!).
8222
8223 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8224
8225         * mini.c: write barrier support.
8226
8227 2006-05-23  Martin Baulig  <martin@ximian.com>
8228
8229         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
8230         check at the top of the file.
8231
8232 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
8233
8234         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
8235         reverting changes without reason and without changelog entries.
8236
8237 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
8238
8239         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
8240         to a few opcodes. Fixes #78439.
8241
8242         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
8243         consistency with other archs.
8244
8245         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
8246
8247 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8248
8249         * debug-debugger.c: fix the build.
8250
8251 2006-05-17  Martin Baulig  <martin@ximian.com>
8252
8253         * debug-debugger.c
8254         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
8255         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
8256         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
8257         (debugger_attach): Call GC_mono_debugger_add_all_threads().
8258
8259 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
8260
8261         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
8262
8263 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
8264
8265         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
8266         MONO_TYPE_GENERICINST.
8267         
8268         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
8269         MONO_TYPE_GENERICINST.
8270
8271 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
8272
8273         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
8274         #78325.
8275
8276 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
8277
8278         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
8279         mempool.
8280         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
8281
8282 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
8283
8284         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
8285         mono_trace_cleanup ().
8286
8287         * iltests.il: Fix problem with the newly added test.
8288
8289         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
8290         due to register constraints, free up the previous hreg. Fixes #78314.
8291
8292         * iltests.il: Add new test for #78314.  
8293
8294         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
8295         Interlocked.Add. Fixes #78312.
8296
8297         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
8298         
8299 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
8300
8301         * inssel.brg (mini_emit_virtual_call): Fix a warning.
8302
8303 2006-05-05  Martin Baulig  <martin@ximian.com>
8304
8305         * debug-mini.c (mono_debug_open_block): New method.
8306
8307         * mini-amd64.c
8308         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8309         the beginning of each basic block.
8310
8311         * mini-x86.c
8312         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8313         the beginning of each basic block.
8314
8315 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8316
8317         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8318         default until I understand why they break the build on amd64.
8319
8320 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
8321
8322         * mini.c (mini_cleanup): Call mono_cleanup ().
8323
8324         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
8325         errors.
8326
8327 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8328
8329         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
8330         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8331         default since all known bugs are fixed, and I cannot reproduce bug
8332         77944... I'm asking Matt Hargett to test again after this commit.
8333
8334 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
8335
8336         * mini-codegen.c: Fixed typo that thrashed inline.
8337
8338 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
8339
8340         * dominators.c (compute_dominators): Avoid using a worklist since
8341         it is not correct in some cases. Instead, iterate over all bblocks as
8342         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
8343
8344 2006-04-28  Miguel de Icaza  <miguel@novell.com>
8345
8346         * mini.c (mono_jit_compile_method_inner): Use
8347         mono_prepare_exception_from_error that resets the value
8348         internally.
8349
8350 2006-04-27  Miguel de Icaza  <miguel@novell.com>
8351
8352         * mini.c: Move the mini_loader_error_to_exception to metadata. 
8353         
8354 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8355
8356         * aliasing.c: Fixed bug 78210.
8357
8358 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8359
8360         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8361         default until all their problems (or the ones they trigger) are fixed.
8362
8363 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
8364
8365         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
8366         
8367         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
8368         as loaded only after resolving patches since that could invoke the same method.
8369
8370         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
8371
8372         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
8373         functions.
8374
8375         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
8376         AOT loader.
8377
8378         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
8379         stack.
8380
8381         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
8382         made from AOT code through the PLT table.
8383
8384         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
8385         holding the plt offset when a call is made to the aot plt trampoline.
8386         
8387 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
8388
8389         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
8390         amd64 AOT support.
8391
8392         * Makefile.am (common_sources): Fix build breakage.
8393
8394         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
8395         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
8396         intra-assembly calls if possible.
8397         
8398         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
8399
8400         * mini-trampolines.c: Handle PLT entries.
8401
8402         * mini.c: Avoid creating a GOT var for calls.
8403
8404         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
8405         from mscorlib code.
8406
8407         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
8408         from mscorlib code.
8409
8410         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
8411         AOT code.       
8412
8413         * mini.h: Bump AOT file format version.
8414         
8415         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
8416         covers more cases.
8417
8418 2006-04-25  Martin Baulig  <martin@ximian.com>
8419
8420         * driver.c: Disable copyprop, consprop and inline when running
8421         inside the debugger.
8422
8423 2006-04-25  Martin Baulig  <martin@ximian.com>
8424
8425         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
8426         with `get_current_thread' and added `detach'.
8427         (MonoDebuggerMetadataInfo): Added `thread_size',
8428         `thread_tid_offset', `thread_stack_ptr_offset' and
8429         `thread_end_stack_offset'.
8430
8431 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
8432
8433         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
8434         aot-runtime.c.
8435
8436         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
8437         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
8438
8439         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
8440
8441         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
8442
8443         * aot.c: Add support for ADJUSTED_IID.  
8444
8445 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
8446
8447         * aot.c (emit_method_order): Don't align method_order_end.
8448
8449         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
8450         the interface ID changes.
8451
8452 2006-04-21  Dick Porter  <dick@ximian.com>
8453
8454         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
8455         cleaning up a thread.  Fixes the new part of bug 77470.
8456
8457 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
8458
8459         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
8460         to managed wrapper.
8461                      
8462 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
8463
8464         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
8465         
8466         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
8467         SIGSEGV. Fixes #78072.
8468
8469         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
8470         unregister our SIGABRT handler.
8471
8472 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
8473
8474         * mini.c: Disabled inline where it can alter the call stack in a
8475         way visible from managed code.
8476         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
8477         default.
8478
8479 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
8480
8481         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
8482         on other platforms. Fixes #78089.
8483
8484 2006-04-13  Martin Baulig  <martin@ximian.com>
8485
8486         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
8487         determine whether we're inside the debugger.
8488
8489         * debug-debugger.h
8490         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
8491
8492 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
8493
8494         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
8495         handler clauses. Fixes #78024.
8496
8497         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
8498         in the CALL_MEMBASE opcodes. Fixes #78088.
8499         (mono_arch_get_vcall_slot_addr): Ditto.
8500
8501 2006-04-10  Martin Baulig  <martin@ximian.com>
8502
8503         * debug-debugger.c: The thread handling code has now been moved
8504         into ../metadata/threads.c.
8505
8506 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
8507
8508         * driver.c (mono_main): Fix --with-gc=none build.
8509
8510         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
8511         (mono_spillvar_offset_float): Ditto.
8512         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
8513         hreg, not when its !global, since on ia64, there is a third category: stacked
8514         registers.      
8515
8516 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
8517
8518         * mini.c: set MonoInst->klass for load field address and a few other
8519         places.
8520
8521 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
8522
8523         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
8524
8525 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
8526
8527         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
8528         the branch opt changes.
8529
8530 2006-04-06  Dick Porter  <dick@ximian.com>
8531
8532         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
8533         
8534         * wapihandles.c (mini_wapi_seminfo): 
8535         * driver.c (mono_main): Add semaphore info option
8536
8537 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
8538
8539         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
8540         branch optimization changes. Fixes #78009.
8541
8542 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8543
8544         * mini.c: ignore accessibility of methods in managed->native wrappers.
8545
8546 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
8547
8548         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
8549         
8550         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
8551
8552 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
8553
8554         * mini.c: Modify the branch optimizations to preserve the invariant that
8555         the entries inside the in_bb and out_bb arrays are unique.
8556         (mono_unlink_bblock): Avoid creation of new arrays.
8557
8558 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
8559
8560         * mini.c (mono_unlink_bblock): Fix regression caused by previous
8561         change (#77992).
8562
8563 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
8564
8565         * mini.c (optimize_branches): Remove the "optimizations" in
8566         the cbranch1/cbranch2 -> branch cases which were causing several
8567         problems in the past. Fixes #77986.
8568
8569 2006-03-31  Chris Toshok  <toshok@ximian.com>
8570
8571         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
8572         default optimizations :(
8573
8574 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
8575
8576         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
8577         branch.
8578
8579 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
8580
8581         * local-propagation.c: Added comments to structs and removed
8582         "Mono" prefixes from local tree mover types.
8583
8584 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
8585
8586         * Makefile.am (arch_sources): Define this for each architecture so 
8587         libmono_la_SOURCES is defined in one place.
8588
8589 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
8590
8591         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
8592         from handles/.
8593
8594 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
8595
8596         * driver.c: print the GC name supplied by configure.
8597
8598 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
8599
8600         * local-propagation.c: Added tree mover, and moved here all the
8601         local propagation code from mini.c
8602         * mini.c: Added support for treeprop, and moved all the local
8603         propagation code to local-propagation.c
8604         * mini.h: Added support for treeprop
8605         * driver.c: Added support for treeprop, enabled consprop, copyprop,
8606         treeprop, inline and deadce by default
8607         * Makefile.am: Added local-propagation.c
8608
8609 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
8610
8611         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
8612
8613 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
8614
8615         * debug-debugger.c: make it compile without the Boehm GC.
8616
8617 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8618
8619         * mini.c: fixed issue with mismatch when an icall is registered
8620         with multiple names but same address.
8621
8622 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8623
8624         * declsec.c, mini-exceptions.c: use write barrier to set reference
8625         fields of managed objects.
8626
8627 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
8628
8629         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
8630         (can_access_internals): Fix a warning.
8631
8632         * mini.c (print_method_from_ip): Rename this to 
8633         mono_print_method_from_ip so it gets exported.
8634
8635         * trace.c: Deal with strings inside StringBuilder's containing garbage
8636         and fix memory leaks. Fixes #77848.
8637
8638 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
8639
8640         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
8641         fixes #77787.
8642
8643 2006-03-16 Neale Ferguson <neale@sinenomine.net>
8644         
8645         * mini-s390.c: Remove OP_X86_TEST_NULL.
8646
8647 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8648
8649         * mini.c: use the correct GetHashCode() for the moving collector.
8650
8651 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
8652
8653         * liveness.c: Regalloc spill cost tuning.
8654
8655 2006-03-15 Neale Ferguson <neale@sinenomine.net>
8656         
8657         * mini-s390x.h: Correct S390_LONG macro.
8658
8659         * mini-s390x.c: Cleanup unused code.
8660
8661 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
8662
8663         * jit-icalls.h: New file.
8664
8665         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
8666         icalls and include that instead of including jit-icalls.c.
8667
8668         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
8669         OP_X86 opcodes.
8670
8671 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
8672
8673         * mini.c: when checking for member accessibility, also check for
8674         friend assemblies and for explicit interface implementations.
8675
8676 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
8677
8678         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
8679
8680         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
8681
8682         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8683         common cases are done first.    
8684
8685         * mini-ops.h: Only define platform specific opcodes on the given platform.
8686
8687         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
8688         branch.
8689         
8690 2006-03-14  Martin Baulig  <martin@ximian.com>
8691
8692         Revert Paolo's change from r57348:
8693
8694         * mini.h: don't use gboolean for bitfields.
8695         * mini.c: verifier changes for fields and methods accessibility.
8696
8697 2006-03-13  Neale Ferguson <neale@sinenomine.net>
8698
8699         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
8700
8701         * mini-s390x.c: Fix conv_r_un.
8702
8703         * cpu-s390, cpu-s390x.md: Fix lengths.
8704
8705 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
8706
8707         * mini.c: nested types have access to all the nesting
8708         levels, not just the enclosing types.
8709
8710 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
8711
8712         * mini.c: added a few more verification checks.
8713
8714 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
8715
8716         * liveness.c: Merge optimizations from the linear-il branch.
8717
8718 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8719
8720         * mini-ia64.c (emit_call): Add a comment.
8721
8722         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
8723
8724         * tramp-ia64.c: Fix some warnings.
8725
8726 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
8727
8728         * mini.h: don't use gboolean for bitfields.
8729         * mini.c: verifier changes for fields and methods accessibility.
8730
8731 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8732
8733         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
8734         lazy icall wrapper changes.
8735
8736         * dominators.c: Replace all the dominator algorithms with faster
8737         ones from the linear-il branch.
8738
8739         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
8740         the mempool.
8741
8742         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8743         common cases are done first.
8744
8745         * mini-amd64.c: Fix some warnings.
8746
8747         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
8748         from the mempool.
8749
8750         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
8751         added code.
8752
8753         * mini.h: Add a missing prototype.
8754
8755 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
8756
8757         * mini.c: Compile icall wrappers lazily.
8758
8759         * mini-codegen.c: Use printf instead of g_print since its much faster.
8760
8761         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
8762         function.
8763
8764         * mini.c (optimize_branches): Cache the negative result from 
8765         remove_block_if_useless ().
8766
8767         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
8768         Also fix some bblock linking issues.
8769
8770         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
8771         assembly files.
8772
8773         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
8774
8775         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
8776         accessed fields first, for better cache behavior.
8777         
8778 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8779
8780         * mini.c: speedup IList<T> array accesses.
8781
8782 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
8783
8784         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
8785         inline_costs counter. Fixes #77190.
8786
8787 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
8788
8789         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
8790         trace messages. Fixes #77706.
8791
8792 2006-03-04  Martin Baulig  <martin@ximian.com>
8793
8794         * tramp-amd64.c, tramp-x86.c
8795         (mono_debugger_create_notification_function): Use
8796         mono_global_codeman_reserve() to allocate a buffer at runtime and
8797         return it.
8798
8799         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
8800
8801         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
8802         notification function at runtime and then call `initialize' in the
8803         `MONO_DEBUGGER__debugger_info' vtable.
8804
8805 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
8806
8807         * iltests.il: Fix a visibility problem.
8808
8809 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8810
8811         * driver.c, mini.c: add hooks for the counters API.
8812
8813 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8814
8815         * driver.c: show disabled options.
8816
8817 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8818
8819         * linear-scan.c: always use cost-driven selection.
8820
8821 2006-02-28  Raja R Harinath  <rharinath@novell.com>
8822
8823         * jit-icalls.c (helper_compile_generic_method): Revert change from
8824         2006-02-24.
8825
8826 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
8827
8828         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
8829
8830 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
8831
8832         * inssel.brg: style fixes, mostly to force the updated monoburg
8833         to run for people using svn.
8834
8835 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
8836
8837         * mini.c: match monoburg changes.
8838
8839 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8840
8841         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
8842         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
8843         declaration in the header file.
8844
8845 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8846
8847         * helpers.c: reduce relocations and mem usage.
8848
8849 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
8850
8851         * mini.h, mini-codegen.c: disable logging features if
8852         requested by configure.
8853
8854 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
8855
8856         * mini.c: tiny verifier changes.
8857
8858 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8859
8860         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
8861         cpu-pentium.md: stack alignment changes for osx/x86,
8862         partially from Geoff Norton <gnorton@customerdna.com>.
8863
8864 2006-02-24  Raja R Harinath  <harinath@gmail.com>
8865
8866         * jit-icalls.c (helper_compile_generic_method): Update to changes
8867         in metadata/class.c.
8868
8869 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
8870         
8871         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
8872         
8873         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
8874         interface calls with large offsets.
8875
8876 2006-02-23  Raja R Harinath  <rharinath@novell.com>
8877
8878         * jit-icalls.c (helper_compile_generic_method): Document the
8879         special-case we depend on so that we can inflate the method twice
8880         with the same context with no bad side-effects.
8881
8882 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
8883
8884         * mini-x86.c, mini-amd64.c: fix for case when xen support
8885         is disabled.
8886
8887 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
8888
8889         * mini-x86.c, mini-amd64.c: generate code to access tls items
8890         in a faster way for Xen systems.
8891
8892 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8893
8894         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
8895         updates and compilation fixes for the OSX/x86 port, mostly from
8896         Geoff Norton <gnorton@customerdna.com>.
8897
8898 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8899
8900         * inssel.brg: faster interface call implementation
8901         to sync with the interface_offsets MonoVTable changes.
8902
8903 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8904
8905         * mini.c: more verification checks.
8906
8907 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
8908
8909         * mini.c: added a few more verification checks.
8910
8911 2006-02-17      Neale Ferguson <neale@sinenomine.net>
8912
8913         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
8914         facility on the processor and use it if available.
8915
8916 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8917
8918         * driver.c, aot.c, mini.c: throw exception if the IL code is
8919         invalid or unverifiable.
8920
8921 2006-02-17  Raja R Harinath  <rharinath@novell.com>
8922
8923         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
8924         m.StructField.
8925
8926 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
8927
8928         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
8929
8930 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8931
8932         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
8933         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
8934         handling of instantiated generic valuetypes.
8935
8936 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
8937
8938         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
8939         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
8940         instead.
8941
8942         * generics.2.cs: Revert the nullable reftypes tests.
8943
8944 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
8945
8946         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
8947         using __builtin_frame_address (1) as it doesn't work in the presence
8948         of optimizations. Hopefully fixes #77273.
8949
8950         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
8951         -> generics.cs change as it doesn't work with some automake versions.
8952
8953 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8954
8955         * mini.c: handle systems that sue a different way to
8956         retrieve the stack address of the current thread.
8957
8958 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
8959
8960         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
8961         it specially in the makefile.
8962
8963         * generics.2.cs: Add tests for nullable reference types.
8964
8965 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8966
8967         * mini.c: always handle the case when mono_jit_init()
8968         is called in a thread different from the main thread,
8969         confusing libgc (bug #77309).
8970
8971 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
8972
8973         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
8974
8975 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8976
8977         * mini.c: change optimize_branches () to use a single loop
8978         and introduce a new optimization to simplify some range checks.
8979
8980 2006-02-03  Martin Baulig  <martin@ximian.com>
8981
8982         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
8983         and merged with debugger_thread_manager_add_thread().
8984         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
8985         inform the debugger about the main thread.
8986
8987 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8988
8989         * basic.cs: Add test for div.un/rem.un constant folding.
8990
8991 2006-02-03  Neale Ferguson <neale@sinenomine.net>
8992
8993         * cpu-s390x.md: correct int_xor_imm length
8994
8995 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8996
8997         * generics.2.cs: New test for #77442.
8998
8999         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
9000         #77442.
9001
9002 2006-02-02  Martin Baulig  <martin@ximian.com>
9003
9004         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
9005         <mono/metadata/mono-debug-debugger.h>   
9006
9007         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
9008
9009 2006-02-02  Martin Baulig  <martin@ximian.com>
9010
9011         * debug-debugger.h: New header file for debug-debugger.c.
9012
9013         * debug-debugger.c: Big API cleanup; don't run the managed Main()
9014         function is a separate thread anymore; add support for attaching.
9015
9016 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
9017
9018         * tramp-x86.c: Fix a warning.
9019
9020 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
9021
9022         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
9023         on very large methods.
9024
9025         * aot.c (load_patch_info): Fix a warning.
9026
9027 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
9028
9029         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
9030         mini-ops.h: alu membase optimizations.
9031
9032 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
9033
9034         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
9035         to speedup StringBuilder.
9036
9037 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
9038
9039         * dominators.c (mono_compute_natural_loops): Fix detection of
9040         loop body start blocks.
9041
9042         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
9043
9044 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
9045
9046         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
9047         #75145.
9048
9049 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
9050
9051         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9052
9053 2006-01-25  Martin Baulig  <martin@ximian.com>
9054
9055         * debug-debugger.c: Moved the `MonoDebuggerManager' and
9056         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
9057         started to cleanup this file a little bit.
9058
9059 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
9060
9061         * mini.c: optimize a codepath frequently happening in generics code.
9062
9063 2006-01-23  Martin Baulig  <martin@ximian.com>
9064
9065         * Makefile.am: Only compile debug-debugger.c on supported platforms.
9066
9067         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
9068         functions directly.
9069
9070         * driver.c: debug-debugger.c is only available if
9071         `MONO_DEBUGGER_SUPPORTED' is defined.   
9072
9073 2006-01-23  Martin Baulig  <martin@ximian.com>
9074
9075         * debug-debugger.c: Only enable this on platforms where the Mono
9076         Debugger is working (x86 and x86_64).
9077
9078 2006-01-21  Martin Baulig  <martin@ximian.com>
9079
9080         The Mono Debugger is now using the normal `mono' instead of the
9081         `mono-debugger-mini-wrapper' when executing managed code.
9082
9083         * debug-debugger.c: New file; previously known as
9084         debugger/wrapper/wrapper.c.
9085
9086         * debug-mini.c (mono_init_debugger): Removed.
9087
9088         * driver.c (mono_main): Added new `--inside-mdb' command line
9089         argument which is used when running inside the debugger.
9090
9091 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
9092
9093         * liveness.c (mono_analyze_liveness): Remove some unused data
9094         structures.
9095
9096 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
9097
9098         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
9099
9100 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
9101
9102         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
9103         depends on implementation details of monobitset.
9104
9105         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
9106         Fixes #77271.
9107
9108 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
9109
9110         * liveness.c: Update after monobitset changes.
9111
9112 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
9113
9114         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
9115
9116 2006-01-11 Neale Ferguson <neale@sinenomine.net>
9117
9118         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
9119
9120         * mini-s390x.c: Remove warning messages.
9121
9122 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
9123
9124         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
9125
9126 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
9127
9128         * generics.2.cs: Add ldelem/stelem_any test.
9129
9130 2006-01-10 Neale Ferguson <neale@sinenomine.net>
9131
9132         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
9133
9134 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
9135
9136         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
9137         
9138 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
9139
9140         * generics.2.cs: Reenable vtype tests.
9141
9142         * inssel-x86.brg: Remove an icorrect valuetype rule.
9143
9144 2006-01-06 Neale Ferguson <neale@sinenomine.net>
9145
9146         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
9147         initial support for OP_ABS.
9148
9149 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9150
9151         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
9152
9153 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9154
9155         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
9156         conversion and implement LADD/LSUB.
9157
9158         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
9159         architectures.
9160
9161 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9162
9163         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
9164
9165         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
9166         architectures.
9167
9168 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9169
9170         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
9171         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
9172         (stack walk problem).
9173
9174 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
9175
9176         * aot.c (mono_aot_load_method): Fix a warning.
9177
9178 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9179
9180         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
9181
9182 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9183
9184         * iltests.il: Add test for #77148.
9185
9186         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
9187         #77148.
9188
9189 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9190
9191         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
9192
9193 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9194
9195         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
9196         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
9197
9198         * basic-long.cs: Add lconv-to-r4/r8 tests.
9199
9200 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9201
9202         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
9203
9204         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
9205         here as on other archs.
9206
9207 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9208
9209         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
9210
9211 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9212
9213         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
9214         
9215         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
9216
9217         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
9218         instrument_prolog; Add memory_barrier instruction.
9219
9220 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
9221
9222         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
9223
9224 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
9225
9226         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
9227
9228         * aliasing.c inssel.brg: Fix warnings.
9229
9230         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
9231         could skip initialization of some parts of memory.
9232
9233         * mini.c mini-ia64.c: Fix warnings.
9234
9235         * inssel-sparc.brg: Add an implementation of lneg which actually works.
9236
9237 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
9238
9239         * aliasing.c (mono_build_aliasing_information): Add a workaround for
9240         a crash seen on sparc.
9241
9242         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
9243         
9244         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
9245
9246 2005-12-21 Neale Ferguson <neale@sinenomine.net>
9247
9248         * mini-ops.h: Add s390_backchain instruction
9249
9250         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
9251
9252         * cpu-s390.md: Add s390_backchain instruction
9253
9254         * mini-s390.c: Significant ABI changes
9255
9256         * mini-s390.h: Cater for zero length structures
9257
9258 2005-12-20 Neale Ferguson <neale@sinenomine.net>
9259
9260         * mini-s390.c: ABI fixes
9261
9262         * inssel-s390.brg: Remove debug statements
9263
9264         * cpu-s390.md: Fix length of ATOMIC_xx operations
9265
9266 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
9267
9268         * basic-float.cs: Add float<->long conversion tests.
9269
9270 2005-12-16 Neale Ferguson <neale@sinenomine.net>
9271
9272         * mini-s390.c: Fix LOCALLOC processing.
9273
9274         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
9275
9276 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
9277
9278         * iltests.il: Add tests for some opcodes not covered by the other
9279         tests.
9280
9281 2005-12-15 Neale Ferguson <neale@sinenomine.net>
9282
9283         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
9284         register loading for Tail processing; Correct trace output.
9285
9286         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
9287
9288         * cpu-s390.md: Correct size of jmp instruction. 
9289
9290 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9291
9292         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
9293
9294 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9295
9296         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
9297           Bring s390 up to current level.
9298
9299 2005-12-12  Zltan Varga  <vargaz@gmail.com>
9300
9301         * generics.2.cs: Disable the newly added tests as they do not work yet.
9302         
9303         * generics.2.cs: Add valuetype tests.
9304
9305 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
9306
9307         * basic-long.cs: Add i4->u8 test.
9308
9309         * objects.cs: Add tests for JIT intrinsic.
9310
9311         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
9312         optimizations lost by a mistake.
9313
9314 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
9315
9316         * basic-long.cs: Remove a test moved to objects.cs.
9317
9318         * arrays.cs: Add more array tests.
9319
9320 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
9321
9322         * arrays.cs: Add new tests for multi-dimensional arrays.
9323
9324 2005-12-06  Raja R Harinath  <rharinath@novell.com>
9325
9326         * Makefile.am (test_sources2): Add generics.2.cs.
9327         (EXTRA_DIST): Add test_sources2.
9328
9329 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
9330
9331         Support for boxing and unboxing nullable types as well as the
9332         isinst operation on nullables, per the CLI ammendment.
9333
9334         * inssel.brg (CEE_ISINST): Special case for nullable
9335
9336         * mini.c (handle_unbox_nullable): new method
9337         (handle_box): Special case for nullable types
9338         (mono_method_to_ir): Call handle_unbox_nullable in correct
9339         places.
9340
9341         * generics.2.cs: New test suite
9342
9343         * Makefile.am: Support for regression tests with generics.
9344
9345 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
9346
9347         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
9348         allocated to registers. Fixes #76800.
9349
9350 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
9351
9352         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
9353
9354 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
9355
9356         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
9357         of platforms.
9358
9359 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
9360
9361         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
9362         objects.cs.
9363
9364         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
9365         
9366         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
9367 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
9368
9369         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
9370         single precision before storing to a single precision location.
9371
9372 2005-11-28  Raja R Harinath  <rharinath@novell.com>
9373
9374         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
9375
9376 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
9377
9378         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
9379         correct files.
9380
9381         * basic.cs: Remove test_0_byte_compares test which was moved to
9382         objects.cs a long time ago.
9383
9384 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
9385
9386         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9387
9388 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
9389
9390         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
9391         handlers are called.
9392
9393         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
9394         throwing code.
9395
9396          * mini-ia64.c: Add support for the throw->branch exception 
9397         optimization.   
9398
9399         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
9400
9401 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9402
9403         * mini.c: Enabled "fastpath" deadce :-)
9404         
9405 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9406
9407         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
9408         alias analysis pass to support it.
9409         * mini.h: Likewise.
9410         * ssa.c: Likewise.
9411         * liveness.c: Likewise (liveness computation can use aliasing
9412         information to be more accurate).
9413         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
9414         moreover made so that "--compile-all" uses the given optimization
9415         flags and not the default ones.
9416         * aliasing.c: Alias analysis (new file).
9417         * aliasing.h: Likewise.
9418         * Makefile.am: added "aliasing.c" and "aliasing.h".
9419         
9420 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
9421
9422         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
9423         OP_L opcodes.
9424
9425 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
9426
9427         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
9428         fp >= end_of_stack exit condition, as it is not needed, and it might
9429         become true for fp eliminated frames.
9430
9431 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
9432
9433         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
9434         coded offsets.
9435
9436 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
9437
9438         * mini-arm.c: fixed alignment of doubles/longs to match
9439         the C ABI (bug #76635).
9440
9441 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
9442
9443         * aot.c: fix compilation with --enable-minimal=aot.
9444
9445 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
9446
9447         * mini-arm.c: fixed compatibility with the new
9448         floating point emulator package for compares.
9449
9450 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
9451
9452         * mini.c : reverted sig->pinvoke changes (r51396-51397).
9453
9454 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
9455
9456         * mini-exceptions.c (print_stack_frame): Output to stderr.
9457         (mono_handle_native_sigsegv): Ditto.
9458
9459 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
9460
9461         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
9462         OP_LCONV_TO_OVF_I implementation.
9463
9464         * mini-amd64.c: Add support for the throw->branch exception 
9465         optimization.
9466
9467         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
9468         when the catch clause catches a more general exception, i.e. Object.
9469
9470 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
9471
9472         * cpu-ia64.md: Remove unused opcodes.
9473
9474         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
9475         specific defines for architectures defining USE_SIGACTION.
9476
9477         * mini-ia64.c: Fix some warnings.
9478
9479         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
9480         version seemed to skip a frame.
9481
9482 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
9483
9484         * mini.c: Clean up the usage of sig->pinvoke flag. Now
9485         only calls which are made to native code use this flag.
9486
9487 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
9488
9489         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
9490         varargs methods as well.
9491         
9492         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
9493         which have save_lmf set. Reorganize methods prologs a bit.
9494
9495         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
9496         debugger to the proper place.
9497
9498 2005-10-29  Martin Baulig  <martin@ximian.com>
9499
9500         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
9501         when running inside the debugger until the debugger has support
9502         for it.
9503
9504 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
9505
9506         * mini.h: Fix a warning.
9507
9508 2005-10-24  Miguel de Icaza  <miguel@novell.com>
9509
9510         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
9511         we expose publicly, this returns the string.
9512
9513 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
9514
9515         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
9516         with fp elimination.
9517
9518 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
9519
9520         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
9521         native stacktrace using the glibc 'backtrace' function if available.
9522
9523 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
9524
9525         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
9526
9527         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
9528         handle SIGSEGVs received while in native code.
9529
9530         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
9531         code, call mono_handle_native_sigsegv which will abort the runtime
9532         after printing some diagnostics, instead of converting it into a
9533         confusing NullReferenceException.
9534
9535 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
9536
9537         * cpu-pentium.md: Remove unused opcodes.
9538
9539 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
9540
9541         * mini-amd64.h (MonoLMF): Add rsp field.
9542
9543         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
9544         the lmf too.
9545
9546 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
9547
9548         * mini-codegen.c (get_register_spilling): Fix some warnings.
9549
9550 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
9551
9552         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
9553         elimination during exception handling. Enable fp elimination by
9554         default.
9555
9556         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
9557         elimination.
9558
9559 2005-10-16  Martin Baulig  <martin@ximian.com>
9560
9561         * mini-exceptions.c
9562         (mono_debugger_run_finally): New public method for the debugger.
9563
9564 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
9565
9566         * debug-mini.c (mono_debug_init_method): Fix warning.
9567
9568         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
9569         the 'exname' parameter const to fix some warnings.
9570
9571 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
9572
9573         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
9574         introduced by the previous patch.
9575
9576 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
9577
9578         * basic-float.cs: Add test for precision of float arithmetic.
9579
9580         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
9581         when loading/storing single values from/to memory.
9582
9583         * mini.c (mono_jit_compile_method_with_opt): Create the function
9584         pointers in the correct domain.
9585
9586 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
9587
9588         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
9589         introduced by previous patch.
9590         
9591         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
9592         when out_filter_idx is NULL.
9593
9594         * mini-exceptions.c: Don't run filter clauses twice during exception
9595         handling. Fixes #75755.
9596
9597 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
9598
9599         * aot.c: Add support for ldflda wrappers.
9600
9601         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
9602         #75902.
9603
9604 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
9605
9606         * mini.c, mini.h: do not consider exception handlers blocks when
9607         setting up interface variables.
9608
9609 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
9610
9611         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
9612
9613 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
9614
9615         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
9616         causes a regression.
9617
9618         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
9619
9620 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
9621
9622         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
9623         of the OP_P definitions.
9624
9625         * TODO: Add a proposal for dealing with the CEE/OP mess.
9626
9627         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
9628         optimizations from the x86 port.
9629
9630         * cpu-amd64.md: Ditto.
9631
9632         * basic.cs basic-long.cs: Add tests.
9633
9634 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
9635
9636         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
9637         Patrik Torstensson's implementation of my exception-handling
9638         optimization idea, when the exception object is not used
9639         (bug #62150).
9640
9641 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
9642
9643         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
9644         of the mul_imm optimizations from the old jit.
9645
9646 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
9647
9648         * mini.c, liveness.c: patch by Patrik Torstensson and
9649         Zoltan Varga to improve performance in methods with
9650         exception clauses.
9651
9652 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
9653
9654         * driver.c: Remove 'Globalization' entry from --version.
9655
9656 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
9657
9658         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
9659         there is a profiler interested in JIT events.
9660
9661         * aot.c: Load profile files produced by the AOT profiling module, and
9662         reorder methods based on the profiling info. Add a 'method_order' table
9663         to the AOT file to make mono_aot_find_jit_info work with the reordered
9664         methods.
9665
9666         * mini.h: Bump AOT file version info.
9667
9668 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
9669
9670         * mini-arm.h: work around what looks like a gcc bug when optimizations
9671         are enabled.
9672
9673 2005-09-28  Raja R Harinath  <rharinath@novell.com>
9674
9675         * Makefile.am (AM_CFLAGS): Don't use += to append inside
9676         conditionals.  Use ...
9677         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
9678
9679 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
9680
9681         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
9682         to determine the amount of memory to copy when passing valuetypes.
9683
9684         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
9685         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
9686
9687 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
9688
9689         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
9690         information about aot.
9691
9692 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
9693
9694         * *.c: Replace the use of {Enter,Leave}CriticalSection with
9695         macros. This will allow a deadlock debugger to easily be plugged
9696         in.
9697
9698 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
9699
9700         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
9701
9702 2005-09-27  Raja R Harinath  <rharinath@novell.com>
9703
9704         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
9705         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
9706         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
9707         ($(arch_built)) [CROSS_COMPILING]: Error out.
9708
9709 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
9710
9711         * aot.c: Add support for the no_special_static flag for classes.
9712
9713 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9714
9715         * Reapply reverted patches.
9716
9717         * *: Revert r50174 as well.
9718
9719         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
9720
9721 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9722
9723         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
9724
9725 2005-09-23  Miguel de Icaza  <miguel@novell.com>
9726
9727         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
9728         part of the SIG_HANDLER_SIGNATURE.  
9729
9730 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
9731
9732         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
9733         statistics.
9734
9735         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
9736         introduced by previous patch.
9737
9738 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
9739
9740         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
9741         saved registers too.
9742
9743         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
9744         upon the information returned by get_call_info ().
9745         
9746         * mini-x86.c (add_float): Fix stack size calculation.
9747         (mono_arch_call_opcode): Rewrite this so it works based up the
9748         information returned by get_call_info ().
9749         (mono_arch_get_this_vret_args): Ditto.
9750
9751 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
9752
9753         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
9754         in cinfo to determine the registers which need to be used.
9755
9756 2005-09-20  Miguel de Icaza  <miguel@novell.com>
9757
9758         * driver.c (mono_main): Add --server and --desktop flags. 
9759
9760 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
9761
9762         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
9763         registers as global registers.
9764
9765         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
9766         longer needed with the new register allocator.
9767
9768         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
9769
9770         * cpu-ia64.md: Remove unused opcodes.
9771         
9772         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
9773         
9774 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
9775
9776         * cpu-amd64.md: Remove unused opcodes.
9777
9778         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
9779         needed with the new register allocator.
9780
9781         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
9782         reg-reg moves.
9783
9784 2005-09-16  Raja R Harinath  <rharinath@novell.com>
9785
9786         * Makefile.am (check-local): Don't invoke semdel-wrapper.
9787
9788 2005-09-16  Martin Baulig  <martin@ximian.com>
9789
9790         * exceptions-amd64.c
9791         (throw_exception): Don't call mono_debugger_throw_exception() if
9792         we're a rethrow - see the FIXME in the code.
9793
9794 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
9795
9796         * mini.c (mono_init_exceptions): This only works on some architectures.
9797         
9798 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9799
9800         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
9801         on ia64.
9802
9803         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
9804
9805         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
9806         now in mini-exceptions.c.
9807
9808 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
9809
9810         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
9811         now in mini-exceptions.c.
9812
9813 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9814
9815         * exceptions-x86.c: Applied patch from Patrik Torstensson 
9816         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
9817
9818         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
9819         code into mini-exceptions.c. Add some assertions to it.
9820
9821 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
9822
9823         * aot.c (emit_section_change): Applied patch from "The Software Team" 
9824         (<software@solmersa.com>). Fix as errors on windows.
9825
9826 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9827
9828         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
9829         method info into the LMF.
9830
9831 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9832         
9833         * mini-ia64.c: Add proper unwind info for method epilogs.
9834
9835         * exceptions-ia64.c: Add some code to help debugging.
9836         
9837         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
9838
9839         * mini-exceptions.c: Fix warning.
9840
9841 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9842
9843         * mini.c: Really fix build.
9844
9845         * mini-x86.c mini-amd64.c: Fix build.
9846
9847 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9848
9849         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
9850
9851         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
9852         some Interlocked methods as intrinsics.
9853
9854         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
9855         for Thread methods as well.
9856
9857         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
9858
9859         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
9860
9861         * mini-ia64.c mini-x86.c mini-amd64.c 
9862         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
9863         OP_MEMORY_BARRIER.
9864         
9865         * mini.c (mono_init_exceptions): Fix build breakage.
9866
9867 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
9868
9869         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
9870         of instructions. Use the new ia64_unw_op macros for emitting unwind
9871         info.
9872
9873         * mini.c (mono_init_exceptions): Initialize exception handling
9874         related trampolines at startup.
9875
9876 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
9877
9878         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
9879
9880 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
9881
9882         * mini.c: Handle type loading errors gracefully during compilation and
9883         throw the appropriate exception.
9884
9885 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
9886
9887         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
9888         for the mono binary.
9889
9890 2005-09-09  Martin Baulig  <martin@ximian.com>
9891
9892         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
9893         the release.
9894
9895 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9896
9897         * mini-arm.h: use emulation for conv.r.un for the release.
9898
9899 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9900
9901         * mini-arm.c, objects.cs: more fixes and tests for them.
9902
9903 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9904
9905         * mini-arm.c: align structures to at least 4 bytes to be able
9906         to keep our current optimized memcpy.
9907
9908 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
9909
9910         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
9911
9912 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9913
9914         * mini.c: ignore SIGPIPE.
9915
9916 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
9917
9918         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
9919
9920         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
9921
9922 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
9923
9924         * mini.h: Add prototype for mono_allocate_stack_slots_full.
9925
9926 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9927
9928         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
9929         exception handling support.
9930         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
9931         patch by Brian Koropoff <briank@marakicorp.com>).
9932
9933 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
9934
9935         * mini.c: revert another 'optimization' which breaks when
9936         items on the eval stack need to be saved at a basic block end
9937         (bug #75940).
9938
9939 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9940
9941         * jit-icalls.c: for arrays, ensure we always provide
9942         lower bounds.
9943
9944 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
9945
9946         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
9947         
9948         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
9949
9950 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
9951
9952         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
9953         arguments in their original register.
9954
9955 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
9956
9957         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
9958         memset/memcpy.
9959
9960         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
9961         when ssapre is enabled.
9962
9963         * inssel-long.brg: Fix bug in previous patch.
9964
9965         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
9966         multiplication by a constant.
9967
9968 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
9969
9970         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
9971         icc.
9972
9973         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
9974         saving registers.
9975
9976 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
9977
9978         * inssel-arm.brg: apply changes tested by Brian Koropoff
9979         <briank@marakicorp.com>.
9980
9981 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
9982
9983         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
9984         
9985 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
9986
9987         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
9988         to the same register if dreg is just a base register.
9989         (print_ins): Improve printing of membase opcodes.
9990
9991         * inssel-x86.brg: Add optimized ldind(reg) rules.
9992
9993         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
9994
9995 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
9996
9997         * mini.c: when running under valgrind, set the stack bottom for
9998         the GC at the actual approximate stack for the app (fixes running
9999         mono with valgrind).
10000
10001 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
10002
10003         * mini.c: do no break at the first valuetype to init found
10004         (fixes bug #75791).
10005
10006 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
10007
10008         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
10009
10010 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
10011
10012         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
10013
10014 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
10015
10016         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
10017
10018 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10019
10020         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
10021
10022         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
10023         code.
10024
10025         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
10026         code.
10027
10028         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
10029         methods.
10030
10031 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
10032
10033         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
10034
10035 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10036
10037         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
10038         in the tail recursion optimization.
10039
10040         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
10041         debug info into the assembly file.
10042
10043         * iltests.il: Add test for filter regions.
10044
10045         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
10046         initial stack of filter regions. Fixes #75755.
10047
10048 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
10049
10050         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
10051         stack requirements.
10052
10053 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10054
10055         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
10056         the check for an already compiled method on non-ia64 platforms.
10057         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
10058         proper domain.
10059
10060         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
10061
10062         * inssel-x86.brg: Add some optimized call rules.
10063
10064 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
10065
10066         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
10067         method here.
10068
10069         * mini.h mini-trampolines.c: Pass the trampoline argument to 
10070         mono_arch_patch_delegate_trampoline.
10071
10072         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
10073
10074         * mini-trampolines.c: Fix build.
10075
10076         * mini-amd64.h: Add delegate trampolines.
10077
10078         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
10079
10080         * inssel-amd64.brg: Add optimized call rules.
10081         
10082         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
10083
10084         * inssel-ia64.brg: Add optimized ldind(reg) rules.
10085
10086 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
10087
10088         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
10089         change.
10090
10091         * mini-ia64.c: Remove LMF fixmes.
10092
10093         * mini-ia64.h: Remove most fields from LMF.
10094
10095         * inssel-ia64.brg (stmt): Fix unaligned access errors.
10096
10097         * mini-trampolines.c: Add support for IA64 function descriptors.
10098
10099         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
10100         for IA64 function descriptors.
10101
10102 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
10103
10104         * tramp-arm.c: patch the vtable for virtual calls. Added
10105         support code to register/unregister the LMF.
10106         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
10107         more LMF work.
10108
10109 2005-08-19  Dick Porter  <dick@ximian.com>
10110
10111         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
10112         bit value if needed.
10113
10114 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
10115
10116         * mini.c (mini_get_method): Move handling of wrapper data here.
10117
10118         * mini.c (mono_method_to_ir): Add support for dynamic methods.
10119
10120         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
10121         virtual.
10122
10123         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
10124         bblock->code does not remain empty.
10125
10126 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
10127
10128         * arrays.cs: Add regression test for #75832.
10129
10130         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
10131         rules. Fixes #75832.
10132
10133         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
10134         instruction scheduling.
10135
10136 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
10137
10138         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
10139
10140 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
10141
10142         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
10143
10144         * mini-codegen.c: Fix VC build.
10145
10146         * cpu-pentium.md: Increase length of atomic_exhange_i4.
10147
10148 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10149
10150         * mini.h: fix signature for mono_register_opcode_emulation.
10151
10152 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
10153
10154         * mini.c: Get rid of most of the helper_sig_... constants using
10155         mono_create_icall_signature ().
10156
10157 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
10158
10159         * jit-icalls.c (helper_ldstr): New helper function.
10160
10161         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
10162
10163         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
10164         throw, load the string using a helper call instead of creating a string object.
10165
10166         * aot.c: Update after LDSTR changes.
10167
10168         * mini.h: Bump AOT file version.
10169         
10170         * aot.c: Save class size info into the AOT file. Print more statistics during
10171         compilation.
10172
10173         * mini.h: Bump AOT file version.
10174
10175         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
10176         ordering of disasm cases. Fixes #74957.
10177
10178 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
10179
10180         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
10181         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
10182         the generic code needed for the ARM port.
10183
10184 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
10185
10186         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
10187         inssel-arm.brg: more ARM features and fixes.
10188
10189 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
10190
10191         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
10192         ARM port work in progress.
10193
10194 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
10195
10196         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
10197
10198         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
10199
10200         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
10201
10202         * inssel.brg (mini_emit_memset): Add support for unaligned access.
10203
10204         * *-ia64.*: Ongoing IA64 work.
10205         
10206         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
10207
10208 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
10209
10210         * TODO: Remove out-of-data todo stuff.
10211
10212         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
10213         dead code.
10214
10215         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
10216
10217         * mini.h: Bump corlib version.
10218
10219 2005-07-27  Martin Baulig  <martin@ximian.com>
10220
10221         * mini-codegen.c
10222         (create_copy_ins): Added `const unsigned char *ip' argument; set
10223         `copy->cil_code' from it.
10224
10225 2005-07-27  Martin Baulig  <martin@ximian.com>
10226
10227         * mini-exceptions.c (mono_handle_exception): Don't call
10228         mono_debugger_handle_exception() for filters.
10229
10230 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
10231
10232         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
10233         as well.
10234
10235 2005-07-26  Martin Baulig  <martin@ximian.com>
10236
10237         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
10238
10239         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
10240         helper_compile_generic_method() if the method is actually virtual
10241         and non-final.
10242
10243 2005-07-26  Martin Baulig  <martin@ximian.com>
10244
10245         * mini.c
10246         (trampoline_code): Renamed to `mono_trampoline_code' and made it
10247         public; this is now accessed directly by the debugger.
10248         (mono_generic_trampoline_code): Removed.
10249
10250         * debug-mini.c
10251         (mono_debug_init_method): Also add interncalls and wrappers.
10252
10253 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
10254
10255         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
10256
10257 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
10258
10259         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
10260
10261 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
10262
10263         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
10264
10265 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10266
10267         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
10268         getting TLS offsets on AMD64 too.
10269
10270 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
10271
10272         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
10273
10274 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
10275
10276         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
10277         inssel-arm.brg, mini-arm.h: ARM port work in progress.
10278
10279 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10280
10281         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
10282
10283         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
10284         to mini.c.
10285
10286         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
10287         mono_sparc_is_virtual_call ().
10288         
10289         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
10290
10291         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
10292         trampoline parameters.
10293
10294         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
10295         
10296         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
10297         to mono_arch_get_vcall_slot_addr.
10298
10299         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
10300         trampoline code.
10301
10302         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
10303
10304 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10305
10306         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
10307
10308 2005-07-19  Martin Baulig  <martin@ximian.com>
10309
10310         * exceptions-amd64.c (throw_exception): Call
10311         mono_debugger_throw_exception() here like we're doing it on i386.
10312
10313 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10314
10315         * mini-ia64.c: Add optimized TLS access support.
10316
10317 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
10318
10319         * mini-exceptions.c: Ongoing IA64 work.
10320
10321         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
10322
10323         * mini.c: Use the default optimization set when embedding. Fixes
10324         #75194.
10325
10326 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
10327
10328         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
10329         of trampolines to a separate file.
10330
10331         * mini-trampolines.c: New file.
10332
10333         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
10334         separate file.
10335         
10336         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
10337         amd64/ia64 code.
10338
10339         * mini-codegen.c: Fix cygwin build.
10340
10341 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
10342
10343         * mini.c: Add some minor changes needed by the IA64 port.
10344
10345         * *-ia64.*: Ongoing IA64 work.
10346
10347 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
10348
10349         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
10350         trampolines into arch-independent and arch-dependent parts.
10351
10352         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
10353
10354 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
10355
10356         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
10357
10358         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
10359         the xp-regalloc-branch for amd64.
10360
10361         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
10362         xp-regalloc-branch for x86.
10363
10364 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
10365
10366         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
10367
10368 2005-07-06  Martin Baulig  <martin@ximian.com>
10369
10370         * mini.c
10371         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
10372         (mono_jit_runtime_invoke): Likewise.
10373
10374 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
10375
10376         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
10377         on x86 too.
10378         
10379         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
10380         without loading their metadata. Reorganize the file format so exception handling+
10381         debug info is kept separate from normal method info. Create MonoJitInfo 
10382         structures for methods lazily.
10383
10384         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
10385         loading metadata.
10386         (x86_class_init_trampoline): Patch AOT class init trampolines too.
10387
10388         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
10389
10390         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
10391         in AOT code.
10392
10393         * mini.h: Bump AOT file version.
10394
10395 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
10396
10397         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10398
10399 2005-07-01  Raja R Harinath  <rharinath@novell.com>
10400
10401         * Makefile.am (check-local): Call semdel-wrapper.
10402
10403 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
10404
10405         * mini-x86.c: Revert the last change as it seems to break the build..
10406
10407 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
10408
10409         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10410         
10411         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
10412
10413 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
10414
10415         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
10416         outside of the macro, so strange stuff doesn't happen with gcc4
10417         (NEW_AOTCONST_TOKEN): Likewise.
10418
10419 2005-06-28  Martin Baulig  <martin@ximian.com>
10420
10421         * mini.c (mini_class_is_system_array): New static method; use this
10422         instead of `klass->parent == mono_defaults.array_class' everywhere
10423         since this also works for the new generic array class.
10424
10425 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
10426
10427         * inssel.brg: Remove warnings.
10428
10429 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
10430
10431         * mini-ia64.c: Ongoing IA64 work.
10432
10433         * basic-float.cs: Add float->i1 conversion test.
10434
10435         * iltests.il: Add conv.u4 test.
10436
10437 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
10438
10439         * inssel-long.brg: Fix bug caused by last change.
10440
10441 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
10442
10443         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
10444         BSDs.  Allows the x86 JIT to work on OSX86
10445
10446 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
10447
10448         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
10449         u4->i8 conversion.
10450
10451         * mini-ia64.c: Ongoing IA64 work.
10452
10453 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
10454
10455         * mini-ia64.c: Ongoing IA64 work.
10456
10457         * driver.c: Clean up jit_code_hash as well when using --regression.
10458
10459         * inssel-long.brg: Fix long->i4/u4 conversion rules.
10460
10461         * basic-long.cs: Add tests for long->u4 conversion.
10462
10463 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
10464
10465         * mini.c: Take mono_get_domainvar out of macros. This makes sure
10466         that we do not depend on undefined C behavior: the order stuff
10467         gets evaluated within an expression. Fixes mono when compiled on
10468         GCC 4.
10469
10470 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
10471
10472         * *-ia64.*: Ongoing IA64 work.
10473
10474         * aot.c: Lower memory usage while loading AOT methods.
10475
10476         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
10477
10478         * mini.h: Bump AOT file format version.
10479
10480 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
10481
10482         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
10483
10484 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
10485
10486         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
10487         not on callee assembly). Fixed some comments.
10488
10489 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
10490
10491         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
10492         it gets proper disassembly.
10493         (emit_method_info): Remove some dead code.
10494
10495         * mini.c (mini_method_compile): Allways allocate the GOT var in
10496         mono_method_to_ir for emulating opcodes.
10497
10498 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
10499
10500         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
10501         before freeing the code memory. Fixes #74990.
10502
10503         * objects.cs: Add regression test for #74992.
10504
10505         * liveness.c: Extend live ranges of arguments to the beginning of the
10506         method. Fixes #74992.
10507
10508         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
10509         so it points into the faulting instruction.
10510
10511 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
10512
10513         * jit-icalls.c (mono_imul_ovf): Add exception handling.
10514
10515         * *-ia64.*: Ongoing IA64 work.
10516
10517         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
10518
10519 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
10520
10521         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
10522
10523         * *-ia64.*: Ongoing IA64 work.
10524
10525 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
10526
10527         * basic-long.cs: Add tests for add/sub.ovf.
10528
10529         * basic.cs: Add tests for sub.ovf.
10530
10531         * *-ia64.*: Ongoing IA64 work.
10532
10533 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
10534
10535         * *-ia64.*: Ongoing IA64 work.
10536
10537         * basic.cs: Add conv.ovf.i4.un test.
10538
10539 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
10540
10541         * mini.c: (remove_block_if_useless) Fixed bug 75061.
10542         
10543 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10544
10545         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
10546
10547 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
10548
10549         * *-ia64.*: Ongoing IA64 work.
10550
10551 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10552
10553         * trace.[ch]:
10554         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
10555
10556 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
10557
10558         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
10559
10560 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
10561
10562         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
10563
10564         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
10565         of a call is callable by a near call.
10566
10567 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
10568
10569         * mini-ia64.c: Ongoing IA64 work.
10570
10571 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
10572
10573         * genmdesc.c: Make the generated array non-static.
10574
10575         * inssel-long.brg: Fix LSHR_IMM rule.
10576
10577         * *-ia64.*: Ongoing IA64 work.
10578
10579         * *-ia64.*: Ongoing IA64 work.
10580
10581 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10582
10583         * *-ia64.*: Ongoing IA64 work.
10584
10585         * *-ia64.*: Ongoing IA64 work.
10586         
10587         * mini-ia64.c: Ongoing IA64 work.
10588
10589         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
10590
10591 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10592
10593         * objects.cs basic-calls.cs: Move some tests to objects.cs.
10594         
10595         * objects.cs basic-long.cs: Move some tests to objects.cs.
10596
10597 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
10598
10599         * *-ia64.*: Ongoing IA64 work.
10600
10601         * iltests.il: Add a new test.
10602
10603         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
10604         newobj. Fixes #75042.
10605
10606 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
10607
10608         * *-ia64.*: Ongoing IA64 work.
10609         
10610         * *-ia64.*: Ongoing IA64 work.
10611         
10612         * *-ia64.*: Ongoing IA64 work.
10613
10614         * basic.cs objects.cs: Move tests accessing static variables as well.
10615
10616         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
10617
10618 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
10619
10620         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
10621
10622         * driver.c: Always print failed tests.
10623
10624         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
10625         frame pointer.
10626
10627         * *ia64*: Ongoing IA64 work.
10628
10629 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
10630
10631         * basic.cs: Add tests for add.ovf. Fix warnings.
10632
10633 2005-05-18  Miguel de Icaza  <miguel@novell.com>
10634
10635         * driver.c (mono_main): Avoid crash if no argument is passed to
10636         --break;  Do not use g_error, but f_printf.   And fix all other
10637         ocurrences of the same crash.
10638
10639 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
10640
10641         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
10642         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
10643         Fixes #74742.
10644
10645 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
10646
10647         * *-ia64.*: Add beginnings of IA64 backend.
10648
10649         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
10650
10651 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
10652
10653         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
10654         Fixes #74925.
10655
10656         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
10657
10658         * mini-amd64.c: Fix a warning.
10659
10660 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
10661
10662         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
10663         in float_neg. Fixes #74897.
10664
10665         * mini-amd64.c (emit_call): Fix another near call bug.
10666
10667 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
10668
10669         * declsec.c: Keep the appdomain information in the structure. Added a 
10670         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
10671         value gets overwritten).
10672         * declsec.h: Set the default MonoArray for the the stack to 6. Added
10673         an MonoAppDomain member to MonoSecurityFrame.
10674         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
10675         used in the stack walk. Now use a MonoArray which grow (double) when
10676         it gets full.
10677
10678 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
10679
10680         * mini.c: Re-enabled runtime cleanup, since running threads should
10681         now properly stop when exiting.
10682
10683 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
10684
10685         * mini-codegen.c: New file contaning the arch-independent local
10686         register allocator. Not used by any architectures yet.
10687
10688         * mini.h linear-scan.c: Merge some changes from the 
10689         mini-xp-local-regalloc branch.
10690
10691 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
10692
10693         * mini-amd64.c (emit_call): Fix calls to native functions when the
10694         runtime is compiled as a shared library. Fixes #74756.
10695
10696         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
10697         on a literal field. Fixes #74751.
10698
10699 2005-04-25  Raja R Harinath  <rharinath@novell.com>
10700
10701         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
10702
10703 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
10704
10705         * objects.cs: Add missing null casting test.
10706
10707 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
10708
10709         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
10710         in wrapper methods. Also rename 'address' variable to 'offset'.
10711
10712 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
10713
10714         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
10715         warnings.
10716         
10717         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
10718
10719         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
10720         work on windows.
10721
10722 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10723
10724         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
10725
10726 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10727
10728         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
10729         just the last bytes.
10730
10731 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10732
10733         * aot.c (mono_compile_assembly): Fix warning.
10734
10735         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
10736         by the _MSC_VER stuff.
10737
10738 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
10739
10740         * inssel-long.brg: Fix #74588.
10741
10742         * cpu-amd64.md: Fix #74591.
10743
10744         * iltests.il: Add new regression tests.
10745
10746 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
10747
10748         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
10749         valuetype.
10750
10751 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
10752
10753         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
10754
10755         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
10756         from Bill Middleton <flashdict@gmail.com>.
10757
10758 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
10759
10760         * arrays.cs: Add new regression test. Fix warnings.
10761
10762 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
10763
10764         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
10765         and leakage in CKFINITE.
10766
10767         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
10768         this to a null op since it is called on amd64 too.
10769
10770         * exceptions-amd64.c (get_throw_trampoline): Align stack.
10771
10772         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
10773         body since this is not used on amd64.
10774         
10775         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
10776
10777         * mini-amd64.c: Remove obsolete fixmes.
10778
10779         * mini.c (print_method_from_ip): Fix debugging support.
10780
10781 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10782
10783         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
10784         so that expressions that don't give much gain are not reduced.
10785         * ssapre.h: Likewise.
10786
10787 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
10788
10789         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
10790
10791         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
10792
10793         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
10794
10795 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
10796
10797         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
10798
10799         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
10800
10801 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
10802
10803         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
10804         stack touching.
10805
10806         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
10807
10808         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
10809
10810         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
10811
10812         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
10813         MONO_ARCH_USE_SIGACTION. Fixes #74252.
10814
10815         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
10816
10817         * mini-x86.c: Fix up stack overflow handling.   
10818
10819         * exceptions.cs: Add new regression test.
10820
10821 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
10822
10823         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
10824         mono_jit_thread_attach.
10825
10826         * mini.c (mono_method_to_ir): Verify called method is not abstract.
10827
10828 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10829
10830         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
10831         avoid calling constructors using callvirt.
10832
10833         * inssel.brg: Fix #74073.
10834
10835 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
10836
10837         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
10838         compilation with non-GCC compilers.
10839         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
10840         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
10841
10842 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
10843
10844         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
10845         klass->interface_offsets (will likely fix bug#74073).
10846
10847 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10848
10849         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
10850
10851 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
10852
10853         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
10854         to amd64_div_reg_size ().
10855         
10856         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
10857
10858 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
10859
10860         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
10861
10862 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10863
10864         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
10865
10866 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10867
10868         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
10869         
10870         * mini.c (mono_precompile_assembly): Load and precompile referenced
10871         assemblies as well. Fixes #74015.
10872
10873 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
10874
10875         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
10876
10877 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
10878
10879         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
10880         a lot of checks and (anyway) permissions cannot work until corlib is 
10881         loaded.
10882
10883 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
10884
10885         * mini-ppc.c: fixed ABI issue on sysv/ppc.
10886
10887 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
10888
10889         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
10890         calls (fixes bug#72824).
10891
10892 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10893
10894         * mini.c: fix tail recursion elimination (see test in bug#73936).
10895
10896 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
10897
10898         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
10899         some fp functions in sse2 mode.
10900
10901 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
10902
10903         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
10904
10905 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
10906
10907         * mini.h mini.c: Add mono_get_jit_tls_key ().
10908
10909         * mini-x86.c: Enable fast TLS support on windows.
10910
10911 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
10912
10913         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
10914         * mini.c: Check for p/invoke method when generating code. If a
10915         p/invoke method, or it's class, isn't decorated with [Suppress
10916         UnmanagedCodeSecurity] then generate code to call System.Security.
10917         UnmanagedDemand (only if the security manager is active).
10918
10919 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10920
10921         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
10922         last change as it seems to cause strange crashes.
10923         
10924 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10925
10926         * *.c: handle unsafe function pointers where needed.
10927
10928 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10929
10930         * mini.c (mono_jit_free_method): Remove the fixme too.
10931
10932 2005-03-15  Miguel de Icaza  <miguel@novell.com>
10933
10934         * mini.c: As discussed, make the code actually free the delegate
10935         thunk now, to enable the debugging of delegate problems, use
10936         MONO_DEBUG=1 when running Mono. 
10937
10938         This takes also care of parts of the leaks as seen by Joe.
10939
10940 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
10941
10942         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
10943         thread_tls_offset calculation.
10944
10945 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
10946
10947         * declsec.c: Reworked linkdemand checks for icall. The previous code
10948         was using the declaration code (untrusted) and didn't work as expected
10949         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
10950         specific case.
10951
10952 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
10953
10954         * iltests.il: Add new localloc test.
10955
10956         * mini-amd64.c: Handle large stack allocations the same way as on
10957         windows if stack overflow handling is working.
10958         
10959         * mini-amd64.c: Allocate the signal stack using mmap.
10960
10961         * mini.c (sigsegv_signal_handler): Fix reading of context.
10962
10963         * mini-exceptions.c: Fix up stack overflow handling.
10964
10965         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
10966
10967         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
10968
10969         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
10970
10971         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
10972
10973         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
10974         tramp_init functions as they are no longer needed.
10975
10976 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
10977
10978         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
10979         
10980         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
10981
10982         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
10983         
10984         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
10985         support that now.
10986
10987         * mini-ops.h: Add OP_LMUL_IMM.
10988
10989         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
10990         long mul/div opcodes as intrinsic.
10991
10992         * mini-amd64.c (emit_call): Handle the case when the callee might be
10993         an AOT method.
10994
10995 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
10996
10997         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
10998         extra safe.
10999         
11000         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
11001
11002         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
11003
11004 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
11005
11006         * mini.c (mono_codegen): Don't leak here, to help people running
11007         monogrind.
11008
11009 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
11010
11011         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
11012         conversions in sse2 mode.
11013
11014         * basic-float.cs: Add regression test.
11015         
11016         * mini-amd64.c: Reenable sse2.
11017
11018 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
11019
11020         * mini-amd64.c: Disable sse2 until some regressions are fixed.
11021
11022 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
11023
11024         * driver.c: Copyright text should include 2005.
11025         
11026 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
11027
11028         * cpu-amd64.md (load_membase): Fix more max lengths.
11029
11030 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
11031
11032         * cpu-amd64.md (load_membase): Fix max length.
11033
11034         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
11035
11036         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
11037
11038         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
11039         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
11040
11041         * basic-float.cs: Add rounding regression test.
11042
11043         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
11044
11045 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
11046
11047         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
11048         structures in registers for pinvoke wrappers.
11049
11050 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
11051
11052         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
11053
11054 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
11055
11056         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
11057         wrapper to mono_jit_thread_attach.
11058
11059         * mini.c (mini_jit_thread_attach): New jit icall.
11060
11061         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
11062         native->managed wrappers.
11063
11064         * exceptions.cs: Add new regression test.
11065
11066         * mini.c (optimize_branches): Check regions in the cbranch to throw
11067         block case as well. Fixes #73242.
11068
11069 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11070
11071         * mini.c: thread safety fixes.
11072
11073 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
11074
11075         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
11076         patching stuff, since delegates use jump trampolines so there is
11077         no caller.
11078
11079         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
11080         jump trampolines.
11081         
11082         * tramp-amd64.c: Fix build.
11083
11084         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
11085         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
11086
11087         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
11088         Rename this to mono_arch....
11089         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
11090
11091         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
11092
11093         * mini-amd64.c (emit_call): If both the caller and the callee is
11094         guaranteed to have 32 bit addresses, emit a normal call.
11095
11096         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
11097
11098         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
11099         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
11100         method_ptr inside delegates.
11101
11102 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
11103
11104         * mini.c (mono_jit_free_method): Free the method info even if the native code is
11105         invalidated. Fixes #73001.
11106
11107         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
11108
11109         * mini-x86.c: Only use stdcall for pinvokes on windows.
11110
11111 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
11112
11113         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
11114         * mini-x86.c: remove unreliable __thread var offset detection,
11115         use the correct accessors and enable by default.
11116
11117 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
11118
11119         * mini.c (mono_jit_free_method): Fix memory leak.
11120
11121 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
11122
11123         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
11124
11125 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
11126
11127         * cpu-amd64.md: Fix lengths of atomic opcodes.
11128
11129 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
11130
11131         * driver.c: try to not imply using ICU is any good.
11132
11133 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
11134
11135         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
11136         functions as inline ops.
11137
11138         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
11139         some Interlocked functions as inline ops.
11140
11141         * mini.c (move_basic_block_to_end): Fix bug in last patch.
11142
11143         * mini.h (MonoBasicBlock): Reorganize fields a bit.
11144
11145         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
11146
11147         * mini.c: Add support for OP_NOT_TAKEN.
11148
11149         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
11150         structures in registers for pinvoke wrappers.
11151
11152         * mini-amd64.c: Fix warnings.
11153
11154 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
11155
11156         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
11157
11158         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
11159
11160         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
11161         address instead of loading the address from it.
11162
11163         * mini-x86.c: Add support for returning small structs in registers
11164         on Win32. Fixes part of #70864.
11165         
11166 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
11167
11168         * trace.c (get_token): Improve error checking.
11169
11170 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
11171
11172         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
11173
11174 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
11175  
11176         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
11177         it can be reused for MonoClass.
11178         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
11179         _LINKDEMAND.
11180
11181 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
11182
11183         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
11184         instead of a MonoReflectionMethod. The method information wasn't used
11185         when displaying SecurityException details (but will be now).
11186
11187 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
11188
11189         * Makefile.am : windows build fix.
11190
11191 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
11192
11193         * iltests.il: Add new regression test.
11194
11195         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
11196         #72522.
11197
11198 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
11199  
11200         * mini.c: Moved linkdemand check into helper function check_linkdemand
11201         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
11202         LDFTN, LDVIRTFTN).
11203
11204 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
11205
11206         * declsec.c: Added statistics counter for different kinds of 
11207         LinkDemands.
11208         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
11209         (and commented) declaration.
11210         * mini.c: Added statistics counter for security Demand code 
11211         generation. Added display of security statistics.
11212
11213 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
11214
11215         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
11216         Fix compilation errors under gcc-2.95.
11217
11218 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
11219
11220         * mini.c, driver.c: Use the new jit trampoline hashtable
11221
11222 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11223
11224         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
11225
11226 2005-02-11  Martin Baulig  <martin@ximian.com>
11227
11228         * debug-mini.c (mono_debug_close_method): Free the line number array.
11229
11230 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
11231
11232         * aot.c: Break up large methods into smaller ones. Share GOT slots for
11233         icalls.
11234
11235         * mini.h: Bump AOT file format version. 
11236
11237 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
11238
11239         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
11240         APTC and P/Invoke.
11241         * declsec.h: Added macros to get/set lazyly initialized security 
11242         informations about assemblies. Added new enum for different type of
11243         possible LinkDemand violation. Added function to check LinkDemands.
11244         * mini.h: Added a field to MonoCompile to hold any security violation
11245         detected when JITting a method (so it can be thrown later).
11246         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
11247         and CEE_CALLVIRT. Added code to throw exception at the end of
11248         mini_method_compile (note: the exception is unhandled right now).
11249
11250 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
11251
11252         * mini.c, jit-icalls.c: use the managed implementation of
11253         memset for initobj and memset, to avoid managed <-> unmanaged
11254         transitions.
11255
11256 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
11257
11258         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
11259         optimization if it would need a GOT var.
11260
11261         * basic.cs: Add tests for constant propagation and switch statements.
11262
11263         * ssa.c: Fix out-of-range constant propagation and switch statements.
11264
11265 2005-02-09    <vargaz@freemail.hu>
11266
11267         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
11268
11269 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
11270
11271         * cpu-amd64.md (load_membase): Fix max length of load_membase.
11272
11273 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11274
11275         * mini.c: update to new signature of mono_class_get_allocation_ftn().
11276
11277 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
11278
11279         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
11280         arithmetic operations.
11281
11282 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
11283
11284         * mini-ppc.c: add a workaround for broken user code that
11285         DllImports vararg functions with non-vararg signatures.
11286
11287 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
11288
11289         * mini.c (mono_jit_compile_method_inner): Add detection and a 
11290         meaningfull error message for assemblies written in Managed C++.
11291
11292         * tramp-amd64.c mini-amd64.h: Add support for 
11293         create_trampoline_from_token ().
11294
11295         * aot.c mini-x86.c abcremoval.c: Applied patch from
11296         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
11297
11298 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
11299
11300         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
11301         which takes a MonoImage/token as parameter instead of a MonoMethod.
11302
11303         * aot.c: Use the new trampoline for initializing vtables.
11304
11305         * aot.c: Add support for ldfld/stfld_remote wrappers.
11306
11307         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
11308         rules for compare <MEM>, IMM.
11309
11310         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
11311
11312         * aot.c: Handle inherited finalizers correctly.
11313
11314 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
11315
11316         * inssel.brg (stmt): Add a missing _setup_... ().
11317
11318         * aot.c: Save some parts of the class state to the AOT file and use it
11319         to recompute that state when a class is initialized.
11320
11321         * mini.c: Install AOT hooks into the runtime.
11322
11323         * mini.h: Bump AOT file format version.
11324         
11325         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
11326         Fixes #72148.
11327
11328         * iltests.il: Add new test.
11329
11330 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
11331
11332         * mini.c: fix typo.
11333
11334 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
11335
11336         * mini.c: setup the statistical profiler in the thread attach
11337         callback to cope with the new single thread code.
11338
11339 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
11340
11341         * mini-ppc.c: ensure we have enough room for the profiler
11342         calls (fixed bug#72084).
11343
11344 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
11345
11346         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
11347         it.
11348
11349 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11350
11351         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
11352
11353 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11354
11355         * ssapre.c: Fixed an issue with down safety (this allows IronPython
11356         to succesfully execute parrotbench).
11357         * ssapre.h: Likewise.
11358
11359 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11360
11361         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
11362         variable for stores to method arguments (fixes a SSAPRE issue).
11363
11364 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11365
11366         * mini.c: handle value types in dup, fixes gen-112.cs.
11367
11368 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
11369
11370         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
11371         sequence for calls in dynamic methods to avoid thunks.
11372
11373 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
11374
11375         * mini.c: correctly remove dynamic methods from the hashtable.
11376
11377 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11378
11379         * driver.c: Disabled SSAPRE until fix the bug that appears
11380         in IronPython's parrotbench.
11381
11382 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
11383
11384         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
11385
11386         * mini.c (mono_method_to_ir): Revert the previous change.
11387         
11388         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
11389         when AOT compiling.
11390
11391         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
11392         mono_jit_info_table_find () etc. when running under valgrind.
11393
11394         * inssel.brg: Fix warnings.
11395
11396         * mini-exceptions.c: Fix warnings.
11397
11398 2005-01-31  Martin Baulig  <martin@ximian.com>
11399
11400         * driver.c (compile_all_methods_thread_main): Don't try to compile
11401         generic methods or anything which has type parameters.
11402
11403 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
11404
11405         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
11406
11407         * TestDriver.cs: Add --verbose flags.
11408
11409         * graph.c ssa.c: Fix 64 bit warnings.
11410         
11411         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
11412         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
11413         Fix 64 bit warnings.
11414
11415         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
11416         variable not spotted by gcc.
11417         
11418         * mini-amd64.c inssel-amd64.brg: Applied patch from  
11419         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
11420         X86_COMPARE_MEMBASE opcodes.
11421
11422         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
11423
11424 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
11425
11426         * *: MonoMethod->signature might be NULL now. You *MUST* use
11427         mono_method_signature.
11428
11429 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
11430
11431         * driver.c (compile_all_methods_thread_main): Compile the methods
11432         without invoking cctors.
11433
11434 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11435
11436         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
11437         * basic-calls.cs: test for the above.
11438
11439 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
11440
11441         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
11442         MonoJitInfo changes.
11443
11444 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
11445
11446         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
11447         eagerly if it contains dynamic methods.
11448         
11449         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
11450
11451         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
11452         trace, it is now computed by an icall from trace_ips.
11453         
11454         * mini-exceptions.c: Fix a warning.
11455
11456 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
11457
11458         * mini-exceptions.c: don't bother getting stack trace info if
11459         it's not going to be used.
11460
11461 2005-01-27  Raja R Harinath  <rharinath@novell.com>
11462
11463         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
11464         ssapre-mini-ops.h.
11465
11466 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
11467
11468         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
11469
11470         * aot.c: Avoid calling mono_method_get_header () if not needed.
11471
11472         * mini.h: Bump AOT file format version.
11473         
11474         * mini.c (mono_emit_native_call): Allocate a GOT var here.
11475
11476         * mini.c (mono_print_tree): Print more info for calls.
11477
11478 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
11479
11480         * declsec.h: Remove warning by adding missing include for marshal.h
11481
11482 2005-01-26  Martin Baulig  <martin@ximian.com>
11483
11484         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
11485         `ip' twice.
11486
11487 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
11488
11489         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
11490         flags.
11491
11492         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
11493
11494         * aot.c (mono_compile_assembly): Fix a warning.
11495
11496 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
11497
11498         * declsec.c: Look for security attributes on the original MonoMethod 
11499         (and not the wrapped one). This fix permissions on icalls.
11500
11501 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
11502
11503         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11504
11505         * mini.c (mono_allocate_stack_slots): Add a fixme.
11506
11507         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11508
11509 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11510
11511         * inssel.brg: optimize casts of sealed types (more
11512         optimizations waiting for fixes in remoting).
11513
11514 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
11515
11516         * inssel.brg (stmt): Add another dummy rule.
11517
11518         * driver.c: Fix warnings.
11519
11520         * driver.c (mono_main): If running under valgrind, instruct glib to use
11521         the system allocation functions so valgrind can track the memory
11522         allocated by the g_... functions.
11523
11524         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
11525
11526         * mini-ops.h: Add OP_DUMMY_STORE opcode.
11527
11528         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
11529
11530         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
11531         variables in try regions.
11532
11533         * mini.c (mini_method_compile): Don't disable optimizations on large
11534         methods when AOT compiling.
11535
11536         * mini.c (mono_allocate_stack_slots): New arch independent method to 
11537         allocate stack slots. Not yet used.
11538
11539 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
11540
11541         * debug-mini.c (mono_debug_close_method): Plug some leaks.
11542
11543 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
11544
11545         * mini-ppc.c: make the branch info relative as the code
11546         buffer can be reallocated.
11547
11548 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
11549
11550         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
11551         * driver.c: Removed the AOT/security restriction. Now initialize the
11552         security manager (in metadata) if --security is used.
11553         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
11554         rather than the pointer to declarative security, when AOT is used.
11555
11556 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
11557
11558         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
11559         basic blocks, reduced intrinsic exception throwing code size.
11560
11561 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
11562
11563         * driver.c (mini_usage): Reorder the usage screen.
11564
11565 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
11566
11567         * mini.c (mono_resolve_patch_target): Fix warning.
11568
11569 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
11570
11571         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
11572         previous patch.
11573
11574         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11575
11576         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
11577         breaks the amd64 build.
11578
11579         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
11580         register allocation. Fixes #71454.
11581
11582         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11583
11584         * arrays.cs: Add new regression test.   
11585
11586 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11587
11588         * ssapre.c: Turned usage of snprintf to GString.
11589         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
11590         (I left it on by mistake in my previous commit).
11591
11592 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
11593
11594         * mini.c, cfold.c, basic-calls.cs: preserve side effects
11595         on cond branch optimization (fixes bug# 71515).
11596
11597 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11598
11599         * abcremoval.c: Fixed bug 71062.
11600         * abcremoval.h: Likewise.
11601
11602 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11603
11604         * mini.c: Added a new functionality to optimize_branches, the removal
11605         of useless basic blocks, and fixed some problem in the removal of
11606         critical edges; some utility functions added for both purposes.
11607         * ssapre.c: Added complex expression support, and fixed bug 70637.
11608         * ssapre.h: Likewise.
11609         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
11610         enabled in SSAPRE.
11611         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
11612         * driver.c: Re-enabled SSAPRE.
11613
11614 2005-01-19  Martin Baulig  <martin@ximian.com>
11615
11616         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
11617         the result of mono_get_method_constrained().
11618
11619 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
11620
11621         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
11622         manager.
11623
11624 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
11625
11626         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
11627         be detected.  Fixes #59296.
11628
11629 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
11630
11631         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
11632         which can happen. Fixes #71361.
11633
11634 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
11635
11636         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
11637         manager.
11638
11639 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
11640
11641         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
11642         appdomain-unload.exe to fail.
11643         
11644         * mini.c: Fix some memory leaks.
11645
11646 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
11647
11648         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
11649         Fixed bug and sped up some codepaths.
11650
11651 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
11652
11653         * mini.c: Fix some memory leaks.
11654
11655         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
11656         conversion.
11657
11658         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
11659
11660         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
11661         #71320.
11662
11663         * iltests.il: Add regression test for #71320.
11664
11665 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
11666
11667         * mini.c (mono_codegen): Fix installation of profiler hooks.
11668
11669         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
11670
11671 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
11672
11673         * mini.h, mini.c, cfold.c: optimize access to enum
11674         readonly fields, too. Eval conditional branches if possible
11675         to perform unreachable code removal in more cases.
11676
11677 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
11678
11679         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
11680
11681         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
11682         code manager.
11683
11684         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
11685         WinXP DEP. Fixes #71244.
11686
11687 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
11688
11689         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
11690
11691 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
11692
11693         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
11694
11695 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
11696
11697         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
11698         changes.
11699
11700         * mini.h: Bump AOT version.
11701
11702         * mini.h (MonoCompile): Change exvar to a hash table.
11703
11704         * mini.c: Allocate a separate exvar for each handler block.
11705
11706         * mini.c: Get rid of the computation of filter_lengths, its not needed.
11707
11708         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
11709         ex var with the pending exception and only throw if the two are equal.
11710         Fixes #68552.
11711         
11712         * exceptions.cs: Add tests for rethrow and nested catch clauses.
11713
11714         * mini-x86.c: Fix warnings.
11715
11716         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
11717         used by all the ports now.
11718
11719         * aot.c: Add write-symbols and save-temps options.
11720
11721 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11722
11723         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
11724
11725 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
11726
11727         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
11728         operations.
11729
11730         * tramp-s390.c: Check vtable slot belongs to the domain.
11731
11732         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
11733         as per other platforms.
11734
11735         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
11736
11737 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
11738
11739         * driver.c: we don't run the Main() code in a subthread anymore.
11740
11741 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
11742
11743         * mini.c: added experimental rtc support in the statistical
11744         profiler: if the user has the permission, more accurate statistics
11745         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
11746         The MONO_RTC value must be restricted to what the linux rtc allows:
11747         power of two from 64 to 8192 Hz.
11748
11749 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11750
11751         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
11752
11753 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
11754
11755         * mini-ppc.c: better icache flush for smp.
11756
11757 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
11758
11759         * mini-amd64.c (emit_move_return_value): Fix memory leak.
11760
11761         * mini-x86.c (get_call_info): Add the get_call_info () code from the
11762         amd64 port, not yet used.
11763
11764 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11765
11766         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
11767         a struct type.
11768
11769 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
11770
11771         * driver.c: Added --security option to activate the security manager.
11772         Right now this will allow code generation for declarative demands and
11773         is disabled when AOT is specified.
11774         * mini.c: Add code generation for declarative security demands.
11775         * mini.h: Add mono_use_security_manager as an extern gboolean.
11776
11777 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11778
11779         * aot.c (mono_compile_assembly): Speed up compilation a bit by
11780         emitting more dense assembly code.
11781
11782         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
11783         exception throwing stuff.
11784
11785 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
11786
11787         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
11788         dead code.
11789
11790         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
11791         left in by mistake.
11792
11793         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
11794         fixed.
11795
11796         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
11797
11798         * tramp-*.c: Only patch vtable slots if the object is in the current
11799         domain. Fixes appdomain-unload.exe.
11800
11801         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
11802         
11803         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
11804         x86 branch.
11805
11806 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11807
11808         * mini.c (reverse_branch_op): New helper function.
11809
11810         * mini.c (optimize_branches): Run the new optimization only on 
11811         platforms which support it. Also reverse all kinds of branches.
11812
11813         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
11814
11815         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
11816         a throw statement.
11817
11818         * mini.c (optimize_branches): Reverse not-equals branches if the false
11819         bblock is a throw. This happens a lot of time with argument checking in
11820         corlib.
11821
11822         * mini.c (mono_codegen): Add support for placing basic blocks after
11823         the function epilogue.
11824
11825         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
11826         function epilogue.
11827         
11828 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
11829
11830         * mini.c (setup_stat_profiler): Only set this up if the platform
11831         supports ITIMER_PROF.
11832
11833 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11834
11835         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
11836         previous patch.
11837
11838         * inssel.brg: Fix a warning.
11839
11840 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11841
11842         * mini.c: added support for statistical profiler 
11843         (run with: --profile=default:stat).
11844
11845 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
11846
11847         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
11848
11849         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
11850
11851         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
11852         related to global registers from the amd64 port.
11853
11854 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
11855
11856         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
11857
11858         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
11859         with global registers.
11860         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
11861
11862         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
11863
11864 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
11865
11866         * debug-mini.c (encode_value): Fix off-by-one.
11867
11868         * aot.c (encode_value): Likewise.
11869
11870         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
11871
11872 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
11873
11874         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
11875         AOT.
11876
11877         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
11878         
11879         * aot.c (emit_method_info): Increase size of temp buffer.
11880
11881         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
11882         the AOT case.
11883
11884 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
11885
11886         * aot.c (emit_method_info): Fix build.
11887         
11888         * aot.c: Further rework of the AOT file format to reduce the size of
11889         the method info data.
11890
11891         * mini.h: Bump AOT file format version.
11892
11893 2004-12-27  Martin Baulig  <martin@ximian.com>
11894
11895         * mini.c (mini_get_method): New static method; call
11896         mono_get_method_full() and mono_get_inflated_method().
11897         (mono_method_to_ir): Use mini_get_method() instead of
11898         mono_get_method_full(). 
11899
11900 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
11901
11902         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
11903
11904 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
11905
11906         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
11907
11908         * inssel-amd64.brg: Add some optimization rules.
11909
11910 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
11911
11912         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
11913         standard not GC'd stuff is fine.
11914
11915 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
11916
11917         * aot.c: Rework the AOT file format to get rid of most of the global
11918         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
11919
11920         * mini.h: Bump AOT file format version.
11921         
11922 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
11923
11924         * mini.h: Bump AOT file format version.
11925
11926         * aot.c (mono_aot_is_got_entry): New function to determine if an 
11927         address is inside a GOT.
11928
11929         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
11930
11931         * cpu-pentium.md: Increase the maximum size of some instructions which
11932         might involve a got access.
11933         
11934         * mini.c (get_method_from_ip): Another debug helper function.
11935
11936         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
11937         when got var accesses are created during the decompose phase.
11938
11939         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
11940
11941         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
11942         argument mini_compile_method and to MonoCompile, and use this to
11943         determine whenever a given method is compiled for AOT. This allows the
11944         other methods compiled during AOT compilation to be free of AOT stuff,
11945         so the backends does not need to add special support for them by
11946         creating a fake GOT etc.
11947
11948         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
11949         longer needed.
11950
11951 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11952
11953         * mini.c (mono_method_to_ir): It turns out that some of the
11954         x-appdomain wrappers are lax with types, so just ignore this for
11955         all wrappers.
11956
11957         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
11958         at the vtable->klass. If it is non-shared code we can just use the
11959         vtable.
11960
11961 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
11962
11963         * mini-ppc.c: access MonoDomain from tls, too.
11964
11965 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
11966
11967         * declsec.c: Removed unused variable (and related warning ;-)
11968
11969 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11970
11971         * iltests.il: New test for LDELEMA on an array of ref types.
11972
11973         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
11974         all ldelema's on reftypes.
11975         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
11976         it was the wrong place to put it.
11977
11978         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
11979         register to pop to make this cleaner, at the request of Paolo.
11980
11981 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11982
11983         * mini-ops.h (OP_GETHASHCODE): New op.
11984
11985         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
11986
11987         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
11988         operation.
11989
11990         For a microbenchmark, this reduces the cost of Hashtable.get_Item
11991         by 25%.
11992         
11993         * mini-x86.c (mono_arch_output_basic_block): Rather than
11994
11995         add ebp, 4
11996
11997         Emit
11998
11999         pop edx
12000
12001         The first is 3 bytes while the second is 1. This saves 36 kb on
12002         mscorlib, quite a big saving. When bootstraping mcs, I was able to
12003         see a small boost because of icache locality.
12004
12005         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
12006
12007 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
12008
12009         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
12010         started code sharing with the generic code.
12011
12012 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
12013
12014         * mini-ppc.c, cpu-g4.md: added code for direct access to
12015         tls data slots.
12016
12017 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
12018
12019         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
12020          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
12021         to OP_TLS_GET.
12022
12023 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
12024
12025         * declsec.c|h: Added functions to cache the declarative stack modifiers
12026         in MonoJitInfo and to create a security frame from a MonoJitInfo 
12027         structure.
12028         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
12029         created. Register internal calls for System.Security.SecurityFrame::
12030         _GetSecurityFrame and _GetSecurityStack.
12031         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
12032         the definitions for the new stack walk/callback mechanism.
12033         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
12034         first security frame for LinkDemands and InheritanceDemands) and
12035         GetSecurityStack for Demands. Both use the new mono_walk_stack code
12036         from lupus.
12037         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
12038         walk initialization (lupus).
12039
12040 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
12041
12042         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
12043         idiom.
12044         (handle_loaded_temps): Do not create a temporary variable for
12045         things that we know are temps. They will never be modified.
12046         (mono_spill_call): Set MONO_INST_IS_TEMP
12047         (mono_emulate_opcode): ditto
12048         (emit_tree): ditto
12049         (mono_method_to_ir.CEE_DUP): ditto
12050
12051 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
12052
12053         * mini.c (type_to_eval_stack_type): Make this handle the void type
12054         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
12055         (emit_tree): use ip_in_bb to special case some common idioms
12056         Update all callers to pass in the IP.
12057         (mono_method_to_ir): Make CEE_CALL* do the above as well.
12058
12059         This gives us a nice 2% speedup in mcs bootstrap.
12060
12061         * mini-x86.c (peephole_pass): Peephole pass to make
12062         mov  [foo], eax
12063         push [foo]
12064
12065         into
12066
12067         mov [foo], eax
12068         push eax
12069
12070         * mini.c (ip_in_bb): new method.
12071         (mono_method_to_ir): use this method rather than doing the hash
12072         lookup ourselves.
12073
12074         * linear-scan.c (mono_linear_scan): When expiring actives, you
12075         don't need to keep around variables that expire on this
12076         instruction. This makes it so that:
12077              a = b + 1
12078         will turn into:
12079              store (ebx add (ebx, 1))
12080         which will become
12081              add ebx, 1
12082
12083 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
12084
12085         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
12086         combination to avoid doing two copies. Fix up problems with previous
12087         patch.
12088
12089         * mini.c: Fix 64 bit warnings.
12090
12091         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
12092
12093 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
12094
12095         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
12096         changes from the x86 code.
12097
12098         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
12099
12100 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
12101
12102         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
12103         throwing code to reduce its size, unify the AOT and non-aot code and 
12104         get rid of relocations in the AOT case.
12105
12106         * mini-x86.h mini.c exceptions-x86.c 
12107         (mono_arch_get_throw_corlib_exception): New arch specific function to 
12108         raise corlib exceptions which doesn't require relocations in the 
12109         caller.
12110
12111         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
12112
12113 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
12114
12115         * mini.c (mono_emit_method_call): Only allocate the got var when it is
12116         needed.
12117
12118         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
12119         in the AOT case.
12120
12121 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12122
12123         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
12124         with add function when used from Inc/dec atomic 
12125         functions. Re-enabled optimization on x86.
12126         * mini-ops.h: renamed atomic_add functions to
12127         allow _add to match the Interlocked::Add and
12128         _add_next to match Interlocked::Inc/Dec.
12129
12130 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
12131
12132         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
12133         linking of BBs to the end BB, and enabled SSAPRE also with
12134         consprop and copyprop (which was prevented by that bug).
12135
12136 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12137
12138         * mini-x86.c: disabling the Interlocked optimizing code. 
12139
12140 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
12141
12142         * aot.c (load_aot_module): Move reading of got_addr after the AOT
12143         file version check.
12144         
12145 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12146
12147         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
12148         interlocked optimization due lack of support on x86, rewrote 
12149         exchange to take into account that base may be in eax.
12150         
12151         xsp works again; activated Interlocked optimizing code.
12152         
12153 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
12154
12155         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12156
12157 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
12158
12159         * mini-ops.h: Add new opcodes.
12160
12161         * mini.h: Add new patch types. Add got_var to MonoCompile.
12162
12163         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
12164         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
12165         make it work with all kinds of patchable code.
12166
12167         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
12168         address of the GOT, and referencing entries in the GOT.
12169
12170         * mini.c: Add code to load the GOT address if needed by an opcode.
12171
12172         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
12173         independent AOT code on the x86 using an elf-style Global Offset Table.
12174
12175 2004-12-14  Raja R Harinath  <rharinath@novell.com>
12176
12177         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
12178
12179 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12180
12181         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
12182         when running xsp.
12183
12184 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
12185
12186         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
12187         of Interlocked:Increment/Decrement/Add as inline ops.
12188         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
12189
12190 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
12191
12192         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
12193         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
12194
12195 2004-12-12  Duncan Mak  <duncan@ximian.com>
12196
12197         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
12198         again. `patch_info->table_size' is no longer valid after Zoltan's
12199         commit #37636.
12200
12201 2004-12-12  Martin Baulig  <martin@ximian.com>
12202
12203         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
12204         if we are the "real" method, ie. not an inlined method inside it.
12205
12206 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
12207
12208         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
12209         before we look in the special fields table. This fixes
12210         ../tests/thread-static-init.cs.
12211
12212 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12213
12214         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
12215         for Array get_Rank and get_Length. Fixes bug #70465.
12216
12217 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
12218
12219         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
12220         separate structure to reduce the size of MonoJumpInfo.
12221
12222 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
12223
12224         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
12225
12226 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
12227
12228         * mini.c (mini_get_inst_for_method): Changed to allow ports
12229         to return a MonoInst instead of opcode 
12230         (renamed mini_get_opcode_for_method to better reflect the new functionality)
12231         
12232         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
12233         Allow ports to return a created MonoInst instead of op-code, will enable
12234         new optimizations.
12235         (renamed mini_get_opcode_for_method to better reflected the functionality)
12236
12237 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
12238
12239         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
12240
12241 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
12242
12243         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
12244         Fixes #69985.
12245
12246 2004-12-08  Martin Baulig  <martin@ximian.com>
12247
12248         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
12249         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
12250
12251 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
12252
12253         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
12254         correctly.
12255
12256         * exceptions.cs: Disable some tests which depend on properties of x86 fp
12257         arithmetic.
12258
12259 2004-12-08  Raja R Harinath  <rharinath@novell.com>
12260
12261         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
12262
12263 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
12264
12265         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
12266         bug introduced by the previous patch.
12267
12268 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12269
12270         * mini-ppc.c, objectc.cs: handle large structs passed by value
12271         (fixes bug #69972).
12272
12273 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
12274
12275         * mini-ppc.c: OP_ARGLIST implementation from
12276         Geoff Norton  <gnorton@customerdna.com>.
12277
12278 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12279
12280         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
12281         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
12282
12283 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12284
12285         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
12286
12287 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12288
12289         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
12290         support.
12291
12292 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
12293
12294         * mini-sparc.c: Zero out localled-ed memory.
12295
12296         * iltests.il: Add tests for zeroing out localloc-ed memory.
12297
12298 2004-12-04  Martin Baulig  <martin@ximian.com>
12299
12300         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
12301         mono_method_get_signature_full().       
12302
12303 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
12304
12305         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
12306         and some utility functions (always for SSAPRE), integrated SSAPRE.
12307         * mini.h: Likewise.
12308         * driver.c: Added ssapre option.
12309         * ssa.c: Small fix on OP_ARG handling.
12310         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
12311         * Makefile.am: Likewise.
12312
12313 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
12314
12315         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
12316         now in the xp code.
12317
12318         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
12319         icall.
12320
12321 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12322
12323         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
12324         
12325         * cpu-s390.md : Increase instruction length of oparglist.
12326
12327         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
12328
12329 2004-11-30  Martin Baulig  <martin@ximian.com>
12330
12331         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
12332         virtual generic methods.  We call a special helper_compile_generic_method()
12333         icall to retrieve the method from the vtable, inflate and compile
12334         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
12335
12336         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
12337
12338 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
12339
12340         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
12341
12342 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
12343
12344         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
12345         Fixes #69929.
12346
12347 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
12348
12349         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
12350         platforms with PIC aot.
12351
12352 2004-11-28  Martin Baulig  <martin@ximian.com>
12353
12354         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
12355         Fixes gen-112.cs.
12356
12357 2004-11-28  Martin Baulig  <martin@ximian.com>
12358
12359         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
12360         the result of mono_type_get_underlying_type() to check whether
12361         we're byref.
12362
12363 2004-11-26  Martin Baulig  <martin@ximian.com>
12364
12365         * mini.c
12366         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
12367         in the g_assert().
12368
12369 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
12370
12371         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
12372         the same way as the other arguments so they won't get clobbered.
12373
12374         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
12375         calls through R11 since it is clobbered by the trampoline code.
12376
12377 2004-11-26  Raja R Harinath  <rharinath@novell.com>
12378
12379         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
12380         pick up in-tree mscorlib.dll.
12381
12382 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
12383
12384         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
12385
12386         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
12387         runtime data/code are now stored in a table similar to the GOT in ELF. 
12388         This allows the code itself to be position independent.
12389
12390         * aot.c: Fix loading of referenced assemblies after the lazy assembly
12391         loading changes.
12392
12393         * aot.c: Attach ELF type (object/function) directives to all global
12394         symbols.
12395
12396         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
12397
12398         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
12399
12400         * mini-amd64.h: Turn on PIC AOT code.
12401
12402         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
12403         returning the offset within an OP_AOTCONST instruction where the GOT
12404         offset needs to be added.
12405
12406         * mini.h: Bump AOT file format version.
12407
12408 2004-11-25  Martin Baulig  <martin@ximian.com>
12409
12410         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
12411         uninflated generic methods.
12412
12413 2004-11-25  Martin Baulig  <martin@ximian.com>
12414
12415         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
12416
12417 2004-11-24  Martin Baulig  <martin@ximian.com>
12418
12419         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
12420         original klass (this only applies for generic instances).
12421
12422 2004-11-24  Martin Baulig  <martin@ximian.com>
12423
12424         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
12425         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
12426         that array).
12427
12428 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
12429
12430         * mini.c (mono_method_to_ir): Disable inlining for methods containing
12431         localloc. Fixes #69678.
12432
12433         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
12434         
12435 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
12436
12437         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
12438         used SSE registers on pinvoke calls. Fixes #69774.
12439
12440 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
12441
12442         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
12443         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
12444
12445 2004-11-23  Raja R Harinath  <rharinath@novell.com>
12446
12447         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
12448         Refer directly to the mcs/ tree.
12449
12450 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12451
12452         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
12453         Check if a trampoline for a synchronized method is required. 
12454
12455 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
12456
12457         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
12458         with localloc if needed. Throe arithmetric exception in
12459         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
12460         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
12461
12462 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
12463
12464         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
12465         types before switching on type.  Fixes #69622.
12466
12467 2004-11-19  Raja R Harinath  <rharinath@novell.com>
12468
12469         * Makefile.am (check-local): New.  Integrate into 'make check'.
12470         (MCS,RUNTIME): Define using in-tree mono and mcs.
12471         (ILASM): New.
12472         (%.exe): Use $(ILASM).
12473
12474 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
12475
12476         * mini-ppc.c: adjust initial prolog size (bug #69691).
12477
12478 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
12479
12480         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
12481         #69664.
12482
12483 2004-11-17  Raja R Harinath  <rharinath@novell.com>
12484
12485         * Makefile.am (clean-local): Rename from 'clean'.
12486
12487 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12488
12489         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
12490         to mono_arch_is_int_overflow. 
12491         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
12492         SIGFPE events.
12493
12494 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
12495
12496         * declsec.c|h: New files to support declarative security attributes.
12497         Added function to check if a method has (applicable) security.
12498         * mini.c|h: Add check for declarative security attributes in
12499         mono_method_check_inlining.
12500         * Makefile.am: Added declsec.c and declsec.h to the build.
12501
12502 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
12503
12504         * mini.c, mini.h: update to keep dynamic code info per-domain.
12505
12506 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
12507
12508         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
12509         (mini_init): Get rid of it from here too.
12510
12511 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
12512
12513         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
12514         implemented OP_RETHROW (patch by Geoff Norton
12515         <gnorton@customerdna.com>).
12516
12517 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
12518
12519         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
12520         between appdomains.  Fixes appdomain-unload on PPC.
12521
12522 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
12523
12524         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12525         mini-exceptions.c: handle the new wrapper types.
12526         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
12527         token value as a MonoClass* when compiling a wrapper.
12528         mono_jit_create_remoting_trampoline now takes an additional
12529         MonoRemotingTarget parameter.
12530         
12531 2004-11-10  Martin Baulig  <martin@localhost>
12532
12533         * mini.c (mono_method_to_ir): Use `generic_container->context'
12534         rather than creating a new one.
12535
12536 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12537
12538         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
12539
12540         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
12541
12542 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
12543
12544         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
12545         the experimental aot cache stuff.
12546
12547 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
12548
12549         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12550         mini-exceptions.c: update to exception clause structure changes.
12551
12552 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
12553
12554         * exceptions-x86.c (throw_exception): Fix warnings.
12555
12556         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
12557         for OP_RETHROW.
12558
12559 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
12560
12561         * exceptions-sparc.c (get_throw_exception): Really fix this.
12562
12563 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
12564
12565         * tramp-*.c: we no longer support icalls without wrappers, so
12566         a bit of code can be removed here
12567
12568 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
12569
12570         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
12571         patch.
12572
12573         * cpu-sparc.md: Add op_rethrow.
12574
12575         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
12576
12577         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
12578
12579         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
12580         * mini-ops.h: Add OP_RETHROW.
12581
12582         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
12583
12584         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
12585
12586 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
12587         
12588         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
12589         Makes the output much easier to read
12590
12591 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
12592
12593         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
12594         prevents another huge leak when compiling with ssa. Secondly, the
12595         performance of doing this rather than freeing the lists is much
12596         better. GList does a lock every time you allocate a list link,
12597         so that it can use a memory pool. So, it is better to just use
12598         a memory pool of our own.
12599         
12600         * ssa.c, linear-scan.c: replace g_list_remove_link with
12601         g_list_delete.  The remove one does not free the GList, so we were
12602         leaking memory. On -O=all --compile-all with corlib, this cut down
12603         3 MB of allocations.
12604
12605 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
12606
12607         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
12608
12609         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
12610
12611         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
12612         into a new function mono_create_jit_trampoline ().
12613
12614 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
12615
12616         * trace.c (get_spec): Allow tracing of classes without a namespace.
12617
12618 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
12619
12620         * mini.c: Fix pointer overwrite in mini_method_compile.
12621
12622 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
12623
12624         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
12625         The darwin ABI needs some special handling for 1 and 2 byte structs
12626         Lets use lbz/lhz instead of lwz everywhere.
12627         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
12628         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
12629         Use stb/sth for the former, and put the latter always on stack instead of in
12630         argument registers.
12631
12632 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
12633
12634         * trace.c (is_filenamechar): Add '_'.
12635
12636 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
12637
12638         * mini-s390.c: Fix prolog length to allow for large trace requirements.
12639
12640         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
12641
12642 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
12643
12644         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
12645         depends on libmonogc. Fixes #68805.
12646
12647 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
12648
12649         * mini.c (mono_jit_free_method): Provide extra information for
12650         this error.  Currently this leaks, but will be turned into a
12651         developer option in the future.
12652
12653 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
12654
12655         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
12656
12657 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
12658
12659         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
12660         boundary. Fixes reading of PATCH_INFO_R4 and R8.
12661         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
12662
12663 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
12664
12665         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
12666         trampolines for AOT code.
12667
12668 2004-10-22    <vargaz@freemail.hu>
12669
12670         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
12671         constructed types. Fixes #68136.
12672
12673 2004-10-21  Martin Baulig  <martin@ximian.com>
12674
12675         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
12676         if it returns true, unwind the stack to the call instruction.
12677
12678 2004-10-21    <vargaz@freemail.hu>
12679
12680         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
12681
12682         * mini.h: Bump AOT version number.
12683
12684         * objects.cs: Add another test for unbox trampolines.
12685
12686         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
12687         valuetype methods.
12688
12689 2004-10-20    <vargaz@freemail.hu>
12690
12691         * driver.c: Add SHARED to the set of optimizations tested.
12692
12693         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
12694
12695         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
12696         used by CEE_NEWARR.
12697
12698         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
12699
12700 2004-10-20  Martin Baulig  <martin@ximian.com>
12701
12702         * mini-exceptions.c (mono_handle_exception): Call
12703         mono_debugger_handle_exception() to tell the debugger about
12704         catch/finally clauses.
12705
12706 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
12707
12708         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
12709
12710         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
12711         #68447.
12712
12713 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
12714
12715         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
12716         methods as their native size, fixed bug #57543, #57545.
12717         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
12718         This saves a temporary register and mullw call down into 1 (minor perf
12719         increase for cases like sum = sum * 5;  This use to translate into:
12720             li r11,5
12721             mullw r28,r28,r11
12722         It now translates to
12723             mulli r28,r28,5
12724
12725 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
12726
12727         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
12728         #68388.
12729
12730 2004-10-11  Martin Baulig  <martin@ximian.com>
12731
12732         * mini.c (mono_method_to_ir): If we're a generic method, get the
12733         MonoGenericContainer from our MonoMethodNormal and create a
12734         MonoGenericContext from it.
12735
12736 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
12737
12738         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
12739
12740         * basic-long.cs: Add test for checked i8->i2 cast.
12741
12742 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12743
12744         * inssel-ppc.brg: added a couple of speedup rules.
12745
12746 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
12747
12748         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
12749         to speed up rebuilds.
12750
12751 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12752
12753         * mini-s390.c: Minor fix to OP_OR_IMM.
12754
12755 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
12756
12757         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
12758         better. Fixes appdomain-unload.exe on sparc.
12759
12760 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
12761
12762         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
12763         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
12764         see bug 67324.
12765
12766 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
12767
12768         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
12769
12770 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
12771
12772         * mini.c: Always generate a field read/write wrapper for members
12773         of the class MarshalByRefObject since the actual instance could
12774         be a CBO.
12775
12776 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
12777
12778         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
12779
12780 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
12781
12782         * driver.c mini.h trace.c: Move the setting of the main assembly into
12783         a separate function called mono_trace_set_assembly () and call it after
12784         actually loading the main assembly. Fixes #66872.
12785
12786 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
12787
12788         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
12789         using the code manager.
12790
12791 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
12792
12793         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
12794
12795 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
12796
12797         * cpu-amd64.md: Fix bug in previous patch.
12798         
12799         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
12800         #66650.
12801
12802 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
12803
12804         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12805         mini-exceptions.c: updates for changed stack walk interface.
12806
12807 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12808
12809         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
12810
12811 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
12812
12813         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
12814
12815 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
12816
12817         * driver.c (mini_regression_list): Do not call mono_assembly_close 
12818         since assemblies can't be unloaded.
12819         
12820 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12821
12822         * cpu-amd64.md: Fix more instruction lengths.
12823
12824         * cpu-amd64.md: Fix lengths of some instructions.
12825
12826 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
12827
12828         * inssel.brg: Make the array ldelema check aot friendly.
12829
12830 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12831
12832         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
12833
12834         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
12835
12836 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
12837
12838         * mini-x86.c: Fix build.
12839
12840         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
12841         mono_type_get_underlying_type () helper function to simplify code.
12842         
12843 2004-09-09  Martin Baulig  <martin@ximian.com>
12844
12845         * mini-amd64.c: Don't access `type->data.klass' directly, call
12846         mono_class_from_mono_type() instead since the type may be a
12847         generic instance.
12848
12849 2004-09-09  Martin Baulig  <martin@ximian.com>
12850
12851         * mini-amd64.c (get_call_info): Fix support for generic instances.
12852         (add_valuetype): Use mono_class_from_mono_type() to get the class
12853         since we can be a generic instance.
12854
12855 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
12856
12857         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
12858
12859 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
12860
12861         * liveness.c: reset spill costs on each scan: bug 62107
12862
12863 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
12864
12865         * exceptions-sparc.c (mono_arch_find_jit_info): remove
12866         unnecessary line that doesn't compile
12867
12868 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12869
12870         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
12871         trampolines, make them call an error function so people can fix their
12872         code.
12873
12874 2004-09-06  Martin Baulig  <martin@ximian.com>
12875
12876         * mini.c (mono_method_to_ir): When initializing locals, handle a
12877         generic instances like a valuetype if it's a valuetype and like a
12878         class if it's a class.
12879
12880 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12881
12882         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
12883         stack. Fixes #64674.
12884
12885         * exceptions.cs: Add test for unwinding of call arguments.
12886
12887 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
12888
12889         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
12890         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
12891         set the carry/borrow flag). The sparc and s390 implementations
12892         can now use optimized versions (and simplify the code). ppc bugfixes.
12893
12894 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12895
12896         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
12897
12898 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
12899
12900         * inssel-amd64.brg: Remove leftover 32 bit rule.
12901
12902         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
12903
12904 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
12905
12906         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
12907         mono_arch_find_jit_info functions into a new function. Fix a memory
12908         leak.
12909
12910         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
12911         refactored code.
12912         
12913 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12914
12915         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
12916         as well.
12917         
12918         * exceptions.cs: Add array size tests.
12919
12920         * mini.c: Allocate a separate icall wrapper for each arity of 
12921         mono_array_new_va. Fixes #59509.
12922
12923         * exceptions.cs: Add testcase for 64578.
12924
12925         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
12926
12927         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
12928         
12929 2004-09-02  Martin Baulig  <martin@ximian.com>
12930
12931         * mini.c (mono_method_to_ir): When initializing the locals, call
12932         handle_initobj() on the generic instance itself, not its
12933         underlying type.
12934
12935 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12936
12937         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
12938         MonoJitInfo for dynamic methods.
12939
12940         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
12941
12942         * mini.c: Add support for freeing JIT data for dynamic methods.
12943         
12944 2004-09-01  Martin Baulig  <martin@ximian.com>
12945
12946         * mini-x86.c (is_regsize_var): Added support for generic
12947         instances.
12948         (mono_arch_emit_prolog): Make this compile again, use
12949         `x86_push_imm_template (code)'.
12950
12951 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
12952
12953         * mini-x86.c: make all push_imm instructions that get
12954         patched always emit the long form
12955
12956 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
12957
12958         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
12959         in a per-domain hash.
12960
12961         * mini-amd64.c (merge_argument_class_from_type): Handle generic
12962         types.
12963
12964 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
12965
12966         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
12967         work.
12968         
12969         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
12970         work.
12971
12972         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
12973         Beginnings of SSE2 support.
12974
12975         * exceptions.cs: Add more tests for checked int<->uint casts.
12976
12977 2004-08-28  Martin Baulig  <martin@ximian.com>
12978
12979         * mini-x86.c (mono_arch_instrument_epilog): Added support for
12980         generic instances.
12981
12982         * mini.c
12983         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
12984         Handle generic instances recursively.
12985
12986 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12987
12988         * iltests.il: test for conv.u8 on a constant
12989
12990 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12991
12992         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
12993         LCONV_x4 (shrun_32 (membase)).
12994
12995 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12996
12997         * inssel-x86.brg: c&p rules for push/setret of long
12998
12999 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
13000
13001         * inssel-x86.brg: c&p rules for compare (base, regvar) and
13002         compare (regvar, base)
13003
13004         * inssel-x86.brg: more burg love
13005
13006         * inssel.brg: more cleanup
13007
13008         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
13009
13010 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
13011
13012         * basic-long.cs, basic-calls.cs: new tests for optimization.
13013
13014 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
13015
13016         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
13017         patch.
13018
13019 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13020
13021         * mini-amd64.c (read_tls_offset_from_method): Add another case.
13022         
13023 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
13024
13025         * inssel.brg (mini_emit_memcpy): use 
13026         NO_UNALIGNED_ACCESS to disable memcpy optimization
13027
13028 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13029
13030         * mini-amd64.c: Handle generic types in various places.
13031
13032         * mini.c (mono_method_to_ir): Handle generic types in init locals.
13033
13034 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
13035
13036         * mini.c (handle_box): Fix warning.
13037
13038         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
13039
13040         * mini-amd64.h: Enable the emit_state optimization.
13041
13042         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
13043
13044         * mini-amd64.c: Add some new 64 bit peephole opts.
13045
13046         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
13047
13048         * cpu-amd64.md: sreg1 of div instructions must be %rax.
13049
13050         * mini-amd64.c: Register allocator fixes.
13051
13052         * mini.c: Add an optimization to emit_state to avoid allocation of new
13053         registers on some platforms.
13054
13055 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
13056
13057         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
13058
13059         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
13060         allocation. Fixes #63085.
13061
13062         * basic-long.cs: Add new regression test.
13063
13064         * mini-amd64.c: Register allocator improvements.
13065
13066 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
13067
13068         * mini-amd64.c (read_tls_offset_from_method): Add another code
13069         sequence.
13070
13071         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
13072         instruction sequence for nullifying class init trampolines.
13073
13074         * objects.cs: Add new regalloc test.
13075
13076         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
13077
13078 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13079
13080         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
13081         
13082         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
13083         arguments.
13084
13085         * driver.c: Fix profiling after TLS changes.
13086         
13087         * driver.c (mono_main): Set mono_stats.enabled if needed.
13088
13089         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
13090         CEE_BOX.
13091
13092 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
13093
13094         * mini-x86.c: use a 1 op rather than a 2 op tls access
13095         instruction -> faster.
13096
13097 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13098
13099         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
13100         x86 backend.
13101
13102 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
13103
13104         * exceptions-sparc.c (throw_exception): fix typo
13105
13106 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13107
13108         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
13109         set tree->dreg correctly with tls. Allow any
13110         register to be used.
13111
13112         * mini-x86.c (read_tls_offset_from_method): add new code
13113         generation pattern seen with GCC.
13114
13115
13116 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13117
13118         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
13119         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13120         exceptions-sparc.c: fix some performance issues in exception
13121         handling and setting of the stack trace for exceptions that were
13122         already thrown.
13123
13124 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13125
13126         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
13127         x86 backend.
13128         
13129         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
13130         registers.
13131
13132 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13133
13134         This patch inlines tls access, when possible.
13135         
13136         * mini.h: new arch functions for TLS intrinsics.
13137         All platforms updated with a stub.
13138
13139         * mini.c: use the new intrinsics
13140
13141         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
13142         arch specific intrinsic for tls variables
13143
13144 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13145
13146         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
13147         under windows.
13148
13149 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13150
13151         * mini.c: thread local allocation
13152
13153 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
13154
13155         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
13156
13157         * Makefile.am: Link against the static version of libmonogc.
13158         
13159         * Makefile.am: Link the static versions of the convenience libraries
13160         into the mono executable.
13161
13162         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
13163
13164 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
13165
13166         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
13167         on integer overflow.
13168
13169         * mini-amd64.c: Reorganize function call code.
13170
13171         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
13172
13173 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13174
13175         * inssel-x86.brg: use xor eax,eax.
13176         
13177         * basic.cs: new tests
13178
13179 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13180
13181         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
13182         in exception throwing code.
13183         
13184 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13185
13186         * inssel-x86.brg: use xor esi,esi.
13187
13188 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13189
13190         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
13191         can trace methods compiled during mini_init () too.
13192
13193         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
13194         CEE_CONV_U4.
13195
13196 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13197
13198         * Makefile.am: static link on x86 (r=zoltan)
13199
13200 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13201
13202         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
13203         code since it causes some programs to fail.
13204
13205 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
13206
13207         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
13208
13209 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
13210
13211         * mini.c: ovfops_op_map - add STACK_OBJ case for
13212         CONV_I 
13213         * basic.cs: add test_0_pin_string as test
13214         case for above.
13215
13216 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
13217
13218         * Makefile.am: build C# if srcdir != builddir
13219
13220 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13221
13222         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
13223         fall-through blocks.
13224
13225 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13226
13227         * driver.c: enable loop by default again and include abcrem in -O=all.
13228
13229 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
13230
13231         * iltests.il: Add some localloc tests.
13232
13233         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
13234
13235         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
13236         Fixes #62574.
13237
13238         * inssel-amd64.brg: Add some optimizations.
13239
13240         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
13241         for gcc-3.4.
13242
13243         * Makefile.am: Statically link mono against libmono on AMD64.
13244         
13245         * mini-amd64.c inssel-amd64.brg: Optimizations.
13246
13247 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
13248
13249         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
13250
13251         * tramp-amd64.c: Patch calling code in trampolines.
13252
13253 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
13254
13255         * mini-amd64.c: pinvoke struct passing fixes.
13256
13257 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
13258
13259         * mini-sparc.c: redo change, make mono_arch_cpu_init call
13260         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
13261
13262 2004-08-05  Duncan Mak  <duncan@ximian.com>
13263
13264         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13265         CEE_LDELEM_ANY.
13266
13267 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13268
13269         * mini-amd64.c (emit_move_return_value): Move return value for normal
13270         calls too.
13271
13272 2004-08-05  Martin Baulig  <martin@ximian.com>
13273
13274         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
13275         `type->type'; just modify `type' itself when dealing with enums
13276         and generic instances.
13277         (check_call_signature): Make `simple_type' a `MonoType *'.
13278
13279 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13280
13281         * mini.c: Use OP_PADD to add offsets to addresses.
13282
13283         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
13284
13285 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
13286
13287         * mini-sparc.c (mono_arch_emit_epilog): fix check
13288         for folding last op into restore instruction
13289
13290 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13291
13292         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
13293         helper methods using the code manager.
13294         
13295         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
13296
13297         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
13298
13299 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13300         
13301         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
13302           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
13303
13304         * mini-s390.c: fix tail processing
13305
13306 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
13307
13308         * mini-ppc.c: mul.ovf.un exception name fix.
13309
13310 2004-08-03  Martin Baulig  <martin@ximian.com>
13311
13312         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
13313         instances; before jumping to `handle_enum', also modify `ptype'.
13314
13315 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
13316
13317         * cpu-sparc.md: fcall maximal length too small.
13318
13319 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
13320
13321         * mini-amd64.c mini.h: Add initial support for passing/returning 
13322         structures to/from pinvoked methods.
13323
13324 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
13325
13326         * mini-ppc.c: reg allocator fix.
13327
13328 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
13329
13330         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
13331
13332         * inssel.brg: Optimize memset on 64 bit machines.
13333
13334         * mini-amd64.c: Fix some vararg cases.
13335
13336 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13337
13338         * mini-s390.c: Corrected macro in emit_float_to_int
13339
13340         * s390-abi.cs: Tests to exercise the s390 ABI
13341
13342 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13343
13344         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
13345         caller saved regs.
13346
13347         * basic.cs: Add a test for add.ovf.un.
13348
13349 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
13350
13351         * mini-sparc.c: add case for OP_IDIV_UN
13352
13353 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13354
13355         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
13356         
13357         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
13358
13359 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
13360
13361         * basic.cs: regression tests.
13362
13363         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
13364         regressions.
13365
13366 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13367
13368         * basic.cs: Add a new test.
13369
13370         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
13371         and AOT. Various fixes and optimizations.
13372
13373         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
13374
13375 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13376
13377         * mini-ppc.c: make sure temp regs are not used for global reg
13378         allocation.
13379
13380 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
13381
13382         * cpu-sparc.md: conv_i8 fix for 64bits
13383
13384         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
13385
13386 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
13387         
13388         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
13389         add opcode for cmp BYTE PTR [eax], imm.
13390
13391         * inssel.brg: Make memcpy and memset takes bases.
13392
13393 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13394
13395         * *-amd64.*: More AMD64 work.
13396         
13397 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13398
13399         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
13400         add a compare-not-equal opcode.
13401         
13402 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
13403
13404         * mini.c: Use mono_init_from_assembly instead of mono_init.
13405         
13406 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13407
13408         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
13409
13410         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
13411
13412         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
13413
13414         * inssel.brg: 64 bit fixes.
13415
13416         * mini.h (MonoCallInst): Add some AMD64 specific data.
13417
13418         * mini.h: Add some OP_P opcodes.
13419
13420 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13421
13422         * basic.cs: tests for 61797 and 61740
13423
13424 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13425
13426         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
13427         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
13428
13429 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
13430
13431         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
13432
13433         * *-amd64*.*: Ongoing AMD64 work.
13434
13435 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
13436
13437         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
13438
13439         * *-amd64*: Ongoing AMD64 work.
13440
13441         * mini-arch.h: Add AMD64 support.
13442
13443         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
13444
13445         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
13446
13447         * mini-ops.h: Add new opcodes.
13448
13449         * Makefile.am: Add AMD64 support.
13450
13451         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
13452         rules into the inssel-long*.brg files.
13453
13454         * *-amd64.*: Add beginnings of AMD64 backend.
13455
13456 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
13457
13458         * mini.c (print_dfn): commenting out the code that prints
13459         the cil. With -O=deadce, this makes -v -v crash.
13460         
13461         * cpu-pentium.md: make checkthis have a length of 2
13462
13463 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
13464
13465         * mini-sparc.h: fix implementations of __builtin
13466         functions for Sun compiler for V9.
13467
13468 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
13469
13470         * mini.c: use the new stelem.ref wrapper
13471         * exceptions.cs, arrays.cs: new stelem.ref tests
13472
13473 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13474
13475         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
13476         new XSP should work with these changes).
13477
13478 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
13479         
13480         * inssel-{long32,x86,}.brg: trivial optimizations.
13481         
13482 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
13483
13484         * mini.c: load value when emitting box operation in
13485         constrained calls.
13486
13487 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
13488
13489         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
13490         is one byte shorter than cmp DWORD PTR [eax], 0.
13491
13492 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13493
13494         * inssel-ppc.brg: arguments on the stack are always
13495         relative to the stack pointer (spotted by Neale Ferguson).
13496
13497 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13498
13499         * exceptions-x86.c: delay appending the method name to the trace until
13500         after mono_jit_info_table_find is called, as this gets the real
13501         MonoMethod.
13502
13503 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
13504
13505         * aot.c: register roots
13506
13507 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13508
13509         * aot.c : I could just use PLATFORM_WIN32 flag.
13510
13511 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13512
13513         * aot.c : Reverting the previous fix. This time it broke linux build.
13514
13515 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13516
13517         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
13518
13519 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
13520
13521         * mini.c (handle_stack_args): Remove some more debugging code.
13522         
13523         * mini.c (handle_stack_args): Remove debug output left in by mistake.
13524
13525         * driver.c mini.h aot.c: Allow additional options to be specified with
13526         --aot and pass them to mono_compile_assembly.
13527
13528         * aot.c: Add experimental code to AOT compile all loaded assemblies
13529         on demand and save the code into a cache in the filesystem.
13530
13531         * aot.c: Add support for more wrapper methods.
13532         
13533         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
13534         58863.
13535
13536         * cpu-*.md: Remove removed opcodes.
13537
13538         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
13539         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
13540         related icalls to marshal.c.
13541
13542 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
13543
13544         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
13545
13546         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
13547
13548         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
13549
13550 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
13551         * liveness.c: If liveness is recomputated we need to reset the information
13552         for each variable. This way, if the liveness range has been narrowed
13553         by optimizations that happened after the last computation, we can return
13554         a smaller range.
13555         
13556         For example, if you have
13557         
13558         {
13559                 int i = 0;
13560                 
13561                 // Tons of code that does not affect i
13562                 
13563                 i = foo ();
13564                 ...
13565         }
13566         
13567         i = 0 is dead code and will be removed by SSA. However, when
13568         linear scan gets to the code, i will still appear to be live
13569         throughout the entire block. This prevents good register allocation.
13570
13571 2004-07-06  Martin Baulig  <martin@ximian.com>
13572
13573         * debug-mini.c (mono_debug_init_method): Allow
13574         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
13575         (mono_debug_add_icall_wrapper): New method.
13576
13577         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
13578
13579 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
13580
13581         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
13582         optimization.
13583
13584 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
13585
13586         * aot.c (mono_aot_load_method): Fix loading of debug info.
13587
13588 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13589
13590         * aot.c: Add logging support.
13591
13592 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13593
13594         * mini.h: Add prototype for mono_print_method_from_ip.
13595
13596         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
13597
13598         * inssel.brg: 64 bit fixes.
13599
13600         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
13601         inssel-long32.brg.
13602
13603         * Makefile.am: Add SPARC64 support.
13604
13605 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13606
13607         * aot.c: Fix alignment problems on 32 bit platforms.
13608
13609 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13610
13611         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
13612         SPARC64.
13613
13614         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
13615         problems.
13616
13617         * mini.h: Bump AOT file version. Some 64 bit fixes.
13618
13619 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13620
13621         * inssel-sparc.brg: Add new rule to avoid register moves.
13622
13623         * inssel.brg: Add ldind_to_load_membase helper function.
13624
13625 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
13626
13627         * mini.c: OffsetToStringData intrinsic.
13628         
13629 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13630
13631         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
13632
13633         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
13634         regression tests.
13635
13636         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
13637 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13638
13639         * mini.c: reinstated mono_compile_get_interface_var()
13640         on x86, too, since the change breaks the Gtk# build there as well.
13641
13642 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13643
13644         * driver.c: remove loop from the default optimizations: it seems to
13645         interact badly with some of the other options (see bug #60613).
13646
13647 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
13648
13649         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
13650         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
13651
13652 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
13653
13654         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
13655         vararg-using methods.
13656
13657 2004-06-21  Martin Baulig  <martin@ximian.com>
13658
13659         * mini/mini-exceptions.c
13660         (mono_handle_exception): Added `gpointer original_ip' argument.
13661         After calling mono_unhandled_exception(), call
13662         mono_debugger_unhandled_exception() and if that returns true,
13663         restore the context and return.
13664
13665 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13666
13667         * mini-ppc.c: prefer the use of relative branches so
13668         they won't need to be patched in aot code (patch from Patrick Beard).
13669
13670 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13671
13672         * aot.c: patch from Patrick Beard to make the output assembly
13673         more correct for the MacOSX assembler. Small tweak to
13674         generate sane images on Linux/PPC, too.
13675
13676 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13677
13678         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
13679         case until bug #59509 is fixed (shows up in #60332).
13680
13681 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13682
13683         * mini.c: make sure the needed wrappers are compiled, too, with
13684         precomp.
13685
13686 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
13687
13688         * driver.c: remove NPTL reference in --version output.
13689
13690 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13691
13692         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
13693         generate valid assembly for the Mach-O assembler.
13694
13695 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13696
13697         * driver.c: don't include abcrem in the all optimization specifier
13698         since it slows down jit compilation too much for now.
13699
13700 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
13701
13702         * mini.c: use BIGMUL only if both operands have the same signage.
13703         * iltests.il: Test for bug 60056. (errors related to signage in
13704         BIGMUL).
13705
13706         r=lupus.
13707
13708 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
13709
13710         * mini.c, aot.c: memory leak fixes.
13711
13712 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13713
13714         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
13715
13716 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
13717
13718         * Makefile.am: remove the -static hack completely, it links in
13719         statically glib as well.
13720
13721 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
13722
13723         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
13724         * exceptions.cs: make it compile with new mcs/csc.
13725
13726 2004-06-03 Massimiliano Mantione <massi@ximian.com>
13727         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
13728         and added relevant test case.
13729
13730 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13731
13732         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
13733         regressions in gtk-sharp.
13734
13735 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
13736
13737         * exceptions.cs: New regression tests.
13738
13739         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
13740
13741 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13742
13743         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
13744
13745 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
13746
13747         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
13748
13749         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
13750
13751 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
13752
13753         * mini.c (mono_jit_runtime_invoke): Init class in this
13754         method instead of trusting mono_jit_compile_method to
13755         do the work (because wrappers can be in object class)
13756
13757 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
13758
13759         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
13760
13761         * basic-long.cs: New regression test.
13762
13763 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
13764
13765         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
13766         and div/rem checks.
13767
13768 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13769
13770         * Makefile.am: fix miguel's change to build mono statically against
13771         libmono (track build dependencies).
13772
13773 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13774
13775         * cfold.c: Some glib versions do not have G_MININT32.
13776
13777 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
13778
13779         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
13780         with precision of tan, atan, sin and cos, and implemented related
13781         regressions tests (fixes bug 54467, but one new problem appeared and
13782         is not fixed yet).
13783
13784 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13785
13786         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
13787
13788         * exceptions.cs: Add test for constant folding && division by zero.
13789
13790         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
13791         since driver.c is in libmono too, so the optimization was useless.
13792
13793         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
13794         variable to driver.c so the compiler can emit more efficient code to
13795         access them.
13796
13797 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13798
13799         * Makefile.am: don't distribute generated inssel.[ch] files.
13800
13801 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
13802
13803         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
13804         into the default appdomain. Fixes #58707.
13805
13806         * jit-icalls.c: Remove the broken approximation for truncl, doing
13807         no conversion is better.
13808
13809         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
13810         Fixes #58863.
13811
13812 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13813
13814         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
13815         of the mcrxr instruction which is not available on some processors
13816         even if it's documented to be. Implement add and sub overflow correctly
13817         (still not complete for long unsigned). Speed up icalls a bit.
13818
13819 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
13820
13821         * mini.c (mono_jit_compile_method_with_opt): Make sure that
13822         we run .cctor in the current domain instead of target_domain.
13823         
13824         Fixes bug #58558, .cctor not being called in -O=shared.
13825
13826 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13827
13828         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
13829
13830 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
13831
13832         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
13833         which can be done with an imm8, do it that way.
13834         (mono_arch_output_basic_block): ditto for a jmp
13835         (mono_arch_emit_prolog): Computate maximum offset of a label.
13836
13837 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
13838
13839         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
13840         now tries to allocate prefered physical reg's for virtual
13841         regs. This reduces the number of emited spills/loads with
13842         20-30% on our core assemblies.
13843
13844 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13845
13846         * jit-icalls.c: truncl() is not needed and trunc() is
13847         the correct thing to do anyway (bug #58287).
13848
13849 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
13850
13851         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
13852         if available.
13853
13854 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13855
13856         * driver.c: enable loop optimizations by default.
13857
13858 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13859
13860         * mini-x86.c: fix calc of max loop size when aligning loops start.
13861
13862 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
13863
13864         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
13865         the stack.
13866
13867 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
13868
13869         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
13870         should set carry.
13871
13872         * basic-long.cs: Add tests for add/subtract of immediates with carry.
13873
13874         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
13875         
13876         * mini.c (inline_method): Allways inline some wrappers even if the cost
13877         is too large. Fixes #58785.
13878
13879         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
13880         
13881 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
13882
13883         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
13884         (crichton@gimp.org). Beginning of support for sparc/linux.
13885
13886         * mini-sparc.c: Optimize retrieval of LMF address.
13887
13888 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
13889
13890         * exceptions-ppc.c:  handle alloca in methods with clauses.
13891
13892 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
13893
13894         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
13895
13896 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
13897
13898         * mini.c: Delegate most of the abort signal work to 
13899           mono_thread_request_interruption, which also handles Stop and Suspend
13900           states.
13901
13902 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
13903
13904         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
13905         supports the save/restore lmf opcodes.
13906
13907 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
13908
13909         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
13910         by gcc-3.4 as well.
13911
13912         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
13913
13914 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13915
13916         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
13917         methods which contain array accesses.
13918
13919         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
13920         boundaries. Fixes #58537.
13921
13922         * iltests.il: Add regression test for #58537.
13923
13924 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13925
13926         * mini-x86.c (mono_arch_local_regalloc): Last part of
13927         fix for bug #58633 (releasing register to early).
13928
13929 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
13930
13931         * basic-long.cs: Add new regression test.
13932
13933 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13934
13935         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
13936         register too early on the chain.
13937
13938 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13939
13940         * mini.c (create_helper_signature): Use a helper function to reduce
13941         the code which needs to be written. Also set the calling convention of
13942         icalls on windows. Fixes #57840.
13943
13944 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13945
13946         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
13947         exceptions-ppc.c: added helper function to get the instruction address
13948         from a signal handler context.
13949
13950 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13951
13952         * helpers.c: use g_get_tmp_dir. Invokes happyness 
13953         from gonzalo.
13954
13955 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13956
13957         * helpers.c: Add new env variable to pass args to objdump.
13958         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
13959
13960 2004-05-17  Radek Doulik  <rodo@ximian.com>
13961
13962         * Makefile.am (common_sources): added abcremoval.h so it get
13963         disted and daily mono packages on go-mono.com will build again
13964
13965 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
13966
13967         * abcremoval.c: Fixed coding style, added copyright header.
13968
13969         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
13970
13971         * mini.h: Added prototype for abc removal main function.
13972
13973         * build_relations_propagation_table.pl: Added copyright header.
13974
13975 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13976
13977         * basic-long.cs: reg test for complex ceq_long bug.
13978
13979 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13980
13981         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
13982         reg in long and clob case (bug #58343). Fixed/added comments.
13983
13984 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
13985
13986         * mini.c (mono_jit_runtime_invoke): Follow new convention
13987         of calling the invoke method with an function pointer.
13988
13989 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
13990
13991         * ChangeLog: Fix author of memory leak patch.
13992
13993 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
13994
13995         * Makefile.am: fix make dist as well...
13996
13997
13998 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
13999
14000         * cfold.c: Made so that conversions from pointer to int4 are no-ops
14001         on archs where pointers are 4 bytes long.
14002
14003         * Makefile.am: Added abcremoval.c source file.
14004
14005         * abcremoval.c: Added abcremoval.c.
14006
14007         * abcremoval.h: Added abcremoval.h.
14008
14009         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
14010
14011         * inssel.brg: Enabled bounds check removal.
14012
14013         * mini.c: Added support for abcrem optimization.
14014
14015         * mini.h: Added abcrem optimization label.
14016
14017         * driver.c: Added support for abcrem optimization.
14018
14019         * propagated_relations_table.def: Added propagated_relations_table.def.
14020
14021 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
14022
14023         * mini.c, cfold.c: fix style.
14024
14025 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14026
14027         * mini.c: handle issue with the low-level implementation of
14028         some long opcodes (bug #54209).
14029
14030 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
14031
14032         * basic.cs: test for my new cmov stuff.
14033
14034 2004-05-13      Patrik Torstensson
14035
14036         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
14037         opt and added peephole documentation.
14038
14039 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14040
14041         * tramp-ppc.c: rewrote the generic trampoline code.
14042
14043 2004-05-11      Patrik Torstensson
14044
14045         * mini-x86.c: optimize long shl/shr asm code (one less branch)
14046
14047 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
14048
14049         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
14050
14051         * mini.h mini.c dominators.c: Applied patch from Derek Woo
14052         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
14053
14054         * mini.c: Add new icalls for AsAny marshalling.
14055
14056 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14057
14058         * tramp-ppc.c, mini-ppc.c: more cleanups.
14059
14060 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14061
14062         * mini.c: no warnings.
14063
14064 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14065
14066         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
14067
14068 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
14069
14070         * mini.c: In the thread abort signal handler, if the thread is in the
14071         process of being stoped, don't throw the Abort exception, just stop the
14072         thread.
14073
14074 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
14075
14076         * tramp-ppc.c: removed old code.
14077
14078 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14079
14080         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
14081         do some simple speed optimizations on ppc.
14082
14083 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14084
14085         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
14086         and large offsets in load/store.
14087
14088 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14089
14090         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
14091         it causes regressions.
14092
14093 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14094
14095         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
14096         support.
14097
14098 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14099
14100         * jit-icalls.c: remove warnings.
14101         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
14102         speedups for unsafe code.
14103
14104 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
14105
14106         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
14107
14108 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
14109
14110         * basic-calls.cs: Add new regression test.
14111
14112         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
14113         more portable.
14114
14115         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
14116
14117         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
14118         is no longer used.
14119
14120 2004-05-06      Patrik Torstensson
14121
14122         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
14123         long reg allocation in any reg (not only eax:edx) and implemented 
14124         long shl/shr ops in asm instead of helpers.
14125
14126 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
14127
14128         * mini-sparc.h: Fix warnings.
14129
14130         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
14131         stack.
14132
14133         * mini-exceptions.c (mono_handle_exception): Call the filter in a
14134         separate statement for clarity.
14135
14136         * mini-sparc.c: Update status.
14137
14138 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
14139
14140         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
14141         here.
14142
14143 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14144
14145         * inssel-ppc.brg: another small pre-release workaround:
14146         we don't do overflow detection for long_sub_un.
14147
14148 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14149
14150         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
14151         (also works around a weird ppc bug: 57957).
14152
14153 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
14154
14155         * tramp-ppc.c: trampoline fixes.
14156
14157 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
14158
14159         * mini-ppc.c: fixed typos.
14160
14161 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14162
14163         * mini-ppc.c, exceptions-ppc.c: more code saves registers
14164         at the top of the stack. Fixed typos. Use a frame registers
14165         for all the methods with exception clauses.
14166
14167 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14168
14169         * exceptions-ppc.c: restore fp registers.
14170
14171 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14172
14173         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
14174         order from the stack top (moved the stack room to save the
14175         return value for trace after the param area). Fixed corruption
14176         in restoring registers on unwind.
14177
14178 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14179
14180         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
14181
14182 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14183
14184         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
14185         and prolog/epilog for methods that use it. Allow
14186         enough param area room for varargs methods. Fix miguel's
14187         breakage in exception handling.
14188
14189 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14190
14191         * Makefile.am: run genmdesc only on current arch.
14192
14193 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14194
14195         * exceptions-x86.c:
14196         * mini-x86.h: fix the build on windows.
14197
14198 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
14199
14200         * 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.
14201
14202         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
14203
14204         * mini-exceptions.c: New file.
14205         
14206         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
14207         Move some parts of the x86 exception handling code to an 
14208         arch-independent file so it can be shared with other ports.
14209
14210 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
14211
14212         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
14213
14214 2004-04-26  David Waite  <mass@akuma.org>
14215
14216         * driver.c: remove comma from end of enumeration declaration
14217
14218 2004-04-26  Jackson Harper  <jackson@ximian.com>
14219
14220         * driver.c: parse config file before loading first assembly. This
14221         allows the user gac to be enabled/disabled. 
14222         
14223 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
14224
14225         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
14226         simpler mechanism: we do not care what is encoded initially
14227         (branch absolute or relative), we care about the code and its
14228         target.  I kept the old code for reference for now.
14229
14230         The new code tries first to determine if the jump is anywhere in
14231         the -/+32 absolute meg range, if it succeeds, it encodes using the
14232         absolute branch;  If not, it tried to find something in the
14233         relative range, if not, it uses the handle_thunk code. 
14234
14235 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
14236
14237         * exceptions-ppc.c: use the correct ip register on macosx.
14238
14239 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
14240
14241         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
14242
14243 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
14244
14245         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
14246         Raise exception on integer divide by zero by hand since the hw
14247         doesn't support it. Handle NaNs in FP compares.
14248
14249 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
14250
14251         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
14252         code reducing duplication between the platforms and enabled
14253         signal exception handling (on linux for now).
14254
14255 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
14256
14257         * exceptions-ppc.c: more macosx support.
14258
14259 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14260
14261         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
14262
14263 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
14264
14265         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
14266
14267 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
14268
14269         * iltests.il: more tests.
14270
14271 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14272
14273         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
14274         vars as well.
14275
14276 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14277
14278         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
14279
14280 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14281
14282         * liveness.c: Mark variables as volatile in all basic blocks reachable
14283         from exception clauses.
14284
14285 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
14286
14287         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
14288         inlining.
14289
14290 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
14291
14292         * iltests.il, basic.cs: more tests for regalloc.
14293
14294 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14295
14296         * iltests.il: Some tests for register allocation modifications
14297         I have locally.
14298
14299 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
14300
14301         * exceptions.cs: Add regression test for bug #56782.
14302
14303         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
14304         original stack trace if an exception is rethrown. Fixes #56782. Oh,
14305         the beauty of fixing the same thing in 5 different files...
14306
14307 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
14308
14309         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
14310         methods.
14311
14312 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
14313
14314         * mini.c: Add support for STRWLPARRAY marshalling convention.
14315
14316 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
14317
14318         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
14319         to init the context to setup the regs pointer).
14320
14321 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14322
14323         * exceptions-ppc.c: more exceptions work.
14324
14325 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14326
14327         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
14328         not allowed.
14329
14330 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14331
14332         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
14333         can use the memory directly.
14334
14335         * cpu-pentium.md: Update documentation from a post from Zoltan. 
14336
14337         add x86_add_membase, x86_sub_membase, x86_mul_membase
14338
14339 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14340
14341         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
14342         GENERAL_REGS they were also hardcoded for all PPC ports.
14343
14344         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
14345
14346         Remove hard-coded limit for floating point registers, use
14347         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
14348
14349         Notice that in MacOS X calling conventions you can fit a lot more
14350         floating point values in registers, so I should update the PInvoke
14351         test to excercise the passing of floating point values on the
14352         stack (currently broken).
14353         
14354 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
14355
14356         * tramp-ppc.c (create_trampoline_code): Added
14357         JUMP_TRAMPOLINE_SIZE. 
14358         (ppc_magic_trampoline): Follow the pattern from
14359         x86_magic_trampoline: if code is set to zero, return. 
14360         (create_trampoline_code): Always pass MonoMethod to the jump
14361         trampoline, before it was passing a null.
14362         (mono_arch_create_jump_trampoline): Implement the jump stub, could
14363         share the code with mono_arch_create_jit_trampoline. 
14364
14365         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
14366         implemented.
14367         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
14368         implemented.  
14369
14370         * cpu-g4.md: Added length for jmp instruction, the worst case
14371         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
14372         for save_lmf).
14373
14374 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
14375
14376         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
14377
14378 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
14379
14380         * mini.c: Only set bblock->real_offset when adding a new bblock, and
14381         before each IL instruction.
14382
14383         * mini.c (CEE_BOX): Fix warnings.
14384
14385 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14386
14387         * mini.c: removed a few unused vars and extra whitespace.
14388
14389 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
14390
14391         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
14392         checks.
14393         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
14394         index.
14395         (OP_GETCHR): use the above
14396         (CEE_LDELEMA): use the above.
14397
14398         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
14399         version of the generic impl.
14400         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
14401         (CEE_LDELEMA): use the above.
14402
14403 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14404
14405         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
14406         Fixes #56317.
14407
14408         * iltests.il: Added new regression test for #56317.
14409
14410 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14411
14412         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
14413         under NetBSD. Fixes #56450.
14414
14415         * liveness.c (update_gen_kill_set): Fix previous patch.
14416
14417 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14418
14419         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
14420
14421 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
14422
14423         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
14424         ldsfld and ldsflda.
14425
14426         * inssel-sparc.brg: Add more optimizations.
14427
14428         * mini-sparc.c: Replace multiply/divide with shifts if possible.
14429
14430 2004-04-01  Martin Baulig  <martin@ximian.com>
14431
14432         * mini.c (handle_box): New static function; moved the
14433         implementation of CEE_BOX here.
14434         (mono_method_to_ir): Added `constrained_call' variable.
14435         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
14436         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
14437         mono_method_get_constrained() to get the method.
14438
14439 2004-04-01  Martin Baulig  <martin@ximian.com>
14440
14441         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
14442         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
14443         (mono_method_to_ir): We don't need these macros anymore since
14444         mono_class_get_full() already takes care of it. 
14445
14446 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14447
14448         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
14449         use @function (as doesn't accept #function here) and check the return
14450         value of system and stop if fails.
14451
14452 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14453
14454         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
14455
14456 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
14457
14458         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
14459
14460         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
14461
14462         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
14463         #56223.
14464
14465         * basic-long.cs: Add test for negation of Int64.MinValue.
14466
14467 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
14468
14469         * mini-sparc.c: Update status.
14470
14471         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
14472
14473         * exceptions-sparc.c: Fix return value in filters.
14474
14475         * inssel-sparc.brg: Fix register allocation in some rules.
14476
14477 2004-03-28  Martin Baulig  <martin@ximian.com>
14478
14479         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
14480         if neccessary.  
14481
14482 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
14483
14484         * mini-x86.c (mono_arch_patch_code): Fix warnings.
14485         
14486         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
14487         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
14488         remove unused conv_u4 opcode.
14489
14490         * mini-x86.c: Remove valgrind workaround since it slows down things
14491         even when mono is not run under valgrind.
14492
14493 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
14494
14495         * mini-sparc.c: Update status.
14496
14497         * inssel-sparc.brg: Add some optimizations.
14498
14499         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
14500         future delay slot filling. Add support for varargs, tail calls and JMP.
14501
14502         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
14503         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
14504
14505         * inssel.brg: Fix register allocation in OP_ARGLIST.
14506
14507         * inssel.brg: Fix warnings.
14508
14509 2004-03-25  Martin Baulig  <martin@ximian.com>
14510
14511         * mini.c (inflate_generic_field): Removed.
14512         (mini_get_method): Removed, use mono_get_method_full(),
14513         (mini_get_class): Removed, use mono_class_get_full().
14514         (mono_method_to_ir): Pass our generic context to
14515         mono_field_from_token().        
14516
14517 2004-03-25  Martin Baulig  <martin@ximian.com>
14518
14519         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
14520         of a `MonoMethod *'.
14521         (mini_get_method): Take a `MonoGenericContext *' instead
14522         of a `MonoMethod *'.
14523         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
14524         a new local variable called `generic_context' which holds the
14525         current `MonoGenericContext *'; use it to lookup things.
14526
14527 2004-03-24  Martin Baulig  <martin@ximian.com>
14528
14529         * mini.c (mini_get_class): New static method; if we're inside a
14530         generic instance, inflate the class if neccessary.
14531         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
14532
14533 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
14534
14535         * iltests.il: New regression test for #55976.
14536
14537         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
14538         #55976.
14539
14540 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
14541
14542         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
14543         output.
14544
14545 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
14546
14547         * liveness.c: Consider SSA stores as well as loads when making vars
14548         volatile.
14549
14550         * exceptions.cs: New regression tests for register allocation.
14551         
14552 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
14553
14554         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
14555         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
14556           domain lock only to protect puntual access to data structures.
14557           Added access lock for sighash, jit_icall_hash_name, 
14558           jit_icall_hash_addr and domain->code_mp.
14559
14560 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
14561
14562         * driver.c: Print SIGSEGV handling method.
14563
14564         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
14565
14566         * mini.c (setup_jit_tls_data): Handle case when this is called
14567         multiple times for a thread.
14568
14569         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
14570         is different from fbxx_un. Fixes #54303. Also use constants instead of
14571         magic numbers in a lot of places.
14572
14573 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
14574
14575         * exceptions.cs: Fix cctor test when --regression is used.
14576
14577 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
14578
14579         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
14580         for Linux/ppc.
14581
14582 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14583
14584         * inssel-ppc.brg: fixed register assignments for some rules.
14585
14586 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14587
14588         * exceptions.cs: Add test for exceptions in static constructors.
14589
14590         * mini.c (mono_jit_compile_method_with_out): Move the calling of
14591         static constructors outside the domain lock. Fixes #55720.
14592
14593 2004-03-17  Martin Baulig  <martin@ximian.com>
14594
14595         * mini.c (get_generic_field_inst): Removed, this'll never happen.
14596         (inflate_generic_field): Take the `MonoMethod *' instead of the
14597         `MonoClass *' and added support for generic method.
14598         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
14599         have a `field->parent->gen_params', only inflate the field if it's
14600         an open constructed type.
14601
14602 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14603
14604         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
14605         exception object instead of the preconstructed ones.
14606
14607 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14608
14609         * mini.c: reverted changed to sigsegv_signal_handler commited
14610         accidentally in the previous patch.
14611
14612 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14613
14614         * mini.c:
14615         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
14616         running --aot with an old assembly.
14617
14618 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
14619
14620         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
14621         point values.
14622
14623         * mini-sparc.c: Add support for v9 branches with prediction.
14624
14625 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
14626
14627         * mini.c (mini_init): #warning is GNUC only
14628
14629         * mini-sparc.h: implement __builtin_frame_address
14630         and __builtin_return_address for Sun C compiler
14631
14632 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
14633
14634         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
14635
14636 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
14637
14638         * basic-calls.cs: Add test for unaligned byref long argument passing.
14639
14640         * mini-ops.h: Add sparcv9 compare and branch instructions.
14641
14642         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
14643         v9 instructions if we have a v9 cpu.
14644
14645         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
14646         registers for global allocation.
14647
14648         * exceptions-sparc.c: Fixes.
14649         
14650 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
14651
14652         * liveness.c (mono_analyze_liveness): Optimized version.
14653
14654         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
14655
14656         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
14657         sparc work.
14658
14659         * basic-float.cs basic-calls.cs: New regression tests.
14660
14661 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
14662
14663         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
14664         sigaltstack implementation.
14665
14666         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
14667         
14668         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
14669         stuff if SIGSEGV_ON_ALTSTACK is not defined.
14670
14671 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
14672
14673         * mini.c: Fix warnings.
14674         
14675         * mini.c (mono_resolve_patch_target): New function which contains the
14676         arch independent part of the patching process.
14677
14678         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
14679         patching code to a separate function.
14680
14681 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
14682
14683         * mini.c (add_signal_handler): ifdef out on Windows
14684
14685 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
14686
14687         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
14688         cpu-sparc.md: Add exception handling support + other fixes.
14689
14690         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
14691         typed GC detection in --version.
14692
14693         * basic.cs exceptions.cs: New regression tests.
14694
14695         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
14696         the arch specific code can store data during a compilation.
14697
14698         * mini-ops.h: Add OP_SETFRET.
14699
14700         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
14701         function, register a separate icall for each arity, so the icalls can
14702         get a wrapper.
14703         
14704         * mini.c (mono_print_tree): Print negative offsets in a more readable
14705         form.
14706         
14707         * mini.c: Make signal handling work on sparc.
14708         
14709         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
14710
14711         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
14712
14713         * jit-icalls.c: Emulate truncl by aintl on solaris.
14714
14715         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
14716
14717 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
14718
14719         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
14720
14721 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
14722
14723         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
14724         a MarshalByRef type, inline a method that performs the check, taking into
14725         account that the object can be a proxy. Also implemented tow new opcodes:
14726         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14727         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
14728         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14729
14730 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
14731
14732         * mini-ppc.c: if a relative branch displacement is too big
14733         but it points to and area reachable with an absolute branch, 
14734         avoid the thunks.
14735
14736 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
14737
14738         * mini.c: optimize small copies in cpblk.
14739
14740 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
14741
14742         * basic-calls.cs basic-float.cs: New regression tests.
14743
14744         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
14745         negative offsets from %fp. Implement localloc. Fix local register 
14746         allocation. Fix the case when the this argument needs to be saved to
14747         the stack. Implement some missing opcodes.
14748
14749 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
14750
14751         * mini.c (mini_method_compile): Reenable global regalloc in methods
14752         with exception handlers.
14753
14754         * linear-scan.c (mono_varlist_sort): Fix warning.
14755
14756         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
14757
14758         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
14759         regalloc costs.
14760
14761         * liveness.c: Make all variables uses in exception clauses volatile, to
14762         prevent them from being allocated to registers. Fixes #42136.
14763
14764 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
14765
14766         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
14767         causes regressions.
14768
14769         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
14770         argument to mono_arch_regalloc_cost.
14771
14772         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
14773         precisely.
14774
14775 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
14776
14777         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
14778         Make the cost of allocating a variable to a register arch dependent.
14779
14780         * basic-calls.cs: Fix compilation of tests.
14781         
14782         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
14783         helper function to cut back on the number of #ifdefs needed.
14784
14785         * mini-ppc.c: Fix compilation.
14786
14787         * basic-calls.cs: New regression tests.
14788
14789         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
14790
14791         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
14792         of l0 since that is callee saved.
14793
14794         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
14795         to virtual calls.
14796
14797         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
14798         of delay instruction.
14799
14800         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
14801
14802         * mini.h (MonoCallInst): Add 'virtual' flag.
14803
14804         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
14805
14806 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
14807
14808         * *.cs: New regression tests.
14809
14810         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
14811         work.
14812
14813         * mini.c (mono_runtime_install_handlers): Fix build.
14814
14815         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
14816         'signal_stack_size' members.
14817
14818         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
14819         alternate signal stack.
14820
14821         * exceptions-x86.c: Add stack overflow handling.
14822
14823         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
14824         functions to arch independent code.
14825
14826         * mini.c (mono_print_tree): Print more detailed info for load_membase
14827         opcodes.
14828         
14829 2004-02-23  Martin Baulig  <martin@ximian.com>
14830
14831         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
14832
14833 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14834
14835         * mini-x86.c: fixed reg allocation for div/rem.
14836
14837 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
14838
14839         * driver.c (mono_main): Report some configuratio options on --version.
14840
14841 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
14842
14843         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
14844         low in the address space. Correctly flush memory in thunks where we
14845         output native code.
14846
14847 2004-02-20  Martin Baulig  <martin@ximian.com>
14848
14849         * mini.c (mini_get_method): New static method; inflate all generic
14850         methods and methods in open generic instances.
14851         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
14852         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
14853
14854 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14855
14856         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
14857
14858         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
14859
14860 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
14861
14862         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
14863
14864         * mini-sparc.c (flushi mono_arch_output_basic_block): make
14865         it compile using Sun's compiler.
14866
14867 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14868
14869         * 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.
14870
14871         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
14872
14873 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14874
14875         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
14876         code.
14877         * mini-ppc.c: handle calls outside of the allowed range with thunks
14878         allocated using the code manager.
14879         * tramp-ppc.c: use the code manager to hold generated native code.
14880         Fixed the magic trampoline to just patch vtable entries.
14881
14882 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
14883
14884         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
14885         independent file.
14886
14887 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
14888
14889         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
14890         PPC.
14891
14892         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
14893         if we have a working __thread implementation.
14894
14895         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
14896         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
14897
14898 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
14899
14900         * mini-x86.c: Fix compilation under gcc 2.
14901         
14902 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
14903
14904         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
14905         contains a call to the wrapped function.
14906
14907         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
14908         OP_<CALL>_IMM opcodes, and use them under X86.
14909         
14910         * mini.c (mono_jit_find_compiled_method): Fix warning.
14911
14912         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
14913
14914         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
14915
14916         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
14917         functionality to mini.c.
14918
14919         * mini.c (mono_create_jump_trampoline): New function to create a jump
14920         trampoline. Return a compiled method instead of a trampoline if it
14921         exists. Add a cache for jump trampolines.
14922
14923         * mini.c (mono_jit_find_compiled_method): New function to return a
14924         compiled method if it exists.
14925
14926         * mini-x86.c: Call mono_create_jump_trampoline instead of 
14927         mono_arch_create_jit_trampoline.
14928
14929         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
14930         a jump trampoline. Fixes #52092.
14931         
14932 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
14933
14934         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
14935         which is not up-to-date. Add check_corlib_version () instead.
14936
14937         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
14938         have to call it.
14939         
14940         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
14941         since newer valgrind versions do not need it.
14942
14943         * mini.c (mono_jit_compile_method_with_opt): New helper function to
14944         compile a method with a given set of optimizations.
14945
14946         * mini.c: Compile icall wrappers on-demand instead of at startup.
14947
14948         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
14949         wrapper for an icall.
14950
14951 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
14952
14953         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
14954         #54063.
14955
14956         * iltests.il: Add test for non-empty stack before switch instruction.
14957
14958 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
14959
14960         * mini.c: Add support for new stringbuilder marshalling conventions.
14961
14962         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
14963
14964 2004-02-01  Martin Baulig  <martin@ximian.com>
14965
14966         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
14967         in `ginst->mtype_argv'.
14968
14969 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
14970
14971         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
14972         facilitate grepping.
14973
14974 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
14975
14976         * mini.c: fixed buglet in initobj generic implementation for references.
14977
14978 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
14979
14980         * Makefile.am: make the version script conditional.
14981         * jit-icalls.c: handle missing truncl().
14982
14983 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
14984
14985         * exceptions.cs: Add more tests for double->int conversion.
14986
14987         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
14988         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
14989
14990 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
14991
14992         * driver.c: make --verbose --version emit an error
14993         if the loaded corlib doesn't match the runtime version.
14994
14995 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
14996
14997         * mini-ppc.h: export ppc_patch().
14998         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
14999         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
15000         on par or better than on MacOSX.
15001
15002 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
15003
15004         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
15005         mono_lookup_pinvoke_call.
15006
15007         * mini-x86.c: Under windows, the default pinvoke calling convention is
15008         stdcall. Fixes #52834.
15009
15010         * mini.c (optimize_branches): Add an upper bound to the number of
15011         iterations to prevent infinite loops on strange loops. Fixes #53003.
15012
15013 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
15014
15015         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
15016         and ISINST. Fixes #52093.
15017
15018         * objects.cs (test_0_vector_array_cast): New tests.
15019         
15020 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
15021
15022         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
15023         checking in Array.Set ().
15024
15025         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
15026         #52590.
15027
15028         * object.cs (test_0_multi_array_cast): New regression test.
15029
15030 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
15031
15032         * exceptions-ppc.c: fix build on Linux/PPC.
15033
15034 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
15035
15036         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
15037         running under valgrind.
15038         (x86_magic_trampoline): Fix build bustage.
15039
15040         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
15041         negative values as well. This is needed for the encoding of the line number
15042         info, since sometimes the line numbers are not in increasing order.
15043
15044 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
15045
15046         * cpu-pentium.md (localloc): Increase the size of the localloc 
15047         instruction since it is a loop under Win32.
15048
15049         * debug-mini.c (record_line_number): Get rid of unneccesary memory
15050         allocation.
15051
15052 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
15053
15054         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
15055         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
15056         Max Horn (max@quendi.de). Fix file names in comments.
15057
15058 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
15059
15060         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
15061         avoid stack overflow.
15062         (replace_usage): Avoid uninitialized variable warnings.
15063
15064         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
15065         and taking the address of valuetype variables.
15066
15067 2004-01-03  Patrik Torstensson
15068
15069         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
15070         for other purposes than FP later on.
15071
15072 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
15073
15074         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
15075         of tail calls.
15076
15077 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
15078
15079         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
15080
15081 2003-12-30  Patrik Torstensson <p@rxc.se>
15082
15083         * mini-x86.h: Decreased number of availiable fp regs.
15084         Solves corner cases with FP spilling.
15085
15086 2003-12-23  Patrik Torstensson <p@rxc.se>
15087
15088         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
15089         for floating point stack tracking / spilling on x86. 
15090         Fixes bug #49012.
15091         
15092         * basic-float.cs: added float mul overflow test.
15093
15094 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
15095
15096         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
15097
15098 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15099
15100         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
15101         supports for cond branches that overflow the immediate
15102         overflow offset. mcs can compile simple programs.
15103
15104 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15105
15106         * exceptions-ppc.c: exception handling support wip:
15107         finally handlers get run on exception.
15108
15109 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
15110
15111         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
15112         profiling.
15113
15114 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15115
15116         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
15117         initial support for stack walking and unwinding.
15118
15119 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
15120
15121         * driver.c (mono_main): Make corlib-out-of-sync message more 
15122         descriptive. Also remove verify_corlib call.
15123
15124 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15125
15126         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
15127         not overlap with other call's arguments, too.
15128
15129 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
15130
15131         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
15132         move to arch-specific code the choice of arch-specific
15133         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
15134         * mini.c: ensure emulation calls will not interleave
15135         with other calls.
15136
15137 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
15138
15139         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
15140         the magic trampoline stack frame is dropped before executing
15141         the new method.
15142
15143 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15144
15145         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
15146         and integer to fp conversions. Added support for overflowing
15147         arguments on the stack. Reserve a couple more registers as temps.
15148         Added support for aot compilation (as output still needs to be
15149         tweaked, though).
15150
15151 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15152
15153         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
15154         Don't overwrite return register in some corner cases.
15155
15156 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
15157
15158         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
15159         static constructors when AOT compiling.
15160
15161         * driver.c (mono_main): Call mono_check_corlib_version.
15162
15163 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15164
15165         * cpu-g4.md, basic.cs: fixed div target register.
15166
15167 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
15168
15169         * mini-ppc.c, basic.cs: shl_imm fix with test.
15170
15171 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15172
15173         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
15174         structures by value. Misc fixes.
15175         * objects.cs: more tests.
15176
15177 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
15178
15179         * mini-ppc.c: lconv.ovf.i implemented.
15180
15181 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15182
15183         * mini.c:
15184         (mini_init): don't error out if someone already called g_thread_init.
15185
15186 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15187
15188         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
15189         to be any type per the spec. Fix abnormal memory usage when
15190         the same object is repeatedly thrown.
15191
15192 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
15193
15194         * mini.c: check for overruns in IL code.
15195
15196 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
15197
15198         * TODO: Add/remove some todo entries.
15199
15200 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
15201
15202         * driver.c (mono_main): Call mono_verify_corlib.
15203
15204 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
15205
15206         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
15207         This has been moved to mini.c
15208         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
15209         type being casted is marshalbyref it could be a proxy, so instead of
15210         emitting the type check code, emit a call to a runtime method that will
15211         perform the check by calling CanCastTo if needed.
15212
15213 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
15214
15215         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
15216         methods with large stack frames under Win32.
15217
15218 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
15219
15220         * Makefile.am: Distribute regression tests.
15221
15222         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
15223         at the end instead of inserting each variable into the sorted list.
15224
15225         * linear-scan.c (mono_varlist_sort): New helper function.
15226         
15227 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15228
15229         * mini.c: ensure arguments and locals are within bounds.
15230
15231 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15232
15233         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
15234         related fixes.
15235
15236 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
15237
15238         * mini.c (mono_cprop_copy_values): Fix crash.
15239
15240         * aot.c: Set verbosity back to 0.
15241         
15242 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15243
15244         * regalloc.c: complete memory leak fix by Laurent Morichetti
15245         (l_m@pacbell.net).
15246
15247 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
15248
15249         * driver.c (main_thread_handler): Revert the previous patch.
15250
15251         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
15252         under valgrind.
15253
15254         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
15255         memory from the memory pool.
15256
15257         * driver.c (main_thread_handler): Turn on all optimizations when
15258         --aot is used.
15259
15260         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
15261         an array for better performance.
15262
15263         * regalloc.c (mono_regstate_assign): Fix memory leak.
15264
15265         * debug-mini.c (mono_debug_serialize_debug_info): New function to
15266         serialize the debug info.
15267
15268         * debug-mini.c (mono_debug_add_aot_method): New function to load the
15269         debug info from the serialized representation.
15270
15271         * aot.c: Save debug info into the generated file and load it when 
15272         loading a method.
15273
15274         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15275
15276 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15277
15278         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
15279         More FP-related fixes.
15280
15281 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15282
15283         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
15284         and register allocation buglet. Hello world now runs.
15285
15286 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15287
15288         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
15289         * tramp-ppc.c: fixed class init trampoline.
15290         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
15291
15292 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15293
15294         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
15295         mini.c: more ppc changes/fixes.
15296
15297 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15298
15299         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
15300         Also optimize the case when the arguments are the same in the caller 
15301         and in the callee.
15302
15303         * iltests.il: Add tests for tail calls with valuetype arguments.
15304
15305 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15306
15307         * mini-ppc.c: fixes for struct return type.
15308
15309 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
15310
15311         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
15312         mono_spillvar_offset() to arch-specific code.
15313
15314 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15315
15316         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
15317
15318 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15319
15320         * exceptions-x86.c: Fix stack space leaks.
15321         
15322         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
15323         registers from the lmf if the method has save_lmf set.
15324
15325 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
15326
15327         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
15328         of icall wrappers into InvokeInDomain, since these are now per-domain.
15329
15330 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
15331
15332         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
15333         make some opcode emulation and intrinsic ops enabled/disabled 
15334         according to the architecture. More fixes.
15335
15336 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15337
15338         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
15339
15340 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15341
15342         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
15343         arch-specific handling for 'this' and struct return type to
15344         arch-specific code.
15345
15346 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15347
15348         * aot.c: prevent divide by zero error when reporting (it happened with
15349         Accessibility.dll).
15350
15351 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
15352
15353         * mini.h (inst_switch): Remove unused macro.
15354
15355 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15356
15357         * aot.c:
15358         (load_aot_module): free 'info->methods' and 'info' properly. No more
15359         "free(): invalid pointer blah" messages when you have an old aot
15360         compiled assembly.
15361
15362 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
15363
15364         * jit-icalls.c, mini.c: Added support for context static fields.
15365
15366 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15367
15368         * mini.c (mono_method_blittable): Methods which set LastError are not 
15369         blittable either. Fixes #51108.
15370         
15371 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15372
15373         * mini.c: flush icache.
15374         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
15375
15376 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15377
15378         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
15379
15380 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
15381
15382         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
15383         safe on IA32.
15384
15385         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
15386         vararg calls.
15387
15388         * inssel.brg (CEE_MKREFANY): Fix AOT case.
15389
15390 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
15391
15392         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
15393         instruction when the result is discarded.
15394
15395         * iltests.il (test_0_div_regalloc): New regression test.
15396
15397         * arrays.cs: Fix compilation error.
15398
15399 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
15400
15401         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
15402         float rules to inssel-x86.brg: sane architectures with FP registers
15403         don't need to implement these rules.
15404
15405 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15406
15407         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
15408
15409 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15410
15411         * mini.h, inssel-long32.brg: fixed endianess issues in int64
15412         implementation of 32 bit systems.
15413
15414 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15415
15416         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
15417         (Jeroen Zwartepoorte).
15418
15419 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
15420
15421         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
15422         the caller and the callee matches.
15423         
15424         * mini.c (mono_method_to_ir): Add comment.
15425
15426         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
15427         signbit is missing on some platforms.
15428
15429 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
15430
15431         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
15432
15433         * mini.c (setup_jit_tls_data): Call the new function.
15434         
15435         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
15436
15437         * mini-x86.c: Add experimental support for fast access to the lmf
15438         structure under NPTL/Linux 2.6.x.
15439
15440 2003-11-06  Martin Baulig  <martin@ximian.com>
15441
15442         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
15443         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
15444         the debugger.
15445
15446 2003-11-02  Martin Baulig  <martin@ximian.com>
15447
15448         * mini.c (inflate_generic_field): New static method.
15449         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
15450         generic instance and the field is declared in a generic type, call
15451         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
15452
15453 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
15454
15455         * mini.h mini.c (mono_method_same_domain): New function to return
15456         whenever the caller and the callee are in the same domain.
15457
15458         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
15459
15460 2003-10-30  Martin Baulig  <martin@ximian.com>
15461
15462         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
15463         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
15464         method parameters.
15465         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
15466         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
15467
15468 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
15469
15470         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
15471         propagation.
15472
15473         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
15474         object here, so it is in the correct appdomain etc.
15475
15476 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
15477
15478         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
15479         already done.
15480         (mono_method_to_ir): Avoid freeing the type created returned from
15481         mono_type_create_from_typespec, since it is put into an internal cache
15482         by the function. Fixes pointer.exe.
15483
15484         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
15485         trampolines for icalls and pinvokes as well. Fixes #33569.
15486
15487 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
15488
15489         * mini.c: Update after appdomain changes.
15490
15491         * mini.c (mono_jit_compile_method_inner): Allways compile native
15492         method wrappers in the root domain, since there can only be one
15493         instance of them, whose address is stored in method->info.
15494
15495 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
15496
15497         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
15498         environment variable. Instead detect automatically whenever running
15499         under valgrind using the magic macro RUNNING_ON_VALGRIND from
15500         valgrind.h.
15501
15502 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
15503
15504         * trace.c, trace.h: New files that implement the new trace option
15505         parsing. 
15506
15507         * driver.c: Document new --trace options.
15508
15509         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
15510         mini-x86.c: Apply:
15511
15512         -       if (mono_jit_trace_calls)
15513         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
15514
15515         * mini.h: prototypes.
15516         
15517 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
15518
15519         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
15520
15521         * mini.c inssel.brg: Implement typedefbyref opcodes.
15522
15523         * mini.c (mono_jit_compile_method): Remove unused local variable.
15524
15525         * mini.c (mono_jit_compile_method_inner): Ditto.
15526         
15527 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
15528
15529         * tramp-x86.c (x86_class_init_trampoline): Fix build.
15530         
15531         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
15532
15533 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
15534
15535         * mini.c (mono_no_aot): Remove unused global variable.
15536
15537         * mini.c: Thread safety fixes.
15538
15539 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
15540
15541         * mini.c (mono_create_class_init_trampoline): Add a lock around
15542         class_init_hash_addr.
15543
15544         * arrays.cs (test_0_newarr_emulation): Add new regression test for
15545         #30073.
15546
15547         * mini.c: Decompose the NEWARR instruction before decomposing its
15548         arguments. Fixes #30073.
15549
15550 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
15551
15552         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
15553         convention.
15554
15555 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
15556
15557         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
15558
15559         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
15560
15561         * driver.c: Add support for compiling icall wrappers to --compile.
15562
15563 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
15564
15565         * inssel.brg: The empty value in class->interface_offsets is -1, not
15566         0. Fixes #49287.
15567
15568 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
15569
15570         * objects.cs: New test for 'is' operator on an array of interfaces.
15571
15572 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15573
15574         * tramp-ppc.c: update trampoline code to support jumps
15575         and class initialization.
15576
15577 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
15578
15579         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
15580
15581         * inssel.brg (OP_UNBOXCAST): Fix #46027.
15582
15583         * inssel.brg (OP_UNBOX): Remove unused rule.
15584
15585         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
15586         region instead of one for each method. Fixes #47813.
15587
15588 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
15589
15590         * exceptions.cs (test_0_nested_finally): New regression test for
15591         nested exception handlers.
15592
15593         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
15594
15595         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
15596
15597         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
15598         inlining.
15599
15600         * mini.c (mono_method_check_inlining): Make the inlining limit 
15601         configurable by an environment variable.
15602         
15603         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
15604
15605         * mini.h: Bump AOT file version.
15606
15607         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
15608         token, store the image along with the token, since the token might not 
15609         refer to the same image as the method containing the relocation, 
15610         because of inlining.
15611
15612 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
15613
15614         * mini.c (mono_precompile_assemblies): New function to compile
15615         all methods in all loaded assemblies.
15616
15617         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
15618
15619         * regalloc.h regalloc.c (MonoRegState): Change the type of 
15620         iassign and fassign to int*, since they can contain large negative
15621         values if the register is spilled. Also added some comments. Fixes
15622         #45817.
15623
15624         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
15625         under Win32. Fixes #42964.
15626
15627 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
15628
15629         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
15630
15631         * aot.c: Added support for AOT compiling methods which contain calls
15632         to wrappers. Currently, only remoting-invoke-with-check wrappers are
15633         handled.
15634         
15635         * driver.c (compile_all_methods): Run the compilation in a thread
15636         managed by mono. Fixes #44023.
15637
15638         * mini.c (mono_codegen): Print full method name in verbose output.
15639
15640         * mini-x86.c (mono_arch_patch_code): Fix warning.
15641         
15642         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
15643         jumps, since the method we are jumping to might be domain-specific.
15644
15645         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
15646
15647 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15648
15649         * inssel.brg: string chars are unsigned.
15650
15651 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
15652
15653         * TODO: New todo item.
15654
15655         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
15656         which calls mono_runtime_class_init and patches the call site to
15657         avoid further calls.
15658         (mono_arch_create_class_init_trampoline): New arch specific function 
15659         to create a class init trampoline.
15660         (create_trampoline_code): Generalized so it can create
15661         class init trampolines as well.
15662
15663         * mini.c (helper_sig_class_init_trampoline): New helper variable.
15664         (mono_create_class_init_trampoline): New function to create and cache
15665         class init trampolines.
15666         (mono_find_class_init_trampoline_by_addr): New function to lookup the
15667         vtable given the address of a class init trampoline. Used by the
15668         patching process.
15669         (mono_codegen): Generate a call to a trampoline instead of
15670         mono_runtime_class_init in LDSFLD[A].
15671         (mono_codegen): Add relocations for the new trampoline.
15672         
15673         * mini.h mini-x86.c aot.c: Added a new relocation type: 
15674         MONO_PATCH_INFO_CLASS_INIT.
15675
15676         * mini.h: Bump AOT version number.
15677
15678         * aot.c: Create a copy of the loaded code instead of using the original
15679         so methods which call each other will be close in memory, improving
15680         cache behaviour.
15681         
15682         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
15683         patch since it breaks the regression tests.
15684         
15685         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
15686         for the register saving instruction sequence since the 
15687         frame_state_for function in glibc 2.3.2 don't seem to detect it.
15688
15689 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
15690
15691         * TODO: Fix todo item && remove another.
15692
15693 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
15694
15695         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
15696         previous checkin.
15697
15698         * aot.c: Moved the check for MONO_LASTAOT into the initialization
15699         function of the module.
15700
15701         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
15702         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
15703         --no-aot command line option.
15704
15705 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
15706
15707         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
15708         by Bernie Solomon (bernard@ugsolutions.com).
15709
15710         * inssel.brg: Refactor the interface offset table related code into
15711         its separate functions and add support for the AOT case.
15712
15713 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
15714
15715         * aot.c (mono_aot_get_method_inner): Fix memory leak.
15716         
15717         * aot.c: Added mono_aot_verbose variable and made all debugging
15718         output depend on the value of this variable.
15719
15720         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
15721         method_label and info_label.
15722
15723         * mini.h mini-x86.c aot.c: Added a new relocation type 
15724         MONO_PATCH_INFO_IID for klass->interface_id.
15725
15726         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
15727         the MonoJitInfo structure.
15728
15729         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
15730         a non-root appdomain in shared mode.
15731
15732 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15733
15734         * aot.c: make aot loader less verbose. Remove free of unused variable.
15735
15736 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
15737
15738         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
15739
15740         * .cvsignore: Added *.dll.
15741
15742         * mini.c (mono_print_tree_nl): New function callable while debugging.
15743
15744         * mini.c (mono_print_code): Export this.
15745
15746         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
15747         patched code.
15748
15749 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
15750
15751         * mini.h (MonoCompile): Added 'jit_info' field.
15752
15753         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
15754         the cfg structure, since it is needed by the AOT compiler.
15755
15756         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15757
15758         * aot.c: A major rewrite. Changes include:
15759         - save exception tables for methods which have them.
15760         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
15761         to g_module_symbol.
15762         - reworked the file format so it is now much smaller and needs
15763         fewer relocation entries.
15764         
15765 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15766
15767         * aot.c (load_aot_module): Fix build bustage on platforms without
15768         Boehm GC.
15769
15770 2003-09-04  Martin Baulig  <martin@ximian.com>
15771
15772         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
15773
15774 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15775
15776         * TODO: Some new optimization ideas.
15777
15778         * aot.c: Move AOT module loading logic here from mono_assembly_open.
15779
15780         * aot.c: Save the optimization flags used to compile the code into
15781         the AOT module.
15782
15783         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
15784         support emitting domain specific code.
15785         
15786         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
15787         no longer domain neutral. It can be made domain neutral by compiling 
15788         with --optimize=shared.
15789
15790         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
15791         between appdomains.
15792
15793         * driver.c mini.h mini.c: New --no-aot debugging option which disables
15794         loading of AOT code.
15795
15796         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
15797         
15798         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
15799         if there is no domain neutrality information.
15800
15801 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
15802
15803         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
15804         format version into the generated library.
15805
15806         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
15807         callee method into the caller since one of them could be shared.
15808
15809         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
15810         system exceptions from AOT code now works.
15811
15812         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
15813         method if it is domain neutral and the callee is not.
15814
15815         * graph.c (cfg_emit_one_loop_level): Fix warning.
15816
15817 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
15818
15819         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
15820         last checkin.
15821
15822 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
15823
15824         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
15825         is needed  by code which is executed before mono_runtime_init ().
15826         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
15827         
15828         * mini.c (mono_thread_abort): Fix warning.
15829         (mono_jit_compile_method): Call static constructor in the AOT case too.
15830
15831         * aot.c (mono_compile_assembly): Fix warning.
15832
15833 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15834
15835         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
15836
15837 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
15838
15839         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
15840
15841         * cpu-pentium.md: Fix the length of call opcodes so they include the
15842         ESP restoring instruction. Fixes #47968.
15843
15844 2003-08-28  Martin Baulig  <martin@ximian.com>
15845
15846         * mini-x86.c (mono_arch_call_opcode): Added support for
15847         MONO_TYPE_GENERICINST.
15848
15849         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
15850
15851 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
15852
15853         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
15854         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
15855
15856         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
15857         metadata_section.
15858
15859 2003-08-26  Martin Baulig  <martin@ximian.com>
15860
15861         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
15862         when reporting an error, set this to the actual error location.
15863         (mono_method_to_ir): Report the correct error location if
15864         get_basic_blocks() returned an error.
15865
15866 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
15867
15868         * mini.c (mono_type_blittable): OBJECT is not blittable.
15869         (mono_method_blittable): Methods which have marshalling descriptors
15870         are not blittable either. Fixes #47842.
15871
15872 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
15873
15874         * driver.c mini.c: Use an environment variable instead of a global 
15875         variable. Also fix the build.
15876
15877         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
15878         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
15879         reporting this. 
15880
15881         * driver.c mini.c: Added --with-valgrind option to turn off some
15882         code which prevents mono from running under valgrind.
15883
15884         * mini.c (mono_emit_call_args): Fixed warning.
15885
15886         * mini.c (mono_emulate_opcode): Fixed warning.
15887
15888 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15889
15890         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
15891         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
15892         regalloc.c, regalloc.h: specify available registers in arch-specific
15893         code and support floats in the regallocator (patch by Laurent Morichetti 
15894         <l_m@pacbell.net>)
15895
15896 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15897
15898         * mini.c: mono_thread_current() can be called only after
15899         mono_runtime_init(): rearrange code to not call it early on.
15900
15901 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15902
15903         * mini.c: allocate jump tables in the code mempools.
15904
15905 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15906
15907         * mini.c, mini.h: make sure per-thread data allocated by the jit is
15908         freed.
15909
15910 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
15911
15912         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
15913         12 to 16.  This fixes bug #47453.
15914
15915
15916 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15917
15918         * mini-ppc.c: fixed indexed load and unsigned compares.
15919
15920 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
15921
15922         * mini.c: reenabled installation of handler for
15923           thread abort signal.
15924
15925 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15926
15927         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
15928         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
15929         until it's fixed and actually useful.
15930
15931 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15932
15933         * inssel-long32.brg: couple more opcodes implemented.
15934
15935 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15936         
15937         * mini-sparc.c: Even more opcodes implemeted.
15938
15939 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
15940
15941         * mini-sparc.c: More opcodes implemented.
15942
15943 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
15944
15945         * mini-sparc.c: More opcodes implemented.
15946
15947 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15948
15949         * inssel-sparc.brg: Add some needed rules.  Direct
15950         copy from PPC.
15951         * Makefile.am: Use inssel-sparc.brg
15952         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
15953         an assert happy for now.
15954
15955 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
15956
15957         * mini-sparc.c: Fixed compile errors.
15958         * exceptions-sparc.c: Same.  We now produce a mono binary 
15959         on sparc-linux.  Yea.
15960
15961 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
15962
15963         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
15964         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
15965         They compile, but do not work.
15966
15967 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15968
15969         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
15970         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
15971         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
15972         (ct@gentoo.org).
15973
15974 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15975
15976         * mini.c: more opcodes implemented and better support for generics.
15977
15978 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15979
15980         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
15981         * mini.c, mini.h: first cut at generics support: some new instructions 
15982         added and changed the behaviour of some of the existing ones.
15983
15984 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
15985
15986         * mini.c: Removed definition of metadata_shared mutex here.
15987
15988 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15989
15990         * mini-x86.c: make vararg calls work for instance methods.
15991
15992 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15993
15994         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
15995         returns the arguments in a separte list, now.
15996
15997 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15998
15999         * aot.c, mini.c: updates for array type representation changes.
16000
16001 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
16002
16003         * mini.c: register function to perform jit shutdown.
16004
16005 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16006
16007         * mini.c: use a faster allocator if possible.
16008
16009 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16010
16011         * aot.c: some cleanups and portability changes.
16012
16013 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16014
16015         * mini.c: use faster allocation for CEE_BOX if possible.
16016
16017 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16018
16019         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
16020         Moved inlined mempcy code to its own function so that is can be
16021         reused. Added an inline memset function as well (optimized initobj).
16022         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
16023
16024 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16025
16026         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
16027
16028 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16029
16030         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
16031         arch code can setup the cpu for CLR execution, if needed.
16032         We use it on x86 to set the precision of FP operations.
16033
16034 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16035
16036         * mini.c: disable some optimizations if we can guess they'll cost too
16037         much for a given method.
16038
16039 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16040
16041         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
16042         
16043 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16044         * mini.h mini.c mini-x86.c: Added instruction level coverage 
16045         info collection support.
16046
16047 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16048
16049         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
16050         is now implemented in the profiling API. Get rid of a couple of
16051         unnecessary global variables.
16052
16053 2003-06-15  Nick Drochak <ndrochak@gol.com>
16054
16055         * basic-long.cs: tests for negative values for bigmul, and unsigned.
16056         * cpu-g4.md: add op_bigmul and op_bigmul_un
16057         * cpu_pentium.md: add op_bigmul_un
16058         * inssel-long32.brg: add rule for unsigned bigmul
16059         * mini-ops.h: define OP_BIGMUL_UN
16060         * mini-x86.c: THE BUG: handle (un)signed properly
16061         * mini.c: choose unsigned opcode if needed.
16062         This set of patches fixes bug #44291
16063
16064 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
16065
16066         * mini.c (optimize_branches): improved to handle all kinds of
16067         conditional branches.
16068
16069 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16070
16071         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
16072         don't raise exceptions.
16073
16074 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16075
16076         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
16077         to arch-specific files.
16078
16079 2003-06-09  Martin Baulig  <martin@ximian.com>
16080
16081         * Makefile.am (libs): Added $(LIBGC_LIBS).
16082
16083 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
16084
16085         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
16086         and OP_ATAN (fixes bug#44293).
16087
16088 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
16089
16090         * Makefile.am, mini-x86.c: rename cpu description array to
16091         pentium_desc, since some compilers define the 'pentium' preprocessor
16092         symbol.
16093
16094 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
16095
16096         * mini.c (mini_select_instructions): add explicit branch if the
16097         following block is not the false target of a conditional branch -
16098         we need this with any optimization that reorder or remove bblocks
16099
16100         * mini.c (optimize_branches): bug fixes
16101
16102 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
16103
16104         * mini.c (mono_method_to_ir): inline static readonly fields
16105
16106         * ssa.c (fold_tree): start cfold support for long (very simple
16107         cases only)
16108
16109         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
16110
16111 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16112
16113         * inssel.brg: fixed memcpy (bug #44219).
16114
16115 2003-06-05  Dick Porter  <dick@ximian.com>
16116
16117         * driver.c: Set the glib log levels to not abort if g_message
16118         recurses.
16119
16120         g_set_prgname() has to happen before mini_init() so that the
16121         process handle gets the info.
16122         
16123 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16124
16125         * driver.c: add intrins to the default optimizations to get wider
16126         exposure.
16127
16128 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16129
16130         * mini.h: some large basic blocks will overflow a 16-bit
16131         integers for symbolic registers.
16132
16133 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
16134
16135         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
16136         (mono_arch_output_basic_block): fix bug 43499 
16137
16138 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16139
16140         * mini.c: kill duplicated definition of mono_debug_format.
16141
16142 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
16143
16144         * mini-x86.c, arrays.cs: fixed register allocation bug.
16145
16146 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
16147
16148         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
16149
16150         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
16151
16152 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16153
16154         * mini.c:
16155         (print_method_from_ip): also print source location information if
16156         available.
16157
16158 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
16159
16160         * mini.c (mono_find_block_region): bug fix in region code
16161         (mini_method_compile): enable removing unreachable code again, but
16162         only in methods without exception clauses.
16163
16164 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16165
16166         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
16167         Implemented arglist opcode and handling of TypedReference type.
16168         Fixed x86 call convention when a structure is returned.
16169         Minimal support for calling static vararg methods.
16170
16171 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
16172
16173         * mini.c (mini_method_compile):  always remove unreachable code,
16174         because the code in them may be inconsistent  (access to dead
16175         variables for example).
16176
16177 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16178
16179         * driver.c, debug-mini.c: warning fixes.
16180
16181 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
16182
16183         * Makefile.am, jit.h, mini.h: install header for embedding mono.
16184
16185 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
16186
16187         * mini.c: thread-static fields are registered in mono_class_vtable(),
16188         so ensure the function is called before checking for them.
16189
16190 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
16191
16192         * mini.c (optimize_branches): fix for bug 43586
16193
16194         * jit-icalls.c (mono_llmult_ovf): added an additional check for
16195         overflow (fixes Bug #43639)
16196
16197 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16198
16199         * mini.c, objects.cs: allow the use of stobj for primitive types.
16200
16201 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16202
16203         * mini.c: be less strict about argument checking until we support
16204         running the verifier.
16205
16206 2003-05-27  Nick Drochak <ndrochak@gol.com>
16207
16208         * basic-long.cs: tests for (ulong)int * (ulong)int also
16209         * mini.c: use the same trick for (ulong)int * (ulong)int
16210
16211 2003-05-27  Nick Drochak <ndrochak@gol.com>
16212
16213         * basic-long.cs: add regression test for (long)int * (long)int
16214         * cpu-pentium.md: add op_bigmul specification
16215         * inssel-long32.brg: add OP_BIGMUL rule
16216         * mini-ops.h: add OP_BIGMUL
16217         * mini-x86.c: register allocator: handle case where src1 needs to be
16218         in EAX.
16219         * mini.c: substitute special BIGMUL opcode in the tree for 
16220         (long)int * (long)int
16221
16222 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16223
16224         * jit-icalls.c: call the type ctor on field access if needed.
16225
16226 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16227
16228         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
16229         to a method (including results of ldelema, bug#43207).
16230
16231 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
16232
16233         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
16234         colors to show exception handler blocks.
16235
16236         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
16237         (fix for pinvoke7.cs).
16238
16239 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16240
16241         * mini.h, mini.c: ensure correct initialization order for types that
16242         require it. Prepare for lazy compilation of jit icall wrappers.
16243         Provide a name for opcode emulation to reduce unneeded mallocing.
16244
16245 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
16246
16247         * mini-x86.c: better register restoring code and profiling
16248         support for tail calls.
16249
16250 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16251
16252         * mini.h, driver.c: prepare for leaf methods optimization.
16253
16254 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16255
16256         * mini.c: get targets of branches before converting a method.
16257
16258 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
16259
16260         * mini.c (optimize_branches): added some experimental code (disbaled) 
16261
16262 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
16263
16264         * mini.c (optimize_branches): fix branch to branch optimization 
16265
16266         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
16267
16268         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
16269
16270         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
16271
16272         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
16273         if needed.
16274
16275 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
16276
16277         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
16278         enable use of interface variables again.
16279
16280         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
16281         I1 to registers because there is no simply way to sign extend 8bit
16282         quantities in caller saved registers on x86.
16283
16284         * inssel-float.brg: set costs of some rules to 2 so
16285         that monobure always select the arch. specific ones if supplied,
16286         regardless of the order we pass the files to monoburg.
16287
16288 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16289
16290         * mini.c, mini-x86.c: since the magic trampoline for jumps
16291         can't patch the code directly, we do it as soon as the
16292         method gets compiled.
16293
16294 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16295
16296         * mini-x86.c, mini.h: introduce a new patching method
16297         to support CEE_JMP and tail calls.
16298         * mini.c: obey tail.call. Don't precompile methods target
16299         of CEE_JMP.
16300         * tramp-x86.c: new trampoline code to handle methods
16301         reached through a jump.
16302
16303 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
16304
16305         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
16306         bit values to registers
16307
16308 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
16309
16310         * mini.c (mono_compile_get_interface_var): share interface
16311         variables if possible.
16312
16313 2003-05-16  Martin Baulig  <martin@ximian.com>
16314
16315         * debug-mini.c (mono_init_debugger): New function to initialize
16316         the debugger.  This is not in the debugger since it needs to
16317         access some of mini's internals.
16318
16319 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16320
16321         * mini.c (mono_method_to_ir): inlining fixes/cleanups
16322
16323 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
16324
16325         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
16326         for value type handling.
16327
16328 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16329
16330         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
16331         (mono_method_check_inlining): enable inlining of all kinds of wrappers
16332
16333 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
16334
16335         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
16336           the constructor through a proxy.
16337
16338 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16339
16340         * jit-icalls.c, inssel.brg: fixes to array element address
16341         calculations.
16342
16343 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
16344
16345         * mini-x86.c (is_regsize_var): allocate pointer to registers
16346
16347 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16348
16349         * driver.c: fixed typo, added intrins to the set of optimizations
16350         tested with regressions.
16351
16352 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16353
16354         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
16355         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
16356         test case.
16357
16358 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
16359
16360         * inssel.brg: remove some common pop instructions without side effects
16361
16362 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16363
16364         * inssel-x86.brg: fixed thinko in int to double conversions.
16365
16366 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
16367
16368         * mini.c, jit-icalls.c: added runtime thread-static variable support.
16369
16370 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16371
16372         * inssel-long32.brg: two more missing instructions.
16373
16374 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
16375
16376         * mini.c (mono_emit_call_args): set the cil_code for all arguments
16377         if not already set.
16378
16379 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
16380
16381         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
16382         correctly.
16383
16384         * basic-float.cs: Added tests for negative zero.
16385
16386 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16387
16388         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
16389         a couple of missing operations for long casts, with test cases.
16390
16391 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16392
16393         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
16394
16395 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
16396
16397         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
16398         code size estimation.
16399
16400 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
16401
16402         * mini.c (mono_jit_create_remoting_trampoline): make it work with
16403         abstract methods (fix bug 42542)
16404
16405         * aot.c: add ability to handle array types
16406         
16407 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
16408
16409         * mini.c: Call the _specific versions of the object allocation
16410         functions if possible.
16411
16412 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16413
16414         * driver.c: call setlocale ().
16415
16416 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16417
16418         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
16419         windows build.
16420
16421 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
16422
16423         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
16424
16425         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
16426         wrappers (fix bug 42122)
16427
16428 2003-05-04  Martin Baulig  <martin@ximian.com>
16429
16430         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
16431
16432         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
16433         s/mini_set_defaults/mono_set_defaults/g.
16434
16435 2003-05-04  Martin Baulig  <martin@ximian.com>
16436
16437         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
16438
16439 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16440
16441         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
16442         (reported by Don Roberts).
16443
16444 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16445
16446         * mini.c: temporarily work around two bugs for this release.
16447
16448 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16449
16450         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
16451         that contains -export-dynamic and it makes using the ld script
16452         useless.
16453         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
16454
16455 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16456
16457         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
16458         specific cpu.
16459
16460 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16461
16462         * mini.c: make sure leave calls all the needed finally blocks,
16463         even when the target jumps out of multiple exception clauses.
16464
16465 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16466
16467         * ldscript, Makefile.am: add linker script to reduce the number of
16468         exported symbols (should also fix the issues with libwine defining
16469         some of the same symbols in io-layer).
16470
16471 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
16472
16473         * driver.c (mini_main): Avoid assertion when no file name is given on 
16474         the command line.
16475
16476 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
16477
16478         * driver.c: added --version/-V command line option.
16479         Added the inline optimization in the regression tests.
16480
16481 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16482
16483         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
16484         to the type in the method signature (fixes bug#42134).
16485
16486 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
16487
16488         * mini.c: when inlining, check this is not null only when needed (bug #42135).
16489
16490 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
16491
16492         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
16493
16494 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16495
16496         * driver.c: fixed bug #42100.
16497
16498 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
16499
16500         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
16501
16502 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16503
16504         * mini.c: moved most of the code required to do inlining to its own
16505         function so it can be reused. Inline also ctors if appropriate.
16506
16507 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
16508
16509         * Makefile.am: Link with -export-dynamic so shared libs loaded by
16510         the runtime can call mono API functions.
16511
16512 2003-04-27  Martin Baulig  <martin@ximian.com>
16513
16514         * debug-mini.c (mono_debug_init_method): Added
16515         `guint32 breakpoint_id' argument; if the method has a breakpoint,
16516         send a notification to the debugger.
16517
16518         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
16519         running in the Mono Debugger, just pass the breakpoint number to
16520         mono_debug_init_method().
16521
16522         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
16523
16524 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
16525
16526         * mini.c: allow some more unsafe compares.
16527
16528 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16529
16530         * mini-x86.c, Makefile.am: make distcheck works (partially from
16531         a patch by Richard Lee <r.h.lee@attbi.com>).
16532         * regset.c, regset.h: removed, they are unused.
16533
16534 2003-04-25  Dick Porter  <dick@ximian.com>
16535
16536         * driver.c: Usage reports the name as 'mono' not 'mini'
16537         * exceptions-x86.c: Build and run on freebsd
16538
16539 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
16540
16541         * Makefile.am: install the program with the 'mono' name and
16542         the library as libmono instead of mini and libmini.
16543
16544 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16545
16546         * driver.c: provide the APIs for the embedding interface of the old jit.
16547
16548 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
16549
16550         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
16551
16552 2003-04-23  Martin Baulig  <martin@ximian.com>
16553
16554         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
16555
16556         * driver.c: Added `--debug' command line argument to enable
16557         debugging support.
16558
16559 2003-04-23  Martin Baulig  <martin@ximian.com>
16560
16561         * debug.[ch]: Removed.  The code is now in
16562         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
16563
16564         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
16565         last six months.
16566
16567 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
16568
16569         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
16570
16571 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16572
16573         * mini.c:
16574         (mini_cleanup): moved mono_runtime_cleanup call after the call to
16575         mono_domain_finalize.
16576         (mini_method_compile): use mono_method_profile* if the the option is
16577         enabled.
16578
16579 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
16580
16581         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16582         methods with their wrapper.
16583
16584         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16585         methods with their wrapper.
16586
16587         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
16588         their wrapper.
16589
16590         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
16591         wrapper.
16592
16593         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
16594         methods.
16595
16596 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
16597
16598         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
16599
16600 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
16601
16602         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
16603         of the mempool. This is slightly faster and uses less memory
16604
16605 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16606
16607         * mini.c: avoid O(n) allocation for variables.
16608
16609 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16610
16611         * mini.c: handle items on the stack after inlining methods.
16612
16613 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16614
16615         * mini.c: make the method->opcode optimization dependent
16616         on MONO_OPT_INSTRINS and do it lazily.
16617
16618 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16619
16620         * driver.c: print overall results at the end of regression run.
16621
16622 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
16623
16624         * inssel.brg: don't overwrite symbolic registers.
16625
16626 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16627
16628         * inssel-x86.brg: fix conversion from long to float.
16629
16630 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
16631
16632         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
16633
16634 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
16635
16636         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
16637
16638         * driver.c: Added --print-vtable option as in the old JIT.
16639
16640 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16641
16642         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
16643
16644 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
16645
16646         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
16647
16648 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
16649
16650         * mini.c regalloc.c regalloc.h: Fix memory leak.
16651
16652 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
16653
16654         * aot.c (mono_aot_get_method): register all used strings
16655
16656 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16657
16658         * mini.c: always intern strings references with ldstr at compile time.
16659
16660 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16661
16662         * Makefile.am: add BUILT_SOURCES.
16663
16664 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16665
16666         * driver.c: give a better error message when the assembly to execute
16667         doesn't have an entry point.
16668
16669 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
16670
16671         * Makefile.am: added hack for automake
16672
16673         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
16674         correct sematics.
16675
16676         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
16677
16678 22003-04-07  Martin Baulig  <martin@ximian.com>
16679
16680         * Makefile.am: Added Makefile.am.
16681
16682         * debugger-main.c: Removed, this is now in the debugger where it
16683         belongs.
16684
16685         * mini.pc.in: Call this package `mini' for the moment.
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699