2008-10-25 Martin Baulig <martin@ximian.com>
[mono.git] / mono / mini / ChangeLog
1 2008-10-25  Martin Baulig  <martin@ximian.com>
2
3         * debug-mini.c (write_variable): Use
4         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
5
6 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
7
8         * cpu-x86.md: Add unsigned variants of packd and packw.
9
10         * mini-ops.h: Same.
11
12         * mini-x86.h: Emit the right instruction for packd and packw.
13         Add unsigned variants of packd and packw.
14
15         * simd-intrinsics.c: Packd and packw were used in place of their
16         unsigned variants. Change that.
17         Add intrinsics for (Signed)PackWithSignedSaturation.
18
19         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
20
21 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
22
23         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
24
25 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
26
27         * mini-ops.h: Remove dword packed add/sub with saturation ops.
28
29         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
30
31         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
32         sse instructions.
33
34         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
35
36 2008-10-24  Mark Probst  <mark.probst@gmail.com>
37
38         * method-to-ir.c, mini.c: Special casing for the synchronized
39         wrapper for the ldtoken+GetTypeFromHandle case.
40
41 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
42
43         * mini.c (mono_replace_ins): Move this to branch-opts.c.
44
45         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
46         created/split bblocks.
47
48 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
49
50         * mini-ops.h: Add packed signed mul high.
51         
52         * cpu-x86.md: Same.
53
54         * mini-x86.c (mono_arch_output_basic_block): Same.
55
56         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
57
58         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
59
60 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
61
62         * basic-simd.cs: Tests for Vector16sb.
63
64 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
65
66         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
67
68 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
69
70         * mini-ops.h: Add packed signed min, max and compare greater.
71         
72         * cpu-x86.md: Same.
73
74         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
75         saturation.
76
77         * simd-methods.h: Add CompareGreaterThan.
78
79         * simd-methods.h: Remove CompareEquals.
80
81         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
82
83         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
84
85         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
86         CompareEqual.
87
88 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
89
90         * basic-simd.cs: Fix tests due to change in the API.
91
92 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
93
94         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
95
96 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
97
98         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
99
100         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
101         inst_offset as this has invalid values for LDADDR.
102
103 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
104
105         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
106
107         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
108
109 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
110
111         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
112         for accessing field->data.
113
114 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
115
116         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
117
118 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
119
120         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
121
122         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
123
124 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
125
126         * dominators.c (mono_compute_natural_loops): Allocate GList enties
127         from the cfg mempool.
128
129 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
130
131         * basic-simd.cs: Tests for new methods in Vector8us.
132
133 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
134
135         * mini-ops.h: Add multiply and store high.
136         
137         * cpu-x86.md: Same.
138
139         * mini-x86.c (mono_arch_output_basic_block): Same.
140
141         * simd-methods.h: Same.
142
143         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
144         and CompareEqual.
145
146 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
147
148         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
149         mono_class_setup_vtable ().
150
151         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
152         mono_class_get_vtable_entry () for accessing klass->vtable.
153
154         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
155
156         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
157         found.
158
159         * method-to-ir.c (mono_save_token_info): Don't save references made from
160         wrappers.
161
162         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
163         of generic instances.
164
165         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
166
167 2008-10-19  Mark Probst  <mark.probst@gmail.com>
168
169         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
170         OP_JMP depends on the method signature.  Calculate it properly.
171
172 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
173         
174         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
175         called directly.
176
177         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
178         instances.
179         (emit_extra_methods): Add another table mapping method indexes to 
180         offsets in the extra_method_info table.
181
182         * mini.h: Bump AOT file format version.
183         
184         * aot-runtime.c: Merge most of the code from mono_aot_get_method
185         and mono_aot_get_method_from_token () into one function.
186
187 2008-10-19  Mark Probst  <mark.probst@gmail.com>
188
189         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
190         separate counter.
191
192 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
193
194         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
195         methods.
196
197         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
198         disable_aot.
199
200         * mini.c (mono_patch_info_equal): Compare the generic context as well.
201
202         * mini.h: Bump aot file format version.
203
204         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
205         AOT file can contain native code for methods which are not in the METHOD
206         table. Generate code for non-sharable generic instances of generic methods
207         found in the METHODSPEC table.
208         
209         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
210         encoding generic type handles.
211
212         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
213         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
214
215         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
216         macros + MONO_ADD_INS.
217
218         * mini.c (mono_jump_info_token_new2): New function which takes a generic
219         context as well.
220
221         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
222
223         * mini.h: Bump aot file format version.
224
225         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
226
227 2008-10-17  Mark Probst  <mark.probst@gmail.com>
228
229         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
230         platforms, with definable stack alignment value.  Set to 16 now
231         for all platforms.
232
233         * mini.c, mini.h, driver.c: Command line option for disabling
234         stack alignment.
235
236 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
237
238         * basic-simd.cs: Tests for new methods in Vector4ui.
239
240 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
241
242         * mini-ops.h: Add packed int shuffle.
243         
244         * cpu-x86.md: Same.
245
246         * mini-x86.c (mono_arch_output_basic_block): Same.
247
248         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
249         extract mask, max, min, shuffle.
250
251         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
252
253 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
254
255         * basic-simd.cs: Tests for new methods in Vector8us.
256
257 2008-10-17  Mark Probst  <mark.probst@gmail.com>
258
259         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
260         RuntimeTypeHandle, not a TypedReference.
261
262 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
263
264         * simd-intrinsics.c: remove relocations.
265
266 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
267
268         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
269         optimizations from the x86 backend.
270
271 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
272
273         * simd-methods.h, simd-intrinsics.c: debloat method names and
274         prepare for no relocations.
275
276 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
277
278         * mini-ops.h: Add packed min/equal and sum of absolute differences.
279         
280         * cpu-x86.md: Same.
281
282         * mini-x86.c (mono_arch_output_basic_block): Same.
283
284         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
285         extract mask, max, min and sum of absolute differences.
286
287         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
288         method name.
289
290 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
291
292         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
293         Renamed one test for consistency.
294
295 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
296
297         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
298         fix to the code that deal with other blocks.
299
300 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
301
302         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
303
304 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
305
306         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
307         that deals with vreg interference. Explicitly check for OP_LDADDR to be
308         able to process the source reg.
309
310 2008-10-16  Martin Baulig  <martin@ximian.com>
311
312         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
313
314         * inssel.brg: Add `OP_HARD_NOP'.
315
316         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
317
318         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
319         `OP_HARD_NOP' instruction when running inside the debugger.
320
321         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
322         `OP_HARD_NOP' instruction when running inside the debugger.
323
324 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
325
326         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
327         now works. The issue with the regalloc tripping up no longer
328         happens.
329
330         * simd-intrinsics.c (load_simd_vreg): Same.
331
332 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
333         
334         * basic-simd.cs: Tests for new Vector8ui methods.
335
336 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
337
338         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
339         only for type. This fixes crashes where MonoInst::klass is checked
340         for ops of type != VTYPE or OBJ.
341
342         * simd-intrinsics.c (load_simd_vreg): Same.
343
344 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
345
346         * mini-ops.h: Add ops for packed shuffle/max/avg and
347         extract mask.
348         
349         * cpu-x86.md: Same.
350
351         * mini-x86.c (mono_arch_output_basic_block): Same.
352
353         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
354         extract mask.
355
356         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
357         to emit extract mask op.
358
359         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
360         to emit word shuffles.
361
362 2008-10-15  Mark Probst  <mark.probst@gmail.com>
363
364         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
365         the largest alignment needed by a variable, but at least
366         sizeof(gpointer).
367
368 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
369
370         * basic-simd.cs: Tests for the fixes in the last commit.
371
372 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
373
374         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
375         no longer handles STACK_PTR input.
376
377         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
378
379         * simd-intrinsics.c (load_simd_vreg): New function that works like 
380         get_simd_vreg   but handles STACK_PTR input.
381
382         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
383         as the input can be an arbitrary pointer.
384
385         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
386         LDADDR local optimization directly otherwise use a store op.
387
388 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
389
390         * basic-simd.cs: Tests for dup low and dup high.
391
392 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
393
394         * mini-ops.h: Add dup low and dup high ops.
395         
396         * cpu-x86.md: Same.
397
398         * mini-x86.c (mono_arch_output_basic_block): Same.
399
400         * simd-intrinsics.c (vector4f_intrinsics): Same.
401
402 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
403
404         * basic-simd.cs: Tests for recently added functionality.
405
406 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
407
408         * mini-ops.h: Add remaining sse1 fp ops.
409         
410         * cpu-x86.md: Add remaining sse1 fp ops.
411
412         * mini-x86.c (mono_arch_output_basic_block): Same.
413
414         * mini.h: Add enum for simd FP compare conditions.
415
416         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
417
418         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
419         so the backed can generate the appropriate op.
420
421 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
422         This patch squeese one more byte from the SimdIntrinsc struct.
423
424         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
425         a a shift amount intead of simply or'ing it.
426
427         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
428
429         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
430         byte so we can have an aditional flags field without increasing struct size.
431
432         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
433         against the simd_supported_versions bitmask.
434
435         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
436
437 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
438
439         * mini.c: remove rawbuffer code (the only use here is unsafe because
440         it takes locks during signal handling and the kernel now provides much
441         better info in proc/pid/smaps these days).
442
443 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
444
445         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
446         OP_X86_PUSH_OBJ. Fixes #434620.
447
448         * objects.cs: Add a test.
449         
450 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
451
452         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
453         that the packuswb/packusdw don't work with unsigned numbers for what
454         would be negative numbers in signed format.
455
456         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
457         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
458
459         * mini-ops.h: Add doubleword forms of many ops and packing ones.
460
461         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
462
463         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
464
465         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
466
467         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
468         add more ops.
469
470         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
471         version as the enum in mini.h.
472
473         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
474         for sse3 ops, check the simd_version field if present. This way the code
475         works with all versions of sse.
476
477 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
478
479         * simd-intrinsics.c: Fixed intrinsic name typo.
480
481         * mini.h: Added missing simd exported function.
482
483         * basic-simd.cs: Added tests for Vector4ui.
484         Fixed broken test for Vector16b.
485
486 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
487
488         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
489         the max length to 64.
490
491 2008-10-10  Mark Probst  <mark.probst@gmail.com>
492
493         * method-to-ir.c: Only do the fast virtual generic method call for
494         non-wrapper methods.
495
496         * mini.h, mini-trampolines.c: The new generic virtual remoting
497         trampoline handles virtual method calls via the vtable (as done by
498         the fast virtual generic method calls) to remoting proxies.
499
500         * mini.c (mono_jit_create_remoting_trampoline): For generic
501         methods reate a generic virtual remoting trampoline.
502
503         * mini-amd64.h: Enable fast virtual generic method calls again.
504
505 2008-10-10  Mark Probst  <mark.probst@gmail.com>
506
507         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
508         restore registers when doing tail calls.
509
510 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
511
512         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
513         Vector4ui.
514
515 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
516
517         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
518
519 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
520
521         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
522
523 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
524
525         * basic-simd.cs: Retrofit for API changes.
526
527 2008-10-10  Mark Probst  <mark.probst@gmail.com>
528
529         * mini-ppc.c: Handle integer stack arguments for tail calls.
530
531 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
532
533         * optflags-def.h: Removed sse3 optimization.
534
535         * driver.c: Same.
536
537         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
538         sse3.
539
540         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
541
542         * mini.h: Added enumeration with simd versions.
543
544         * simd-intrinsics.c (emit_intrinsics): Use the new static var
545         for detecting SSE3.
546
547         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
548
549         * mini.c (mini_init): Call mono_simd_intrinsics_init.
550
551 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
552
553         * basic-simd.cs: Added tests for Vector8u and Vector16u.
554
555         * basic-simd.cs: Fixed test naming.
556
557 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
558
559         * mini-ops.h: Added ops for packed and saturated math, shifts
560         and packing/unpacking.
561
562         * cpu-x86.md: Added descriptors for the above ops.
563
564         * mini-x86.c: Added code to emmit the above ops.
565
566         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
567
568 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
569
570         * aot-compiler.c (compile_method): Enable AOT for generic code.
571
572         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
573
574 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
575
576         * mini.c: add a workaround for a common screwup that ends up blamed
577         to mono (other processes blocking signal delivery).
578
579 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
580
581         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
582         in the LDFLD/STFLD opcodes. Fixes #432673.
583
584         * iltests.il.in: Add a new test.
585
586 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
587
588         * mini-arm.c: attach the thread in unmanaged->managed transitions
589         using delegates (bug #433148).
590
591 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
592
593        * basic-simd.cs: Use new ShuffleSel constants.
594
595 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
596
597         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
598
599         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
600         only disable simd intrinsics if no sse2 is detected.
601
602         * optflags-def.h: Added sse3.
603
604         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
605         is disabled.
606
607 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
608
609         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
610         when adding delegate-invoke wrappers.
611
612 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
613
614         * Makefile.am: Reenable the simd tests.
615
616 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
617
618         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
619           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
620           other vreg is allocated to that hreg.
621
622         Contributed under MIT/X11 license.
623
624 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
625
626         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
627         yet checked in.
628
629 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
630
631         * basic-simd.cs: New test suite for SIMD intrinsics.
632
633         * Makefile.am: Added new tests.
634
635 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
636
637         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
638
639         * mini-ops.h: Same.
640
641         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
642
643         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
644         using SSE2 aware opcodes.
645
646         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
647         is enabled, this code path is only reachable if conversion ops are emmited after
648         mono_method_to_ir.
649
650         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
651
652         This optimization saves 6 bytes per conversion against the old version.
653
654 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
655
656         * aot-compiler.c (compile_method): Don't skip methods referencing 
657         generic methods without a corresponding entry in token_info_hash, since
658         encode_method_ref () can handle all generic methods now.
659
660         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
661         generic context is set.
662         
663         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
664         generic sharing of LDTOKEN.
665
666 2008-10-06  Mark Probst  <mark.probst@gmail.com>
667
668         * mini-amd64.h: Temporarily disabled fast virtual generic method
669         calls because it breaks the System.Runtime.Remoting tests.
670
671 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
672
673         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
674
675         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
676         so inlining actually works.
677         (check_inline_caller_method_name_limit): Ditto.
678
679 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
680
681         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
682         64 bit safety (from Olaf Hering and Andreas Färber).
683
684 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
685         
686         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
687         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
688         unused virtual call support code.
689
690         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
691         
692         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
693         which can't use aot trampolines.
694         (decode_patch): Don't create aot trampolines for methods which can't use
695         them.
696
697         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
698         use aot trampolines.
699
700         * mini.h: Bump AOT image format version.
701         
702 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
703
704         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
705         to save_token_info () since cmethod is inflated for constrained calls.
706
707         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
708
709 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
710
711         * Makefile.am: Add build rules for ppc64.
712         This avoids the build failing at pedump with unresolved symbols
713         due to lack of arch_sources. Instead it will now fail earlier
714         due to lack of cpu-ppc64.md.
715
716         Contributed under MIT/X11 license.
717
718 2008-10-04  Mark Probst  <mark.probst@gmail.com>
719
720         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
721         tail calls.
722
723         * iltests.il.in: Add test case for tail call with many arguments.
724
725 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
726
727         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
728         to the fast virtual generic method code until the aot case is fixed.
729
730 2008-10-03  Mark Probst  <mark.probst@gmail.com>
731
732         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
733
734 2008-10-03  Mark Probst  <mark.probst@gmail.com>
735
736         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
737         thunks.
738
739 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
740         
741         * simd-intrinsics.c: Forgot to add this one.
742
743         * mini-codegen.c: Fix macro in case SIMD is not supported.
744
745 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
746         
747         This patch land initial JIT support for simd intrinsics.
748
749         * mini-x86.h: Added new define to make --enable_minimal work on x86.
750
751         * Makefile.am: Added simd-intrinsics.c
752
753         * simd-intrinsics.c: New file with simd instrinsic related
754         code.
755
756         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
757
758         * cpu-x86.md: Add simd related instructions.
759
760         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
761
762         * driver.c: Added two new --regression variants.
763
764         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
765
766         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
767
768         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
769         extract some complicated logic to helper functions.
770
771         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
772
773         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
774
775         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
776         the specialized simplification pass.
777
778         * method-to-ir.c (mono_spill_global_vars): Use new macro.
779
780         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
781
782         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
783         table.
784
785         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
786         if MONO_ARCH_NEED_SIMD_BANK is defined.
787
788         * mini-ops.h: Added the new simd ops.
789
790         * mini-x86.c: Added mono_arch_xregname.
791
792         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
793
794         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
795
796         * mini-x86.h: Define simd related MONO_ARCH macros.
797
798         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
799
800         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
801
802         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
803         MONO_CLASS_IS_SIMD to deal with simd related IR.
804
805         * mini.h (MonoInst): Added spill_var to the backend union.
806
807         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
808
809         * mini.h: Added forward declarations of the new simd fuctions.
810
811         * optflags-def.h: Added new optimization names SIMD.
812
813         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
814
815         * regalloc.h: Added support for working with 3 register banks.
816
817         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
818
819         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
820
821 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
822
823         * mini-exceptions.c: remove 64 bit related ifdef clutter.
824
825 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
826
827         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
828         instead of one on 64 bit systems.
829
830         * method-to-ir.c: Remove unused includes.
831
832 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
833
834         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
835         cfg->used_int_regs, since the two are different on arm.
836
837 2008-10-02  Mark Probst  <mark.probst@gmail.com>
838
839         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
840         mono_method_get_vtable_index() to get the vtable index.
841
842 2008-10-02  Mark Probst  <mark.probst@gmail.com>
843
844         * method-to-ir.c (mono_method_to_ir2): Don't create native
845         wrappers for array methods, because they're never called (and if
846         they were called they wouldn't work).
847
848 2008-10-02  Mark Probst  <mark.probst@gmail.com>
849
850         * method-to-ir.c (mono_method_to_ir2): Array methods are
851         special-cased and must not be invoked indirectly via the (M)RGCTX
852         when generic sharing is turned on.  Fixes #431413.
853
854 2008-10-01  Mark Probst  <mark.probst@gmail.com>
855
856         * method-to-ir.c: When generic sharing is active, call
857         non-interface virtual generic methods via the standard trampoline.
858
859         * mini-trampolines.c: Handle virtual generic shared methods.
860
861         * mini.h, mini-x86.c, mini-x86.h: New argument for
862         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
863         method thunks and which is the trampoline to call if the lookup
864         fails.  Enable the virtual generic method thunk for x86.
865
866         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
867         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
868         argument but assert that it's NULL, because these archs don't yet
869         implement the virtual generic method thunk.  Changes in the IMT
870         thunk data structures.
871
872 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
873
874         * aot-compiler.c (emit_globals): Avoid invalid characters in
875         the static linking symbol.
876
877         * objects.cs: Add a test for the range check optimization. Fix warnings.
878
879         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
880         optimization from the current JIT.
881
882         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
883         later in decompose_array_access_opts () to allow more optimizations.
884
885         * method-to-ir.c (mono_handle_soft_float): Rename this to 
886         mono_decompose_soft_float () for consistency.
887
888         * mini-ops.h: Fix arguments of OP_STRLEN.
889
890         * method-to-ir.c (save_cast_details): Extract the cast details saving code
891         into a separate function.
892         (reset_cast_details): Ditto.
893         (handle_unbox): Save cast details. Fixes #431254.
894
895         * method-to-ir.c: Remove some obsolete FIXMEs.
896
897 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
898
899         * ir-emit.h (alloc_dreg): Write a warning before crashing.
900
901 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
902
903         * mini-codegen.c: More work on macros to make them
904         ready for multiple regbanks.
905
906 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
907
908         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
909
910         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
911
912 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
913
914         * mini-codegen.c (mono_spillvar_offset): Proper support for
915         multiple regbanks.
916
917 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
918
919         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
920         the stack overflow changes.
921
922 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
923
924         * mini-codegen.c: Make all bank macros depend on reg_bank.
925
926         * mini-codegen.c (mono_local_regalloc): Make free mask
927         initialization regbank aware.
928
929 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
930
931         * mini-codegen.c (mono_local_regalloc): Extract callee
932         mask selection to a function and make it regbank aware.
933
934 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
935
936         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
937         code to deal with many regbanks.
938
939 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
940
941         * mini-codegen.c: More fp->regbank changes.
942
943 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
944
945         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
946         of a hardcoded constant.
947
948 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
949
950         * method-to-ir.c (type_from_stack_type): Fix typo.
951
952 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
953
954         * mini-ia64.c (emit_move_return_value): Convert float return values to
955         double.
956
957         * objects.cs: Add a new test.
958         
959         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
960         VARARG methods to fix an assert later.
961
962         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
963         end so it at least compiles.
964
965 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
966
967         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
968
969 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
970
971         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
972         optimization to a new function (emit_optimized_ldloca_ir) and enable
973         it for both ldloca and ldloca_s.
974
975 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
976
977         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
978         gshared CASTCLASS code.
979
980         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
981         amd64, where the libc stack unwinder encounters stack frames referring to
982         native code in unmapped memory.
983
984         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
985         sharing.
986
987         * generics.cs: Add new test.
988
989 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
990
991         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
992         add a check that one of the ARM_FPU_ constants is defined.
993
994         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
995         
996         * mini-exceptions.c: Fix build on non-altstack platforms.
997
998         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
999         sharing of vtypes.
1000
1001         * ir-emit.h: Add a comment to NEW_PCONST.
1002
1003         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
1004
1005         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
1006
1007         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
1008         after the changes to MonoJitDomainInfo.
1009
1010 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1011
1012         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
1013
1014 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1015
1016         * mini-ppc.c: Compiler warning fixes.
1017
1018 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1019
1020         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
1021         for pinvokes.
1022
1023 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1024
1025         * exceptions-ppc.c, mini-ppc.h: Compile
1026         mono_arch_handle_altstack_exception() on Darwin, too.
1027
1028 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1029
1030         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
1031         work on archs which don't have generic sharing implemented, only
1032         without the vtable_arg.
1033
1034 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1035
1036         * mini.c: Added comment explaining why delegate ctor icall
1037         wrappers are compiled.
1038
1039 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1040
1041         * mini.c: Don't produce trampolines to delegate ctor icall
1042         wrappers but compile them upfront.
1043
1044 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
1045
1046         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
1047         runtime-set function when going back to managed code. Currently this
1048         is used to set back the protection on the soft ovf pages and/or to
1049         throw the stack overflow exception that happened in unmanaged code.
1050
1051 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
1052
1053         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
1054         runtime-set function when going back to managed code. Currently this
1055         is used to set back the protection on the soft ovf pages and/or to
1056         throw the stack overflow exception that happened in unmanaged code.
1057
1058 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1059
1060         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
1061         the support code for restoring stack protection after stack overflows
1062         that happen in unmanaged code. Don't set the exec permission on the
1063         soft overflow area.
1064
1065 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
1066
1067         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
1068         delegate->method_ptr is set. Fixes #428054.
1069
1070 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1071
1072         * tests.cs: Rename to ratests.cs.
1073
1074         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
1075         emit_get_rgctx_... functions.
1076
1077 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1078
1079         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
1080
1081 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1082
1083         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
1084         before asserting that method is sharable.
1085
1086 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1087
1088         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
1089         whether method needs a static RGCTX wrapper used instead of
1090         complex conditions.
1091
1092         * generic-sharing.c, mini.h: A few functions moved to
1093         metadata/generic-sharing.c.
1094
1095 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1096
1097         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
1098         Generic code sharing for value types, which essentially means
1099         treating value type methods like static methods.  The RGCTX is
1100         passed in the same way.
1101
1102 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1103
1104         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
1105         opcode when creating multi-dimensional arrays of open types.
1106
1107         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
1108         open generic types.
1109
1110         * generics.cs: Add a test.
1111
1112         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
1113
1114 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1115
1116         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
1117
1118         * mini.c (mini_method_compile): Set it when running under the debugger. 
1119
1120         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
1121         vreg optimization if the flag is set.
1122
1123         * driver.c (mono_main): Add --attach= option to pass options to
1124         the attach agent.
1125
1126         * mini.c (sigquit_signal_handler): Start the attach agent.
1127
1128         * ssapre.c: Disable this to save space since it is not yet ported to
1129         linear IR.
1130
1131         * regalloc2.c: Disable this to save space.
1132
1133         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
1134
1135 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
1136
1137         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
1138         the -v option useful again.
1139
1140 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1141
1142         * mini-amd64.c (mono_arch_output_basic_block): Add support for
1143         --break-at-bb.
1144
1145         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
1146         arrays of arrays. Fixes #428406.
1147
1148         * method-to-ir.c (mini_emit_castclass): Ditto.
1149
1150         * objects.cs: Add new test.
1151         
1152 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
1153
1154         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
1155         was wrong at it choked against target_type_is_incompatible for byref types.
1156
1157 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1158
1159         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
1160         places.
1161
1162 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
1163
1164         * mini-exceptions.c: update a few more exceptions-related counters.
1165
1166 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
1167
1168         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
1169         new functions to allocate from persistent mempools.
1170
1171 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1172
1173         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
1174         multiple register banks in the future.
1175
1176         * mini-codegen.c (mono_local_regalloc): Fix a warning.
1177
1178 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
1179
1180         * mini.c (type_to_eval_stack_type): Remove duplicated function.
1181
1182         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
1183
1184         * mini.h: Export type_to_eval_stack_type.
1185
1186         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
1187         is only ins->klass of byref types.
1188
1189 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
1190
1191         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
1192         (mini_emit_memcpy2): Ditto.
1193
1194         * mini-amd64.c: Fix a warning.
1195
1196 2008-09-21  Mark Probst  <mark.probst@gmail.com>
1197
1198         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
1199         linking.
1200
1201 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
1202
1203         * method-to-ir.c: Extract stloc micro-optimization to a
1204         function and apply it to all cases.
1205
1206 2008-09-19  Mark Probst  <mark.probst@gmail.com>
1207
1208         * method-to-ir.c: Don't fail generic code sharing in cases we
1209         already support.
1210
1211 2008-09-18  Mark Probst  <mark.probst@gmail.com>
1212
1213         * mini-ppc.c: Handle structs in tailcalls on Darwin.
1214
1215 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
1216
1217         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
1218         implementation.
1219
1220 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
1221
1222         * trace.c: make tracing more useful and correct, with per-thread
1223         id and indent info.
1224
1225 2008-09-15  Mark Probst  <mark.probst@gmail.com>
1226
1227         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
1228         doing a method call and the argument is an R4.
1229
1230 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
1231
1232         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
1233         generic methods.
1234
1235 2008-09-13  Mark Probst  <mark.probst@gmail.com>
1236
1237         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
1238
1239 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
1240
1241         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
1242         (MONO_JUMP_TABLE_FROM_INS): Ditto.
1243
1244 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
1245
1246         * driver.c: Add a --agent argument (not supported yet) to load managed
1247         agent assemblies before loading the main assembly, similarly to how the
1248         Java VM handles agents.
1249
1250 2008-09-11  Mark Probst  <mark.probst@gmail.com>
1251
1252         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
1253         function to do stack layout of local variables.
1254
1255 2008-09-11  Mark Probst  <mark.probst@gmail.com>
1256
1257         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
1258         calculation.
1259
1260 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
1261
1262         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
1263         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
1264         JIT if DISABLE_JIT is defined.
1265
1266         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
1267         defined.
1268
1269 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1270
1271         * iltests.il.in: Disable the fconv test on PPC (the result is
1272         undefined according to ECMA).
1273
1274 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1275
1276         * iltests.il.in: Enable tail call tests for PPC.
1277
1278         * mini.h: Add variable for storing incoming valuetype argument
1279         addresses for tail calls.
1280
1281         * mini-ppc.c: Implement valuetype arguments and return values for
1282         tailcalls on Linux.
1283
1284 2008-09-09  Mark Probst  <mark.probst@gmail.com>
1285
1286         * mini-ppc.c: Partially implement tail calls (struct arguments and
1287         return values not supported).
1288
1289         * method-to-ir.c: Enable tail calls on PPC.
1290
1291 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
1292
1293         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
1294         runtime-invoke wrappers to work around the problem of them getting
1295         assigned to a random class.
1296
1297         * aot-runtime.c (mono_aot_get_method): Ditto.
1298         
1299 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
1300
1301         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
1302         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
1303
1304 2008-09-07  Mark Probst  <mark.probst@gmail.com>
1305
1306         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
1307         until they're implemented properly.
1308
1309         * exceptions-ppc.c: Use arch-independent exception-handling code
1310         instead of custom one.
1311
1312         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
1313         for Linear IR.
1314
1315         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
1316
1317         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
1318         applies when __powerpc__ is defined.
1319
1320 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
1321
1322         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
1323         methods to their code to avoid computing the full name of wrappers and
1324         doing a lookup in a string hash table.
1325
1326 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1327
1328         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
1329         we identify bblocks before method_to_ir () is ran.
1330
1331         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
1332         Also avoid optimizing branches pointing to themselves.
1333
1334         * mini.c (mini_method_compile): Ditto. Fixes #422947.
1335
1336 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
1337
1338         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
1339
1340 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1341
1342         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
1343         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
1344         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
1345         'buf'.
1346
1347         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
1348         jumped to the same entry in plt_jump_table.
1349
1350 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
1351
1352         * method-to-ir.c (initialize_array_data): Handle field with RVA from
1353         dynamic images.
1354
1355 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
1356
1357         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
1358         other assignment can be if converted. Saves 1.5% on corlib size and fixes
1359         #421807.
1360
1361 2008-08-29  Geoff Norton  <gnorton@novell.com>
1362
1363         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
1364         segment, and doesn't properly handle .space as .text.  Fixes
1365         AOT Mach/ARM
1366
1367 2008-08-29  Geoff Norton  <gnorton@novell.com>
1368
1369         * mini.c: Disable the mach exception handler when running on 
1370         ARM
1371
1372 2008-08-29  Geoff Norton  <gnorton@novell.com>
1373
1374         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
1375         globals on Darwin/ARM
1376
1377 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
1378
1379         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
1380         since too many things depend on it. Instead, call 
1381         mono_runtime_set_no_exec ().
1382         
1383         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
1384         the new JIT.
1385
1386         * aot-compiler.c: Add an 'asm-only' AOT option.
1387
1388         * mini.c: Avoid initializing the runtime when doing AOT compilation.
1389                 
1390         * aot-compiler.c (compile_method): Disable gshared support for now as it
1391         doesn't yet work.
1392
1393 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1394
1395         * mini-amd64.h : Fix a compiler warning.
1396
1397         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
1398           Changed to use a callback function to retrieve the unwind info.
1399           This avoids problems observed when code blocks were removed by
1400           unloading an app domain.
1401
1402         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
1403           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
1404           to work properly.
1405
1406         Contributed under MIT/X11 license.
1407
1408 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1409
1410         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
1411           case to keep the stack aligned to 8.
1412
1413         Contributed under MIT/X11 license.
1414
1415 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
1416
1417         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
1418         avoid repeated linear searches.
1419
1420 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
1421
1422         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
1423         methods it can't handle.
1424         
1425         * aot-compiler.c (add_method): Avoid adding a method twice.
1426         (add_wrappers): Add runtime invoke wrappers for all methods.
1427
1428         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
1429         function to create an aot-compatible version of this trampoline.
1430
1431         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
1432
1433 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
1434
1435         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
1436
1437         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
1438         with a generic sharing failure.
1439
1440         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
1441
1442         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
1443         CEE_RETHROW. Fixes #419634.
1444
1445         * mini.c (mono_method_to_ir): Ditto.
1446
1447         * exceptions.cs: Add a new test.
1448         
1449         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
1450         to mono_type_stack_size_internal () since some callers might not pass in
1451         an rgctx.
1452
1453         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
1454         instrument_prolog. Fixes #419878.
1455
1456         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
1457         doubles in soft float mode volatile.
1458
1459 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
1460
1461         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
1462
1463         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
1464         to handle soft float correctly.
1465
1466         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
1467         the fast path.
1468
1469         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
1470
1471         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
1472         to sp, since the generics catch code requires it.
1473
1474         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
1475         copying.
1476
1477         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
1478         mono_arch_emit_imt_argument ().
1479
1480         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
1481
1482         * mini-arm.c tramp-arm.c: Generic sharing updates.
1483
1484 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
1485
1486         * mini-arm.c: Fix the arm build.
1487
1488         * generic-sharing.c (mini_type_get_underlying_type): New helper function
1489         handling enums, generic instances and generic sharing.
1490         (mini_type_stack_size_full): Ditto.
1491
1492         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
1493         
1494         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
1495
1496         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
1497
1498         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
1499         trampolines.
1500
1501         * mini-arm.c: Various small generic sharing changes.
1502
1503         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
1504         this for x86.
1505         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
1506         custom code.
1507
1508         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
1509         helper function to return a generic class init trampoline.
1510
1511         * method-to-ir.c mini.c: Use it.
1512         
1513         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
1514         arch-specfic function to return a generic class init trampoline.
1515
1516         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
1517         the GENERIC_CLASS_INIT custom code.
1518
1519         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
1520         a fatal error, not a sharing failure.
1521
1522         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
1523         needed.
1524
1525         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
1526         trampoline argument from MONO_ARCH_VTABLE_REG.
1527
1528         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1529         order of the arguments to the C trampoline: pass 'slot' as the trampoline
1530         argument, and pass the vtable in VTABLE_REG.
1531
1532         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1533         order of the arguments to the C trampoline: pass 'slot' as the trampoline
1534         argument, and pass the vtable in VTABLE_REG.
1535         (mono_arch_create_trampoline_code_full): Remove some special casing for
1536         the rgctx fetch trampoline.
1537
1538         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
1539         Fixes #419273.
1540
1541         * iltests.il: Add a test for it.
1542
1543 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
1544
1545         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
1546
1547         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
1548         no longer needed.
1549
1550         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
1551         use mono_jit_info_table_find () to avoid recursion.
1552         (mono_delegate_trampoline): Add a sync wrapper here.
1553
1554         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
1555         here.
1556
1557         * mini.c (mono_method_to_ir): Ditto.
1558         
1559         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
1560         add_sync_wrapper argument. Don't add a sync wrapper here.
1561         (mono_create_jump_trampoline): Don't add a sync wrapper here.
1562
1563         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
1564         
1565 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1566
1567         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
1568           of nonvolatile registers back from MonoContext to CONTEXT.
1569
1570         Contributed under MIT/X11 license.
1571
1572 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1573
1574         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
1575           arguments on Winx64 there are only 4 argument registers.  For this
1576           logic to work the last argument must be pulled from the stack.  
1577
1578         Contributed under MIT/X11 license.
1579
1580 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
1581
1582         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1583
1584         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
1585         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
1586         encode/decode_method_ref ().
1587
1588         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
1589
1590         * aot-runtime.c (decode_patch): Ditto.  
1591
1592         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
1593         MONO_PATCH_INFO_METHOD.
1594
1595         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
1596         MonoGenericJitInfo.
1597
1598         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
1599         MonoGenericJitInfo.
1600
1601         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
1602
1603         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
1604         one from the caller.
1605
1606         * aot-runtime.c (decode_generic_inst): New function to decode and
1607         return a interned generic inst.
1608         (decode_klass_ref): Use it.
1609         (decode_method_ref): Ditto.
1610
1611         * aot-compiler.c (emit_exception_debug_info): Save 
1612         jinfo->has_generic_jit_info too.
1613
1614 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
1615
1616         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
1617
1618         * iltests.il.in: Add a test for fconv_to_i.
1619
1620         * liveness.c: Disable the liveness2 pass for now to save space.
1621
1622         * regalloc2.c: Include mempool-internals.h to fix warnings.
1623
1624         * aot-compiler.c (encode_method_ref): Encode the context of generic
1625         instance methods.
1626
1627         * aot-runtime.c (decode_method_ref): Inflate generic methods using
1628         the context saved in the aot file.
1629
1630         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1631
1632         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
1633
1634         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
1635         volatile so they won't be optimized away.
1636
1637 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
1638
1639         * ssa.c:
1640         * ssa2.c:
1641         * mini.c:
1642         * regalloc2.c:
1643         * dominators.c: Remove duplicated functions that now are in
1644         mempool-internals.h.
1645
1646 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
1647
1648         * aot-compiler.c: Fix warnings.
1649
1650         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
1651
1652         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
1653
1654         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
1655         as the patch type.
1656
1657         * mini.c (mono_resolve_patch_target): Ditto.
1658         
1659         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
1660         (encode_klass_ref): Add support for encoding VARs/MVARs.
1661
1662         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
1663
1664         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
1665         the handling of the got entries into a separate 'decode_got_entry' function.
1666         Add support for RGCTX_FETCH.
1667
1668         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
1669         clobbered by the trampoline code.
1670
1671         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
1672         not clobbered by the indirect calling code.
1673
1674 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1675
1676         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
1677         to fix the build.
1678
1679 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
1680
1681         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
1682         signature using the compilation mempool otherwise we would leak it.
1683
1684 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1685
1686         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
1687         mono_emit_abs_call ().
1688
1689         * patch-info.h: Add GENERIC_CLASS_INIT.
1690
1691         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
1692
1693         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
1694         as their target as a near call.
1695
1696         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
1697         ABS handling code.
1698         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
1699
1700         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
1701         call to a runtime function described by a patch.
1702
1703         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
1704         mono_emit_abs_call, this has the advantage that the ABS handling code in
1705         mono_codegen () can handle them both, and can handle other stuff in the
1706         future without additional code.
1707
1708         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
1709         entry.
1710         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
1711         abs addresses.
1712
1713         * mini.h: Add missing bblock related prototypes.
1714
1715         * mini.h (MonoCompile): Remove unused reverse_inst_list and
1716         reverse_inst_list_len fields.
1717
1718         * mini.c: Refactor this file a bit by moving branch optimizations to 
1719         branch-opts.c.
1720
1721         * method-to-ir.c: Merge generic sharing changes missed earlier.
1722
1723         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
1724
1725         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
1726         shared patches. Process METHODCONST as a shared patch.
1727
1728         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
1729         as it crashes on the 2.0 mscorlib.
1730
1731         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
1732         to cause crashes.
1733         
1734         * aot-compiler.c: Use is_plt_patch () in a few additional places.
1735         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
1736         by IMT.
1737
1738         * aot-compiler.c: Reorganize the got handling code to be a bit more
1739         understandable.
1740
1741 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1742
1743         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
1744         mono_patch_info_equals/hash, and use it to massively simplify
1745         get_plt_index ().
1746
1747         * mini.c (mono_patch_info_hash): Simplify this and add support for
1748         more patch types.
1749
1750         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
1751
1752         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
1753         handling code, since an offset is not enough to identify a trampoline.
1754
1755         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
1756
1757 2008-08-17  Mark Probst  <mark.probst@gmail.com>
1758
1759         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
1760
1761         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
1762
1763         * mini-ops.h: Argument and result types for OVF_CARRY ops.
1764
1765         * decompose.c: PPC decompositions for various ops.
1766
1767         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
1768
1769 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1770
1771         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
1772         call the generic trampoline code using a call, instead of a jump, to
1773         remove some special casing from the generic trampoline code.
1774
1775         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
1776         (mono_codegen): Ditto.
1777
1778         * aot-compiler.c aot-runtime.c: Ditto.
1779
1780         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
1781
1782         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
1783         helper function to find the offset corresponding to a lazy fetch trampoline.
1784
1785         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
1786         when doing generic sharing.
1787
1788         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
1789         places.
1790         
1791         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
1792         mini-trampolines.c to be with the other trampoline creation functions.
1793
1794         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
1795         as it is equal to method->signature in most cases, add a 
1796         mono_emit_method_call_full variant which takes a signature and an imt
1797         argument as well.
1798
1799 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
1800
1801         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
1802         to this function, since it could be computed easily from the method 
1803         argument.
1804         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
1805         more.
1806
1807         * method-to-ir.c mini.c: Remove references to 
1808         compile_generic_method_wo_context.
1809
1810         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
1811         generic method calls.
1812         
1813         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
1814         dimensional non-szarrays.
1815
1816         * mini.c (mini_init): Register mono_array_new_1.
1817
1818         * jit-icalls.c (mono_array_new_1): New jit icall.
1819
1820         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
1821         pointing to the method.
1822
1823         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
1824         method addresses belonging to METHOD_JUMP patches in the 
1825         jump_target_got_slot_hash.
1826         (mono_aot_load_method): Ditto.
1827
1828         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
1829         METHOD_JUMP patches.
1830
1831         * mini.c (mini_create_jit_domain_info): New helper function which 
1832         initializes/frees domain->runtime_info.
1833         (mini_free_jit_domain_info): Ditto.
1834         (mini_init): Install the domain hook functions with the runtime.
1835
1836         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
1837         information maintained by the JIT.
1838
1839         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
1840         insertion into jump_table_hash into mono_codegen (), also implement proper
1841         locking.
1842
1843         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
1844         tail calls, it is already done by the aot code.
1845         
1846         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
1847         mechanism on amd64.
1848
1849         * iltests.il.in: Make the jmp test a bit more complex.
1850
1851         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
1852         generic instances which doesn't have a token.
1853
1854         * aot-runtime.c (decode_method_ref): Ditto.
1855         
1856         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
1857         can handle this case now.
1858         (handle_box): Ditto.
1859
1860 2008-08-15  Geoff Norton  <gnorton@novell.com>
1861
1862         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
1863         debugging check.
1864
1865 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
1866
1867         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
1868         calling generic methods.
1869
1870         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
1871
1872         * aot-runtime.c (decode_patch_info): Ditto.
1873
1874         * mini.c (mono_resolve_patch_target): Ditto.
1875         
1876         * patch-info.h: Add METHOD_RGCTX.
1877
1878         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
1879
1880 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
1881
1882         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
1883         arguments in registers.
1884
1885         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
1886         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
1887
1888         * mini.c (mini_method_compile): Abort aot compilation for generic
1889         methods if generic sharing is disabled.
1890         
1891         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
1892         an mrgctx.
1893
1894         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
1895         requiring an mrgctx.
1896
1897         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
1898         store instructions when converting a vcall to a normal call.
1899
1900         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
1901         mono_arch_find_jit_info.
1902
1903 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
1904
1905         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
1906         avoid calling mono_method_full_name () for every method even if the
1907         env var is not set.
1908         (check_inline_caller_method_name_limit): Ditto.
1909
1910 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1911
1912         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
1913         assemblies in one run.
1914
1915         * aot-compiler.c (mono_compile_assembly): Only print out a count of
1916         skipped methods if it is not 0.
1917
1918         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
1919
1920 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1921
1922         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
1923           MONO_ARCH_HAVE_UNWIND_TABLE.
1924
1925         Contributed under MIT/X11 license.
1926
1927 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1928
1929         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
1930           from default optimizaton list on Winx64.
1931
1932         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
1933
1934         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
1935           the LMF from the MonoJitTlsData structure.
1936
1937         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
1938
1939         Contributed under MIT/X11 license.
1940
1941 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1942
1943         * mini.c (sigsegv_signal_handler): Fix the build.
1944
1945         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
1946         assembly->aot_module.
1947
1948         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
1949         hash table. This simplifies and speeds up a lot of code, and fixes support
1950         for .netmodules.
1951
1952         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
1953         with the runtime.
1954
1955         * mini-exceptions.c: Ditto.
1956         
1957         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
1958         'native_offset' argument, since these are computed in the 
1959         mono_find_jit_info () function.
1960
1961         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
1962         is used by exceptions-ppc.c.
1963
1964         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
1965         mono_arch_find_jit_info ().
1966         
1967         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
1968         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
1969         generic code in mini-exceptions.c.
1970
1971 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
1972
1973         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
1974
1975         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
1976         
1977         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
1978         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
1979         called while holding the loader lock. Fixes #415608.
1980         (mono_aot_get_method_from_token_inner): Ditto.
1981
1982 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1983
1984         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
1985         to reduce differences between this and the generic implementation in
1986         mini-exceptions.c.
1987         (ves_icall_get_frame_info): Ditto.
1988
1989         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
1990
1991         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
1992         longer neccesarry.
1993
1994         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
1995         mono_arch_get_call_filter () and make it non-static, for consistency with the
1996         other architectures.
1997
1998 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
1999
2000         * mini.c:
2001         * local-propagation.c:
2002         * mini-x86.c: Correct the name of arch defines.
2003
2004 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
2005
2006         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
2007         NO_EMULATE_LONG_SHIFT_OPS define.
2008
2009 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
2010
2011         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
2012         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
2013
2014         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
2015         MACH fixes. Merged from the 2.0 branch.
2016
2017         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
2018
2019         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
2020         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
2021
2022         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
2023
2024         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
2025         mono_marshal_get_native_wrapper () signature changes.
2026
2027 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
2028
2029         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
2030         conversion bug under arm.
2031
2032 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
2033
2034         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
2035
2036         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
2037         with overflow checking.
2038
2039 2008-08-05  Marek Habersack  <mhabersack@novell.com>
2040
2041         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
2042         to the genmdesc.pl file
2043
2044 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
2045
2046         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
2047         arg_array in the soft-float versions of the LOAD/STORE macros.
2048
2049         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
2050         implementation.
2051
2052         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
2053
2054 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2055
2056         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
2057         a float HFA. Fixes #413621.
2058
2059 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
2060
2061         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
2062         frame_size to args_size. Fixes build.
2063
2064 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2065
2066         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
2067         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
2068
2069         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
2070         the stack are not unaligned. Fixes #413247.
2071         
2072 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
2073
2074         * mini.c: update jitted methods performance counters.
2075
2076 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
2077
2078         * mini-exceptions.c: increase the exceptions thrown performance
2079         counter in mono_handle_exception ().
2080
2081 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
2082
2083         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
2084         can work with netmodules.
2085
2086 2008-07-28  Geoff Norton  <gnorton@novell.com>
2087
2088         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
2089         regression tests.
2090
2091 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2092
2093         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
2094         correct place.
2095
2096 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
2097
2098         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2099           The float param registers and other param registers must be the 
2100           same index on Windows x64.
2101
2102         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
2103           ArgValuetypeAddrInIReg argument case.  Setting the argument
2104           op to OP_VTARG_ADDR (OP_REGOFFSET)).
2105
2106         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
2107           variable computed above as the copy length for arguments of storage
2108           type ArgValuetypeAddrInIReg.
2109
2110         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
2111           ArgValuetypeAddrInIReg argument case.  This case will rely on
2112           mono_arch_emit_outarg_vt to emit the correct code later in the process.
2113
2114         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
2115           a 32 byte stack allocation for all calls.  We will omit the adjustment for
2116           jump and tail call instructoins as they do not follow the typical call behavior.
2117
2118         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
2119           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2120           local variable and pass the local variable by reference to the called method.
2121
2122         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
2123           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
2124           of a struct is passed in a register it must be saved with the other
2125           volatile argument on the stack.
2126
2127         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
2128           frame pointer the stack adjustment value must be saved to the unwind 
2129           info structure.
2130
2131         Contributed under MIT/X11 license.
2132
2133 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2134
2135         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
2136         which got lost in the merge.
2137
2138 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2139
2140         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
2141         build.
2142
2143         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
2144         
2145         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
2146         icalls, since they won't be patched.
2147
2148         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
2149         different code sequence when running under valgrind to prevent some valgrind
2150         errors.
2151
2152         * iltests.il.in: Add new regression test.
2153
2154         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
2155         end with a throw.
2156
2157         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
2158         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
2159
2160         * iltests.il.in: Add new test.
2161
2162         * aot-compiler.c: Fix some warnings.
2163
2164         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
2165         Fixes #412494.
2166
2167 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2168
2169         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
2170         (mini_usage_jitdeveloper): Add a missing --wapi option.
2171
2172 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2173
2174         * mini-codegen.c: Simplify the is_fp macros.
2175         (free_up_ireg): Remove, use free_up_reg instead.
2176         (free_up_reg): Fix the fp case.
2177
2178 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2179
2180         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
2181         lowered earlier.
2182
2183         * exceptions-x86.c: Merge some changes which seemed to have got lost
2184         in the linear-ir merge.
2185
2186         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
2187
2188         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
2189         long vreg volatile even if the variable was already created.
2190
2191         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
2192         volatile variables.
2193
2194 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2195
2196         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
2197
2198         * mini.c (mono_jit_compile_method_inner): Add support for 
2199         MONO_EXCEPTION_BAD_IMAGE.
2200
2201         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
2202         mini_method_get_context () returns NULL. Fixes #356531.
2203
2204         * mini.c (mono_method_to_ir): Ditto.
2205         
2206         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
2207         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
2208
2209 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2210
2211         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
2212         in the LDFTN implementation.
2213
2214 2008-07-25  Mark Probst  <mark.probst@gmail.com>
2215
2216         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
2217         code, patch calls to icalls, too, even if they're not in the
2218         shared generic code hash.  Fixes #411962.
2219
2220 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2221
2222         * cpu-x86.md: Increase the length of the fcall opcodes.
2223
2224         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
2225         calls returning floats.
2226
2227         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
2228         on NEWARR.
2229         
2230         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
2231         missed earlier.
2232
2233         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
2234         into the domain->method_code_hash.
2235
2236         * aot-compiler.c: Fix win32 build.
2237
2238         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
2239         
2240         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
2241         gshared NEWARR implementation.
2242
2243         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
2244
2245         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
2246         can be used outside of method_to_ir.
2247
2248         * mini.h (MonoCompile): Add arg_types field.
2249
2250         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
2251         
2252         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
2253         the values of the local arg_array and param_types array.
2254
2255 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2256
2257         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
2258         got accesses might only get generated later when NEWOBJ is decomposed.
2259         
2260         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
2261         looking up the native code of the target method when a delegate is called
2262         for the first time.
2263
2264         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
2265         optimization.
2266
2267         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
2268
2269         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
2270         AOT work on platforms without a working dlsym implementation.
2271
2272         * mini.h: Bump AOT image format version.
2273         
2274 2008-07-24  Mark Probst  <mark.probst@gmail.com>
2275
2276         * mini-exceptions.c: Free a MonoType with
2277         mono_metadata_free_type() instead of g_free().
2278
2279         * aot-runtime.c: Free a MonoType.
2280
2281 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2282
2283         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
2284         optimization.
2285
2286         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
2287         fp stack on x86.
2288
2289 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
2290         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
2291         profiler hook.
2292
2293 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2294
2295         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
2296         NEWOBJ calls on valuetypes.
2297
2298         * iltests.il.in: Add new test.
2299
2300         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
2301
2302 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2303
2304         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
2305         is no longer needed.
2306
2307         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
2308         non register sized integer arguments.
2309         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
2310         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
2311         emit_memcpy2 ().
2312
2313         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
2314         CEE_MONO_RETOBJ.
2315         
2316         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
2317         two a binop with different sized arguments is emitted.
2318
2319         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
2320         instruction in the ins==NULL case.
2321
2322 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2323
2324         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
2325
2326         * mini-x86.c: Fix osx build.
2327
2328         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
2329         opcodes as well.
2330
2331         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
2332         instruction for non int sized variables.
2333
2334         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
2335         implementation.
2336
2337 2008-07-23  Robert Jordan  <robertj@gmx.net>
2338
2339         * method-to-ir.c: Fix MSVC build.
2340
2341 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2342
2343         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
2344         a non int sized type, widen it to an int since newer versions of gcc seem to
2345         generate code which needs this.
2346
2347         * ssa2.c abcremoval2.c: Fix warnings.
2348
2349         * *: Merge the Linear IR branch.
2350
2351         The original branch is at trunk/branches/vargaz/mini-linear-il, and
2352         the ChangeLog file there describes all the changes done over the years. 
2353         Further documentation can be found at www.mono-project.com/Linear_IL.
2354
2355 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2356
2357         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2358           The float param registers and other param registers must be the 
2359           same index on Windows x64.
2360
2361         Contributed under MIT/X11 license.
2362
2363 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
2364
2365         * mini.c: Make the previous fix GC safe.
2366
2367 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
2368
2369         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
2370
2371 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2372
2373         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
2374           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
2375           ArgValuetypeAddrInIReg instead.
2376
2377         Contributed under MIT/X11 license.
2378
2379 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
2380
2381         * mini-codegen.c (get_register_spilling): Fix a warning.
2382
2383 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
2384
2385         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
2386         for types which the initialization fails. Raises the provided exception
2387         at the right stop after cleanup.
2388
2389 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
2390
2391         * aot-compiler.c: Free most of the memory allocated during compilation.
2392
2393         * mini.c (mini_parse_debug_options): Fix a leak.
2394         
2395         * mini.c (mini_method_compile): Don't add the method to the jit info tables
2396         during aot compilation.
2397
2398 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
2399
2400         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
2401         it has too much register pressure.
2402
2403 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
2404
2405         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
2406
2407 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
2408
2409         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2410         on x86.
2411
2412         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2413         on amd64 similar to the way it is done on arm.
2414
2415         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2416
2417         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
2418         consistency, normalize error messages, avoid loading aot-only modules in
2419         normal mode.
2420
2421         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
2422         for consistency.
2423
2424         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
2425
2426 2008-07-11  Martin Baulig  <martin@ximian.com>
2427
2428         * debug-debugger.h
2429         (MonoDebuggerInfo): Add `interruption_request'.
2430
2431 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
2432
2433         * aot-compiler.c (emit_plt): Remove some dead code.
2434
2435         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
2436
2437         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
2438         return the plt info offset belonging to a given plt entry.
2439
2440         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
2441         mono_aot_get_plt_info_offset.
2442         
2443         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
2444         similar to the amd64 code by makeing jumps through a separate jump table 
2445         instead of embedding the jump addresses into the code.
2446
2447 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
2448
2449         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
2450         method.
2451
2452 2008-07-10  Martin Baulig  <martin@ximian.com>
2453
2454         * mini.c (mini_method_compile): Disable generics sharing when
2455         running in the debugger.
2456
2457 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
2458
2459         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
2460
2461         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
2462         the local register allocator from running out of registers on x86 when 
2463         using aot.
2464
2465 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
2466
2467         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
2468         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
2469         C4146.
2470
2471         Contributed under MIT/X11 license.
2472
2473 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
2474
2475         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
2476         speed up the assembler.
2477
2478 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
2479
2480         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
2481         support.
2482
2483         * mini.c: Move the soft float handling macros a bit earlier, add 
2484         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
2485         place.
2486
2487         * mini.h: Add prototype for mono_arch_fixup_jinfo.
2488
2489         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
2490         read-only to help catch code allocation requests.
2491         
2492         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
2493         and turn it off when using --aot-only or when compiling with --aot=full.
2494
2495         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
2496         jump table for switches from the normal domain mempool, not the code
2497         manager.
2498
2499         * mini-trampolines.c (get_unbox_trampoline): New function to return an
2500         unbox trampoline which handles aot-only mode too.
2501
2502         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
2503         an AOTed unbox trampoline.
2504
2505         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
2506
2507 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
2508
2509         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
2510         ""
2511
2512         Contributed under MIT/X11 license.
2513
2514 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
2515
2516         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
2517           the unwind information for the method at the end of the allocated block.
2518           
2519         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
2520           MonoCompileArch to hold the unwind info for SEH on Winx64
2521         
2522         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
2523           frame pointer info for the method being compiled.
2524           
2525         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
2526           the call to mono_exception_from_token.
2527           
2528         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
2529           storing the method prolog information in a format that the Winx64 SEH can understand.  This
2530           information is stored a the end of the method block because it is all 32-bit offset based.
2531
2532         Contributed under MIT/X11 license.
2533
2534 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
2535
2536         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
2537
2538         * wapihandles.c: Fix warnings.
2539
2540         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
2541         mode.
2542
2543         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
2544         mono_jit_compile_method in aot-only mode since that calls the type 
2545         initializer.
2546         
2547         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
2548         get_delegate_invoke_impl in aot-only mode.
2549
2550         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
2551
2552 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
2553
2554         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
2555
2556         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
2557         is on by default.
2558
2559         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
2560
2561         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
2562         init trampoline from the AOT file as well.
2563
2564         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
2565         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
2566         code.
2567
2568         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
2569         mono_init.
2570
2571         * exceptions-amd64.c: Add _full variants for the remaining exception code
2572         creation functions as well, allow emission of relocatable code, remove
2573         caching since that is now done by the caller.
2574
2575         * mini-exceptions.c: Add _full variants for the remaining exception code
2576         creation functions as well, add aot-only support.
2577
2578         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
2579         if we can determine a proper token for them.
2580         (add_wrappers): Add a few more wrappers.
2581         (emit_method_code): Remove some dead code.
2582         (emit_trampolines): Emit exception code too.
2583
2584         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
2585
2586         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
2587         mono_array_new_va which avoids varargs.
2588
2589         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
2590
2591         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
2592         mono_arch_create_specific_trampoline () in all places.
2593
2594         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
2595         a bit so it can be used for other things as well.
2596         
2597         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
2598         on demand as well.
2599
2600         * exceptions-amd64.c: Rename the caching from the exception code creation
2601         functions, it is done by the caller instead.
2602         
2603         * exceptions-amd64.c: Change the signature of the exception code creation 
2604         functions to allow the creation of relocatable code later.
2605
2606         * mini-exceptions.c: Add a set of functions to query the various 
2607         runtime-generated exception functions.
2608
2609         * mini.c mini-exceptions.c: Use the newly added functions instead of the
2610         mono_arch_.. () functions.
2611         
2612 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
2613
2614         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
2615
2616         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
2617
2618         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
2619         (mini_get_vtable_trampoline): Ditto.
2620
2621         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
2622         code in the AOT case by returning the code size and a list of relocations to
2623         the caller.
2624
2625         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
2626
2627 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
2628
2629         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
2630           clean the stack.
2631
2632         Contributed under MIT/X11 license.
2633
2634 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
2635
2636         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
2637         so the buffer size can be computed correctly. Fixes #404735.
2638
2639         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
2640         normally as cfg->debug_info is already freed.
2641
2642 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
2643
2644         * mini-amd64.c: For calls returning vtypes in registers, don't store
2645         the return address on the stack, instead allocate a separate local for
2646         it. Fixes #404729.
2647
2648 2008-07-05  Mark Probst  <mark.probst@gmail.com>
2649
2650         * mini-trampolines.c, mini.h: Add an argument to
2651         mono_create_jit_trampoline_in_domain() for turning off the adding
2652         of the sync wrapper.
2653
2654         * mini.c: Use the JIT trampoline without sync instead of
2655         ldftn_nosync in static RGCTX invoke wrappers so that the call can
2656         be patched.
2657
2658 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2659
2660         * driver.c: Turn on GSHARED optimization by default.
2661
2662 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
2663
2664         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
2665         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
2666
2667         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
2668         create a variant of the generic trampoline code callable from AOTed trampolines.
2669
2670         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
2671         trampoline code callable from AOTed trampolines.
2672
2673         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
2674
2675 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2676
2677         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
2678         pass-through manner.
2679
2680         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
2681         and don't fail sharing for them anymore.
2682
2683         * mini-exceptions.c: Handle exceptions in shared generic methods.
2684
2685         * generic-sharing.c: When checking the context of a generic
2686         method, also check its class's context.  Don't treat wrappers as
2687         sharable.
2688
2689         * mini-trampolines.c: Some code factored out to
2690         metadata/generic-sharing.c.  Handle the MRGCTX case.
2691
2692         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
2693         we must deal with the method being of another instantiation of the
2694         class.  Add static rgctx invoke wrappers to generic methods.
2695
2696 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2697
2698         * mini.c: Provide all jit infos of generic shared methods with a
2699         generic jit info.
2700
2701         * mini-exceptions.c: Handle the new situation that a generic info
2702         might be available, but not info about the this/vtable/mrgctx
2703         variable.
2704
2705 2008-07-03  Mark Probst  <mark.probst@gmail.com>
2706
2707         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
2708         generic methods.
2709
2710 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
2711
2712         * dominators.c (check_dominance_frontier): Fix a warning.
2713
2714         * mini.h: Add some missing prototypes.
2715
2716         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
2717
2718         * driver.c (mono_jit_init_version): Correct the comments since the first
2719         argument should be the name of the root domain, not a filename.
2720
2721         * aot-runtime.c (make_writable): Error out if this is called while running
2722         with --aot-only.
2723         (load_aot_module): Ditto.
2724
2725         * aot-compiler.c: Really fix the computation of method indexes.
2726
2727         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
2728         optimizations as this is no longer called frequently.
2729
2730         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
2731         method and the invoke impl code and pass it to the delegate trampoline instead of
2732         just the delegate class.
2733
2734 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
2735
2736         * aot-compiler.c: Fixup the computation of method indexes.
2737         (add_wrappers): Create the base methods of the runtime invoke wrappers using
2738         the method builder infrastructure.
2739
2740         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
2741         has no header.
2742
2743         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
2744         mode, load the method right away instead of creating a trampoline.
2745
2746         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
2747
2748         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
2749         some checks a bit.
2750
2751 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
2752
2753         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
2754         (mono_aot_load_method): Use method_index instead of method->token.
2755
2756         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
2757         can handle icalls etc. properly.
2758
2759         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2760
2761         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
2762
2763         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
2764         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
2765         JIT_ICALL_ADDR patch type.
2766
2767         * patch-info.h: Add JIT_ICALL_ADDR patch type.
2768
2769         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
2770         request flag.
2771         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
2772
2773         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
2774
2775 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
2776
2777         * mini.c: Use domain->jit_code_hash_lock for controlling access to
2778         domain->jit_code_hash.
2779
2780 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
2781
2782         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
2783
2784 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
2785
2786         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
2787         get_this_arg_from_call, let it compute it when needed.
2788
2789         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
2790         gsctx from code only when needed.
2791
2792         * mini-trampolines.c (get_generic_context): Rename this to 
2793         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
2794         it can be called by the arch backends.
2795
2796         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
2797
2798 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
2799
2800         * driver.c (mono_main): Add experimental --aot-only command line option.
2801
2802         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
2803         set.
2804
2805 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
2806
2807         * driver.c (DllMain): Remove mono_module_handle.
2808
2809         Contributed under MIT/X11 license.
2810
2811 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
2812
2813         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
2814         for emitting methods which are not in the source assembly. Detect and report
2815         failure of assembling+linking.
2816         
2817         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
2818
2819         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
2820
2821 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
2822
2823         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
2824
2825 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
2826
2827         * mini.h: Remove some obsolete prototypes.
2828
2829         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
2830
2831 2008-06-24  Mark Probst  <mark.probst@gmail.com>
2832
2833         * mini.c (get_object_generic_inst): Variable-sized arrays are not
2834         supported by Visual Studio, so use alloca().
2835
2836 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
2837
2838         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
2839         Fixes #402585.
2840
2841 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2842
2843         * mini.c: Fail sharing of a generic method if it contains an open
2844         catch clause (because we don't pass MRGCTXs yet).
2845
2846 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2847
2848         * mini.c: When compiling a method with generic sharing, insert the
2849         method instantiated with an all-Object generic context into the
2850         jit info table, instead of the context of the first instantiation
2851         of the method we happen to compile.
2852
2853 2008-06-18  Martin Baulig  <martin@ximian.com>
2854
2855         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
2856         `major_version' and `minor_version'.
2857
2858 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2859
2860         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
2861         mono_method_is_generic_sharable_impl() takes an additional
2862         argument specifying whether to treat type variables as reference
2863         types.
2864
2865 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2866
2867         * mini.h: Removed obsolete prototypes.
2868
2869 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2870
2871         * mini.c: Don't fail generic sharing for initobj and sizeof - we
2872         already handle them.
2873
2874 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2875
2876         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
2877         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
2878         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
2879         tramp-x86.c: Added a MonoGenericContext* argument to
2880         mono_arch_get_unbox_trampoline() so that it can call other
2881         functions which require it.
2882
2883 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2884
2885         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
2886         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
2887         mono_arch_get_this_arg_from_call() takes a
2888         MonoGenericSharingContext* as well.
2889
2890 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2891
2892         * mini.c: Factor out code for emitting unbox into emit_unbox() and
2893         implement generic sharing of unbox.
2894
2895 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2896
2897         * mini.c: Don't compute the vtable to determine whether a field is
2898         special static, because it might not work for open types.
2899
2900 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2901
2902         * mini.c: Removed the unused token_type and token_source arguments
2903         from get_runtime_generic_context_ptr().
2904
2905 2008-06-17  Marek Habersack  <mhabersack@novell.com>
2906
2907         * mini.c (ADD_BINOP): fix the build
2908
2909 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
2910
2911         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
2912         a widening op.
2913
2914 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2915
2916         * mini.h: Removed class relations enum that's not used anymore.
2917
2918 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2919
2920         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
2921
2922         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
2923         the lazy fetch trampoline access code.
2924
2925 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
2926
2927         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
2928
2929 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
2930
2931         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
2932
2933         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
2934
2935         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
2936
2937 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2938
2939         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
2940         intrinsics.
2941
2942         * mini-ops.h: Add MIN/MAX_UN opcodes.
2943
2944         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
2945         intrinsics.
2946
2947         * basic-math.cs: Add more min/max tests.
2948
2949         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2950
2951 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2952
2953         * mini.c: Small fix in the prologue of emit_castclass.
2954
2955 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2956
2957         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2958
2959         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
2960         do not work even for unsigned types. Fixes #400014.
2961
2962         * basic-math.cs: Add regression tests for unsigned Min/Max.
2963
2964 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2965
2966         * mini.c: Added additional context_used argument to several
2967         functions, which will be needed for sharing generic methods.  Use
2968         GET_RGCTX macro wherever appropriate.  Declare only one
2969         context_used in mono_method_to_ir().
2970
2971 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2972
2973         * mini.c, generic-sharing.c: Removed generic class relations.
2974
2975         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
2976         functions due to MRGCTX changes.
2977
2978 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2979
2980         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
2981         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
2982         with calculated IMT.
2983
2984         * mini.c: Generic sharing of calls via generic interfaces.
2985
2986         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
2987         generic method with non-constant MonoGenericContext*.  Instead,
2988         the context is taken out of the method itself.
2989
2990 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2991
2992         * mini.c: Generic sharing of ldvirtftn.
2993
2994 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2995
2996         * mini.c: Generic sharing of ldftn.
2997
2998 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2999
3000         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
3001
3002 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3003
3004         * mini.c: Generic sharing of the special case of ldtoken followed
3005         by a call to GetTypeFromHandle.
3006
3007 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3008
3009         * mini.c: Generic sharing of box for nullable types.
3010
3011 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3012
3013         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
3014         are passed on the stack. Fixes #324807.
3015
3016 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
3017
3018         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
3019         for the ArgValuetypeAddrInIReg case.
3020
3021         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
3022         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
3023
3024         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
3025         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
3026         local variable and pass the local variable by reference to the called method.
3027           
3028         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
3029         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
3030
3031         Contributed under MIT/X11 license.
3032
3033 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
3034
3035         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
3036
3037         * debug-mini.c (mono_debug_print_vars): Release memory after printing
3038         everything.
3039
3040 2008-06-10  Martin Baulig  <martin@ximian.com>
3041
3042         * debug-mini.c
3043         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
3044
3045 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
3046
3047         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
3048         possible error when no arguments are passed.
3049
3050         Contributed under MIT/X11 license.
3051
3052 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
3053
3054         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
3055         where the file name is NULL.
3056
3057 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
3058
3059         * mini.c: Fix s390 build.
3060
3061 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
3062
3063         * trace.c (mono_trace_parse_options): Fix warnings.
3064
3065         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
3066
3067 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
3068
3069         * mini.c (remove_block_if_useless): Avoid printing the method name.
3070         
3071         * mini.c: Remove needless setting of ins->cil_code which is now done by 
3072         MONO_INST_NEW.
3073
3074         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
3075         LMF. Not yet used.
3076
3077         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
3078         translated code after it has been patched.
3079
3080 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
3081
3082         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
3083         avoid problems during code patching on SMP systems.
3084         (emit_call): Avoid adding a patch info which is already added by 
3085         emit_call_body.
3086         (mono_arch_emit_exceptions): Ditto.
3087
3088 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
3089
3090         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
3091         MONO_TYPE_ISSTRUCT already checks for it.
3092
3093 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
3094
3095         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
3096           structs with floats on Winx64 the float registers are not used.  
3097           The integer registers are always used..
3098         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
3099           only one register will be used and only if the size of the struct 
3100           is 1,2,4, or 8 bytes.
3101
3102         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
3103           to work for Winx64.
3104
3105         Contributed under MIT/X11 license.
3106
3107 2008-06-05  Martin Baulig  <martin@ximian.com>
3108
3109         * debug-debugger.c (debugger_lookup_class): Also call
3110         mono_class_setup_methods() here; we're only called from RTI.
3111
3112 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
3113
3114         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
3115         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
3116         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
3117         Post-process object files and add dtrace-generated object, if necessary.
3118
3119         Contributed under MIT/X11 license.
3120
3121 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3122
3123         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
3124         element class.
3125
3126         * mini.c: Generic sharing for unbox.any and castclass.
3127
3128 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3129
3130         * mini.c: Ignore tailcall prefix in shared generic code and when
3131         doing calls which require a vtable/rgctx argument.
3132
3133 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3134
3135         * mini.c: Don't free the JIT info.
3136
3137         * driver.c: Changes in the JIT info table testing code.
3138
3139 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
3140
3141         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
3142         interruption. Fix some warnings.
3143
3144         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
3145         interruption_checkpoint.
3146
3147 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
3148
3149         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
3150         from embedding applications.
3151
3152 2008-06-02  William Holmes  <billholmes54@gmail.com>
3153
3154         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
3155           reserving 32 bytes on the stack when making calls. 
3156
3157         Contributed under MIT/X11 license.
3158
3159 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
3160
3161         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
3162         the linear IL branch.
3163
3164         * driver.c: Print out more information for --version on arm.
3165
3166 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
3167
3168         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
3169         bb_exit instead, since out of line bblocks might not actually be emitted
3170         out-of-line.
3171         
3172         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
3173         maximum epilog size for out of line bblocks if tracing is enabled.
3174
3175         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
3176
3177 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
3178
3179         * arrays.cs: Regression tests for allocating arrays with negative sizes.
3180
3181 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
3182
3183         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
3184         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
3185         opcodes.
3186
3187 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
3188
3189         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
3190         the 'value' to store is a constant.
3191
3192         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
3193
3194         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
3195         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
3196
3197 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
3198
3199         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
3200         for accessing method->generic_container.
3201
3202 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
3203
3204         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
3205         
3206         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
3207
3208         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
3209
3210         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
3211         fails.
3212
3213 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
3214
3215         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
3216
3217         * mini.c: Handle the case when mono_class_vtable () fails.
3218
3219 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
3220         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
3221         the stat profiler.
3222
3223 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3224
3225         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
3226         together with domain sharing.
3227
3228 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3229
3230         * mini.c: Treat callvirts to final methods like non-virtual calls
3231         when doing generic sharing, i.e. look them up in the runtime
3232         generic context.
3233
3234 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3235
3236         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
3237         with computed types (for generic sharing).
3238
3239         * mini.c: Generic sharing for mkrefany and refanyval.
3240
3241 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
3242
3243         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
3244         possible.
3245
3246         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
3247         the generic sharing code.
3248         
3249         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
3250         when needed.
3251
3252 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3253
3254         * mini.h: Remove the declaration of mono_aot_init_vtable ().
3255
3256 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
3257
3258         * driver.c: updated copyright date
3259
3260 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3261
3262         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
3263         needed.
3264
3265 2008-05-19  Martin Baulig  <martin@ximian.com>
3266
3267         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
3268         pointing to the new `_mono_debug_using_mono_debugger' variable.
3269
3270         * driver.c
3271         (mono_main): Check mono_debug_using_mono_debugger() rather than
3272         the `MONO_INSIDE_MDB' environment variable to check whether we're
3273         inside the debugger.
3274
3275 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
3276
3277         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
3278         argument.
3279
3280 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
3281
3282         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
3283
3284         * mini.c: Added mini_assembly_can_skip_verification. This
3285         function checks if the assembly requested to skip verification. 
3286         Fixes part of #387274.
3287
3288 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
3289
3290         * mini.c (mini_get_method): Disable the check for open generic classes when
3291         using generic sharing.
3292
3293         * generics.cs: Add a test for #387034.
3294
3295         * mini.c (mini_get_method): Check whenever the method class is an open generic
3296         type, and return NULL in that case, causing a verification error. Fixes
3297         #384123.
3298
3299 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3300
3301         * driver.c (mono_main): Revert r102623. The right
3302         thing to do is to enable the verifier under verifiable
3303         unless a --security flag was passed.
3304
3305         We need this non-trivial behavior for --verify-all otherwise
3306         mcs-compileall won't be able to use it. As it needs everything to
3307         be verified under validil.
3308
3309 2008-05-06  Martin Baulig  <martin@ximian.com>
3310
3311         Fix #383749.
3312
3313         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
3314         (mono_debugger_thread_cleanup): Likewise.
3315         (mono_debugger_extended_notification): Likewise.
3316
3317 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3318
3319         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
3320         against both inflated and non-inflated methods. We need to check against the
3321         generic definition for cases where the instantiated method is not visible.
3322         We need to check against the inflated types for cases where the instantiation
3323         changes any super type. This fixes #382986.
3324
3325         Note that this doesn't need to be applied to other parts of mono_method_to_ir
3326         that check for visibiliy as generic params only appears as the type subject
3327         of tokens on call opcodes. Field manipulation and ldftn must always
3328         target an exact type.
3329
3330 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3331
3332         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
3333         if no related --security flag is passed.
3334
3335 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3336
3337         * mini-arch.h: Prepare support for ppc64.
3338
3339         Contributed under MIT/X11 license.
3340
3341 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3342
3343         * aot-runtime.c: Prepare support for ppc64.
3344
3345         Contributed under MIT/X11 license.
3346
3347 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3348
3349         * mini-ops.h: Prepare support for ppc64.
3350
3351         Contributed under MIT/X11 license.
3352
3353 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
3354
3355         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
3356
3357         Contributed under MIT/X11 license.
3358
3359 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
3360
3361         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
3362         assemblies, since aot_name is not a full path, causing us to load MS.NET 
3363         assemblies on windows.
3364
3365 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
3366
3367         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
3368         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
3369         * main.c: Use UTF-8 encoded command line instead of Windows default code
3370         page on Windows to support Unicode.
3371         * driver.c (DllMain): New function for mixed-mode assembly support.
3372         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
3373         export __stdcall functions without decoration.
3374
3375         Contributed under MIT/X11 license.
3376
3377 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3378
3379         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
3380         saving it very early.
3381
3382 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3383
3384         * mini.h, mini.c: Lots of code for accessing the old RGCTX
3385         deleted.  The only way to access the new RGCTX is via the
3386         trampline.
3387
3388         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
3389         vtable instead of the RGCTX to static methods.
3390
3391         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
3392         accessing the new RGCTX.
3393
3394         * generic-sharing.c: There is no separation between self, type
3395         arguments and other types in the RGCTX anymore.
3396
3397 2008-04-25  Jonathan Chambers <joncham@gmail.com>
3398
3399         * mini-amd64.c (add_general): Remove previous stack adjustment.
3400         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
3401         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
3402         for 32 bytes of stack space reserved for all calls.
3403         
3404         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
3405         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
3406         adjustment.
3407         
3408         Code contributed under MIT/X11 license.
3409
3410 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
3411
3412         * mini.c (mini_method_verify): Only verify non-inflated methods, check
3413         against the root definition, peeling out method and type instantiations.
3414         Cache verify success results, code that fails verification is still
3415         checked multiple times.
3416
3417 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
3418
3419         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
3420
3421 2008-04-23  Jonathan Chambers <joncham@gmail.com>
3422
3423         * mini-amd64.c (add_general): Always increment stack on Win64.
3424         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
3425         on Win64.
3426         
3427         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
3428         stack based argument handling on Win64.
3429         
3430         Code contributed under MIT/X11 license.
3431
3432 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
3433
3434         * Makefile.am (version.h): Add support for git-svn.
3435
3436 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
3437
3438         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
3439         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
3440         avoiding allocations and libc functions which might deadlock.
3441         
3442         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
3443         'no-gdb-backtrace' option is set.
3444
3445         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
3446
3447         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
3448
3449 2008-04-21  Martin Baulig  <martin@ximian.com>
3450
3451         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
3452         and `get_lmf_addr'; `notification_address' is no longer a pointer.
3453
3454 2008-04-21  Martin Baulig  <martin@ximian.com>
3455
3456         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
3457         `thread_vtable', `event_handler_ptr' and `event_handler'.
3458
3459 2008-04-21  Martin Baulig  <martin@ximian.com>
3460
3461         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
3462         allows delayed initialization of the `executable_code_buffer' when
3463         attaching.
3464
3465 2008-04-21  Martin Baulig  <martin@ximian.com>
3466
3467         * mini.h (mono_debugger_create_notification_function): Removed.
3468         * tramp-*.c (mono_debugger_create_notification_function): Removed.
3469
3470         * mdb-debug-info64.s
3471         (MONO_DEBUGGER__notification_function): Added this in the .text section.
3472
3473         * mdb-debug-info32.s
3474         (MONO_DEBUGGER__notification_function): Added this in the .text section.
3475
3476         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
3477         currently only works on x86 and x86_64, so don't create it on ppc.
3478
3479 2008-04-21  Martin Baulig  <martin@ximian.com>
3480
3481         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
3482
3483         * mini.c
3484         (mini_method_compile): In the fp elimination check, check
3485         `debug_options.mdb_optimizations' in addition to
3486         mono_debug_using_mono_debugger().       
3487
3488         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
3489         disable some JIT optimizations which are only disabled when
3490         running inside the debugger.
3491         Added `--help-debug' option to describe the debugging options.
3492         (parse_debug_options): New static function to parse the `--debug'
3493         options, so we can easily add more stuff in future.
3494
3495 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
3496
3497         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
3498         the method has no body.
3499
3500 2008-04-19  Jonathan Chambers <joncham@gmail.com>
3501
3502         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
3503         assembly is not allowed in MSVC 64-bit compiler. 
3504         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
3505         as we get floating point exceptions everywhere.
3506         
3507         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
3508         correctly align arguments for call to throw_exception.
3509         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
3510         
3511         Code contributed under MIT/X11 license.
3512
3513 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
3514
3515         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
3516
3517 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
3518
3519         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
3520
3521         * mini-amd64.c (NEW_INS): Set cil_code.
3522
3523         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
3524         from mini-amd64.c so all debugger related logic is in one place.
3525
3526         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
3527         later won't have a random ip assigned to them.
3528
3529 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
3530
3531         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
3532         the arch specific function initializes code_size.
3533         (mono_create_delegate_trampoline): Ditto.
3534
3535         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
3536         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
3537         platforms.
3538
3539         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
3540         running under the debugger.
3541
3542         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
3543         debugger.
3544
3545         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
3546         debugger. Also move the disabling of optimizations here from driver.c.
3547         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
3548         debugger.
3549
3550         * mini.h (MonoCompile): Add a few new flags.
3551
3552 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
3553
3554         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
3555         so the cil_code field of created MonoInst's is properly set.
3556         (mini_select_instructions): Ditto.
3557
3558         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
3559         (MONO_INST_NEW_CALL): Ditto.
3560
3561         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
3562         in many places so the ins->cil_code field is properly initialized.
3563
3564         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
3565         place.
3566
3567 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
3568
3569         * mini.c (mini_method_compile): Print a different message when compiling a 
3570         shared method.
3571         
3572         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
3573         > 1.
3574
3575 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3576
3577         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
3578         SSE2 instructions.
3579
3580         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
3581         
3582 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3583
3584         * mini.c (handle_stack_args): Make this return void since its return value was
3585         never used. Also set cfg->unverifiable for invalid IL instead of calling
3586         G_BREAKPOINT ().
3587
3588 2008-04-10  Mark Probst  <mark.probst@gmail.com>
3589
3590         * mini.c: Make sure "this" is live in catch clauses with type
3591         variables in shared generic code.
3592
3593 2008-04-08  Mark Probst  <mark.probst@gmail.com>
3594
3595         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
3596         generic_class_is_reference_type() to ensure the proper behaviour
3597         when sharing generic code and the type in question is a type
3598         argument.
3599
3600 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
3601
3602         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
3603         race conditions when printing thread dumps. Fixes #377738.
3604
3605 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
3606         
3607         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
3608         shows up when both MonoInst arguments can cause aliasig.
3609         There is likely no way in the current JIT to trigger this problem, but
3610         it showed up in the development of generics sharing, when in a new
3611         opcode both args of an OP_GROUP can be aliases (addresses of a local).
3612         When the generics sharing code will be committed, its tests will be
3613         valid also for this bug.
3614
3615 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
3616
3617         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
3618         PATCH_INFO_METHOD.
3619
3620         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
3621         NULL.
3622
3623 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
3624
3625         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
3626         use a more detailed exception message for InvalidCastException.
3627
3628         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
3629
3630         * driver.c (mono_main): Add --debug=casts option to turn on better 
3631         InvalidCastException message details.
3632
3633         * mini.c (mini_get_debug_options): New helper function to return the address of
3634         the debug_options variable.
3635
3636         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
3637         the jit_tls TLS variable.
3638
3639         * mini.c (mono_jit_tls): New TLS variable.
3640
3641         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
3642         option is used.
3643
3644 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
3645
3646         * mini.h: Removed verifer related stuff. This code was moved to verify.c
3647
3648         * mini.c: Removed verifer related stuff, code moved to verify.c.
3649
3650         * driver.c: Using code from verify.c instead of mini.c.
3651
3652 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
3653
3654         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
3655         longer valid.
3656
3657 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
3658
3659         * mini.c (check_for_method_verify): Enabling verification of
3660         corlib if mono_verify_all is set. Bugs in the verifier preventing that
3661         have been fixed.
3662
3663 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
3664
3665         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
3666         caller saved registers as well.
3667         
3668         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
3669         saved registers as well.
3670
3671 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
3672
3673         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
3674
3675         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
3676         code.
3677
3678 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
3679
3680         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
3681         to get_call_info.
3682         (get_call_info): Take a gsctx argument instead of 'cfg'.
3683
3684 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
3685
3686         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
3687         mono_verify_all is set.
3688
3689         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
3690
3691         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
3692
3693 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
3694
3695         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
3696         an exception.
3697
3698         * driver.c mini.c mini.h: Add a --verify-all development option to test the
3699         verifier and the code generated by the compiler.
3700
3701 2008-03-25  Mark Probst  <mark.probst@gmail.com>
3702
3703         * mini.c: Generic sharing of the non-nullable case of the box
3704         instruction.
3705
3706 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
3707
3708         * inssel.brg: Fix the build.
3709
3710         * iltests.il.in: Add a test for lconv.ovf.u8.un.
3711
3712 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
3713
3714         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
3715         Array:Address. Fixes #372410.
3716
3717         * iltests.il.in: New tests for readonly prefix.
3718
3719 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
3720
3721         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
3722         mini-trampolines.c.
3723
3724         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
3725         mini-exceptions.c.
3726
3727         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
3728         
3729         * mini.c (mono_decompose_op_imm): New helper function.
3730
3731         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
3732         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3733         return value.
3734
3735         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3736         mono_arch_output_basic_block. Fix warnings.
3737
3738         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
3739         for now.
3740
3741 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
3742
3743         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
3744         since the extra frame is now detected automatically inside the loop.
3745
3746         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
3747         opts which are now in mono_peephole_ins ().
3748         
3749         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
3750
3751         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
3752         frames and skip duplicate managed-to-native frames. Fixes #367665.
3753
3754         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3755         opts which are now in mono_peephole_ins ().
3756         (mono_arch_peephole_pass_2): Ditto.
3757
3758         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
3759
3760         * mini-codegen.c (mono_peephole_ins): New helper function containing the
3761         arch independent peephole optimizations.
3762
3763         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3764         opts which are now in mono_peephole_ins ().
3765
3766         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
3767         
3768         * mini-s390.c (mono_arch_output_basic_block): Fix build.
3769
3770         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
3771         pattern.
3772
3773         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
3774         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
3775         opcode. 
3776
3777 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
3778
3779         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
3780         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3781         return value.
3782
3783         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3784         mono_arch_output_basic_block. Fix warnings.
3785
3786 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3787
3788         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3789         conv.ovf.u.un.
3790
3791 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3792
3793         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3794         conv.ovf.u.un.
3795
3796         * iltests.il: Add new tests.
3797
3798 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
3799
3800         * mini.c: Removed Windows version macros.
3801
3802 2008-03-20  Mark Probst  <mark.probst@gmail.com>
3803
3804         * generic-sharing.c: Put reflection types in the extensible part
3805         of the runtime generic context.
3806
3807         * mini.c: Generic sharing of the GetTypeHandle special case of the
3808         ldtoken instruction.
3809
3810 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3811
3812         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
3813
3814         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
3815         
3816         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
3817         consistency with the other version on the linear IR branch.
3818
3819         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
3820
3821         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
3822
3823         * iltests.il.in: Add new tests.
3824
3825 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
3826
3827         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
3828
3829         * iltests.il.in: Add new tests.
3830
3831 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3832
3833         * mini.c: Two variables with the same name were declared in
3834         nesting contexts and one wasn't initialized.  Fixed.
3835
3836 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3837
3838         * mini.c: Generic sharing of the initobj instruction.
3839
3840 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
3841
3842         * mini.c: make the test to optimize ldtoken from typeof() more
3843         precise.
3844
3845 2008-03-18  Mark Probst  <mark.probst@gmail.com>
3846
3847         * mini.c: Generic sharing of the initobj instruction for reference
3848         types.
3849
3850 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
3851
3852         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
3853         the mono_breakpoint_clean_code() code to perform bound checks.
3854
3855 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
3856
3857         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
3858         mono_arch_patch_callsite() to include the start of the managed method
3859         to be able to perform bound checks.
3860
3861 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3862
3863         * mini.c: Generic sharing for the isinst instruction.
3864
3865 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3866
3867         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3868         inssel-long32-mips.brg: Added opcodes for doing indirect calls
3869         with the runtime generic context argument.
3870
3871         * mini.c: Share calls to several types of unsharable methods by
3872         putting the address of the method code in the runtime generic
3873         context and doing an indirect call.
3874
3875         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3876         to switches.
3877
3878 2008-03-16  Mark Probst  <mark.probst@gmail.com>
3879
3880         * generic-sharing.c: Change due to a change in the runtime genric
3881         context API.
3882
3883 2008-03-15  Martin Baulig  <martin@ximian.com>
3884
3885         * tramp-x86.c
3886         (mono_arch_nullify_class_init_trampoline): Add call to
3887         mono_breakpoint_clean_code() to make things work when running
3888         inside the debugger.
3889
3890         * tramp-amd64.c
3891         (mono_arch_nullify_class_init_trampoline): Add call to
3892         mono_breakpoint_clean_code() to make things work when running
3893         inside the debugger.
3894
3895 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3896
3897         * inssel-long.brg (reg): Fix 64 bit build.
3898
3899 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3900
3901         * mini.c, mini.h: Share static generic code by passing it an
3902         implicit argument pointing to the runtime generic context.
3903
3904         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3905         inssel-long32-mips.brg: New opcodes for calling shared static,
3906         which need to be passed the runtime generic context.
3907
3908         * mini-amd64.c, mini-x86.c: Save the runtime generic context
3909         argument on the stack in the prologue if needed.  New function for
3910         finding the runtime generic context argument from the registers
3911         saved by the trampoline.
3912
3913         * mini-amd64.h, mini-x86.h: Specify which register to use for the
3914         runtime generic context argument.
3915
3916         * tramp-amd64.c: Also restore the register used for the runtime
3917         generic context argument.
3918
3919         * mini-trampoline.c: Resolve shared static calls by consulting the
3920         runtime generic context via the new argument.
3921
3922         * generic-sharing.c: Add an argument to sharability-checking
3923         functions that specifies whether type variables should be treated
3924         as sharable type arguments.
3925
3926         * inssel-x86.brg: Removed a superfluous, buggy rule.
3927
3928         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3929         to switches.
3930
3931 2008-03-14  Martin Baulig  <martin@ximian.com>
3932
3933         * debug-debugger.c (main_thread_handler): Call
3934         mono_runtime_run_main() without sending any notifications.
3935
3936         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
3937
3938 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3939
3940         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
3941
3942 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3943
3944         * tramp-x86.c: Fixed register restore offsets in the trampoline
3945         code for ECX and EDX.
3946
3947 2008-03-12  Geoff Norton  <gnorton@novell.com>
3948
3949         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
3950         different ucontext_t implementations.
3951         * exceptions-arm.c: Use the above defines to get exceptions working on 
3952         iPhone (based on a patch by Luke Howard lukeh@padl.com)
3953         * mini-arm.c: Implement iPhone icache support (based on a patch by
3954         Luke Howard lukeh@padl.com)
3955
3956 2008-03-12  Mark Probst  <mark.probst@gmail.com>
3957
3958         * mini.c: Enable generic sharing of calls to non-static
3959         non-interface non-generic non-value-type methods.
3960
3961         * mini-trampolines.c: Resolve calls from shared generic code.
3962
3963 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
3964
3965         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
3966
3967         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
3968
3969 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
3970
3971         * mini.c: some fixes for the AOT compiler.
3972
3973 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3974
3975         * cpu-amd64.md: Add clob:1 to some float opcodes.
3976
3977 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
3978
3979         * mini.h: Added MiniVerifierMode enumeration.
3980
3981         * mini.c: Added mini_verifier_set_mode to control
3982         the usage of the new verifier.
3983
3984         * mini.c (mono_method): Integrated the new verifier.
3985
3986         * driver.c: Extended --security option with validil and
3987         verifiable options to activate the new verifier.
3988
3989 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3990
3991         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
3992         optimization to ctors taking 0 or 2 arguments too.
3993
3994         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
3995         a bit.
3996
3997         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
3998
3999         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
4000
4001 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
4002
4003         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
4004         non-aot case as well.
4005
4006         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
4007
4008         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
4009         changes.
4010
4011         * aot-compiler.c (encode_patch): Ditto.
4012
4013         * mini.h (G_MININT32): Fix the definition of this.
4014
4015 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
4016
4017         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
4018
4019         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
4020
4021 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4022
4023         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
4024         methods returning vtypes in registers.
4025         (mono_arch_allocate_vars): Ditto.
4026
4027         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
4028
4029         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
4030
4031         * generics.cs: Add a test from the linear IR branch.
4032
4033         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
4034
4035         * mini.c (inline_method): Cache failed inline attempts.
4036
4037 2008-03-04  Mark Probst  <mark.probst@gmail.com>
4038
4039         * mini.c: For shared methods of generic classes put the location
4040         of "this" into the MonoGenericJitInfo.
4041
4042         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
4043         register out of a MonoContext by register number.  Add the generic
4044         sharing context as an argument to mono_arch_find_this_argument().
4045
4046         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4047         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
4048         for new arch function.
4049
4050         * mini-exception.c: Handle open exception clauses in shared
4051         generic code.
4052
4053         * mini-trampolines.c: Supply additional argument to
4054         mono_arch_find_this_argument().
4055
4056 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4057
4058         * Makefile.am (regtests): Run the bench.exe tests last.
4059
4060 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
4061
4062         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
4063         a bit.
4064
4065 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
4066
4067         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
4068         with MS.
4069
4070         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
4071         
4072         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
4073
4074         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
4075         whose class has no cctor.
4076
4077         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
4078
4079 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
4080
4081         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
4082         unverified.
4083
4084 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
4085
4086         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
4087         to be in sync with the code on the linear IR branch.
4088
4089         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
4090
4091         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
4092
4093 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
4094
4095         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
4096
4097         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
4098
4099         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
4100
4101         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
4102
4103         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
4104         
4105         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
4106         body.
4107
4108 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
4109
4110         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
4111         OP_LOADR4_MEMBASE emission.
4112
4113         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
4114         (mono_spillvar_offset_float): Ditto.
4115
4116         * mini-mips.c (mono_arch_emit_prolog): Ditto.
4117
4118         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
4119         emission.
4120
4121         * basic-long.cs: Add regression tests for them.
4122
4123         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
4124         use.
4125         (mono_arch_allocate_vars): Fix representation of single-precision float
4126         argument.
4127         (mono_arch_output_basic_block): Ditto.
4128
4129         * inssel-mips.brg: Ditto, remove duplicate items.
4130
4131         * mini-mips.c (emit_load_volatile_arguments): New function to handle
4132         arguments of tail calls as on other platforms.
4133         (mono_arch_output_basic_block): Handle tail calls.
4134
4135         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
4136         register.
4137
4138         * objects.cs (test_5_pass_static_struct): Add test for it.
4139
4140         Contributed under MIT/X11 license.
4141
4142 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
4143
4144         * Makefile.am: Use gmcs for compiling the regression tests.
4145
4146         * *.2.cs *.2.il: Rename to *.cs and *.il.
4147
4148 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
4149
4150         * regalloc.h: Make the vassign array smaller.
4151
4152         * mini.c (mini_method_compile): Remove an unused field in cfg.
4153
4154         * mini-codegen.c: Add a bunch of micro optimizations.
4155
4156 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
4157
4158         * regalloc.h: Remove some unused fields.
4159
4160 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
4161
4162         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
4163
4164         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
4165
4166 2008-02-22  Mark Probst  <mark.probst@gmail.com>
4167
4168         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
4169
4170         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
4171         trampoline: Fetch an entry from the runtime generic context.  If
4172         it's NULL, jump to the actual trampoline to fill the runtime
4173         generic context.  Otherwise, return it.
4174
4175         * mini.c: Call the lazy fetch trampoline to get entries out of the
4176         runtime generic context.
4177
4178         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
4179         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
4180         tramp-sparc.c: Stubs for the lazy fetch trampoline.
4181
4182 2008-02-21  Mark Probst  <mark.probst@gmail.com>
4183
4184         * mini.c: Fetch data out of the extensible part of the runtime
4185         generic context instead of calling a helper function.
4186
4187         * generic-sharing.c: Some functions moved into
4188         metadata/generic-sharing.c.  Helper function for fetching other
4189         types now checks and asserts against extensible rgctx (just for
4190         debugging purposes - the helper function isn't called anymore
4191         unless for debugging).
4192
4193 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
4194
4195         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
4196         for tail calls up to the point that the tests in iltests.exe run. Also add a
4197         dummy CKFINITE implementation.
4198         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
4199         needed for trampoline LMF frames.
4200
4201         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
4202         trampoline LMF frames.
4203
4204 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
4205
4206         * mini.c (inline_method): clean any pending loader error when inlining fail.
4207         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
4208
4209 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
4210
4211         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
4212
4213         * aot-runtime.c (decode_patch_info): Ditto.
4214
4215         * mini.c (mono_resolve_patch_target): Ditto.
4216         
4217         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
4218         icall wrappers.
4219
4220         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
4221         
4222         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
4223         if it references an icall address.
4224
4225 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
4226
4227         * cpu-s390x.md: Remove some more unused opcodes.
4228         
4229         * cpu-s390x.md: Remove some unused opcodes.
4230
4231         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
4232         mono_op_imm_to_op ().
4233
4234         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
4235         instead of a switch statement.
4236         
4237         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
4238         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
4239
4240         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
4241         
4242         * mini-codegen.c: Remove unused mono_regstate2_... functions.
4243
4244         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
4245         -1.
4246
4247 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
4248
4249         * driver.c (mono_main): Improve error reporting when an assembly cannot be
4250         opened. Fixes #362607.
4251
4252         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
4253
4254         * iltests.il.in: Add a test for static methods in interfaces.
4255
4256 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
4257
4258         * genmdesc.c (build_table): Fix a crash on older glib versions.
4259
4260         * cpu-sparc.md: Remove some unused opcodes.
4261         
4262         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
4263         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
4264
4265         * cpu-amd64.md: Remove some unused opcodes.
4266
4267         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
4268         like the other opcodes.
4269
4270 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
4271
4272         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
4273
4274         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
4275
4276         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
4277         variables 'cfg' instead of 'm' for consistency.
4278
4279         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
4280
4281         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
4282         argument holding the vtype return address, to avoid the ambigious use of
4283         cfg->ret for this purpose.
4284
4285         * mini.c (NEW_RETLOADA): Use vret_addr if set.
4286
4287         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
4288         
4289         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
4290         new mono_print_ins () function which only takes one argument.
4291
4292 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
4293
4294         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
4295         macro arguments.
4296
4297 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
4298
4299         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
4300
4301         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
4302
4303         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
4304         opcodes and other small changes.
4305
4306         * mini-ops.h: Add some new opcodes from the linear IR branch.
4307
4308         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
4309
4310         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
4311         opcodes, use the REG_MEMBASE opcodes instead.
4312         
4313         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
4314         opcodes, use the REG_MEMBASE opcodes instead.
4315         
4316         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
4317         linear IR branch.
4318
4319         * mini.c (mono_op_imm_to_op): New helper function.
4320
4321         * mini-ops.h: Add some opcodes from linear IR branch.
4322
4323 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
4324
4325         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
4326         <tsv@solvo.ru>.
4327
4328 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
4329
4330         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
4331         OP_ICONV_TO_R4/R8.
4332
4333         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
4334
4335 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
4336
4337         * aot-compiler.c (emit_method_code): Add an assert.
4338
4339         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
4340         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
4341         methods.
4342
4343 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
4344
4345         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
4346         some load/store opcodes so they are consistent. 
4347         (mono_arch_emit_prolog): Simplify some code.
4348
4349         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
4350
4351         * objects.cs: Add tests for large argument offsets on ARM.
4352
4353         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
4354         stack offsets. Fixes #359651.
4355
4356         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
4357
4358         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
4359
4360         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
4361
4362         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
4363
4364         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
4365
4366         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
4367         rid of CEE_CONV_R_UN.
4368
4369         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
4370
4371 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
4372
4373         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
4374
4375         * mini.c (mono_normalize_opcodes): Add some more opcodes.
4376
4377         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
4378
4379         * cpu-amd64.md: Remove some unused opcodes.
4380
4381         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
4382
4383         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
4384
4385         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
4386         arch specific functions for its parts. Call the peephole pass after local
4387         regalloc so the prolog can compute a more accurate max_offset.
4388         
4389         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
4390         the corresponding OP_I/OP_L opcodes.
4391
4392         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
4393
4394         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
4395
4396 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4397
4398         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
4399         as they are handled in mini.c.
4400
4401         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
4402         
4403         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
4404         case since it is handled in mini.c.
4405
4406         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
4407
4408         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
4409
4410         * *.c: Use the new opcodes in the IR and back end code.
4411
4412         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
4413
4414         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
4415
4416 2008-02-06  Mark Probst  <mark.probst@gmail.com>
4417
4418         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
4419         an assert because it has a race condition.
4420
4421 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4422
4423         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
4424
4425         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
4426
4427         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
4428
4429         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
4430         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
4431
4432 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
4433
4434         * cpu-amd64.md (move): Correct the maximum size of move.
4435
4436 2008-02-05  Mark Probst  <mark.probst@gmail.com>
4437
4438         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
4439         the generic class init trampoline to return quickly if the class
4440         is already inited.
4441
4442 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
4443
4444         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
4445         issues where an 32 bit callsite cannot be patched by a 64 bit address.
4446
4447 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
4448
4449         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
4450         branch.
4451
4452 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
4453
4454         * objects.cs: Add some soft-float tests.
4455
4456         * mini.c: Fix a couple more soft-float issues.
4457
4458         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
4459
4460         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
4461         avoid a REX prefix.
4462
4463 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
4464
4465         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
4466         exception happens while compiling a virtual method.
4467
4468 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
4469
4470         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
4471         
4472         * mini-sparc.c: Fix build.
4473
4474         * mini-sparc.c (get_call_info): Add support for generic sharing.
4475
4476         * mini-exceptions.c: Add a FIXME.
4477
4478 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
4479
4480         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
4481         altstack handling code.
4482
4483         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
4484         
4485         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
4486
4487         * mini-s390.c: Add support for generic sharing.
4488
4489         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
4490         Fix CAS on s390.
4491         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4492
4493         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
4494
4495         * mini-s390x.c: Add support for generic sharing.
4496         
4497         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
4498         Fix CAS on ia64.
4499         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4500
4501         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
4502         can be used since it takes a 16 bit signed immediate.
4503
4504         * inssel-s390x.brg: Fix OP_SETRET.
4505
4506         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
4507
4508         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
4509
4510         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
4511
4512         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
4513
4514         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
4515         in one place.
4516
4517         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
4518         stuff.
4519
4520         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
4521         of the unused mono_arch_patch_delegate_trampoline stuff.
4522
4523 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
4524
4525         * basic-long.cs: Move the fp related tests to basic-float.cs.
4526
4527         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
4528
4529         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
4530
4531         * basic-calls.cs: Add a test for proper float argument passing.
4532
4533         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
4534         if the context corresponds to an exception received through a signal.
4535
4536         * exceptions.cs: Add a test for nullref handling at the start of a try
4537         clause.
4538
4539         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
4540
4541         * jit-icalls.c (mono_break): New JIT icall.
4542
4543         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
4544
4545         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
4546
4547 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
4548
4549         * cpu-*.md: Get rid of unused opcodes.
4550
4551         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
4552
4553         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
4554         by all platforms.
4555
4556         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
4557         define.
4558
4559         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
4560         the arch independent trampoline code in mini-trampolines.c.
4561
4562         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
4563
4564         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
4565
4566         * mini-s390.h: Remove an unused define.
4567         
4568         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
4569         the arch independent trampoline code in mini-trampolines.c.
4570
4571         * mini-arm.c (mono_arch_emit_prolog): Fix build.
4572
4573 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
4574
4575         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
4576
4577         * mini-s390.c (mono_arch_emit_prolog): Fix build.
4578
4579         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
4580
4581         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
4582
4583         * cpu-amd64.md: Use smaller sizes for int opcodes.
4584
4585         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
4586
4587         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
4588         objects.cs.
4589
4590         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
4591         debugging.
4592
4593         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
4594         instead of though a pointer to save an indirection when accessing elements of
4595         the array.
4596
4597         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
4598         some typos.
4599         (NOT_IMPLEMENTED): New helper macro.
4600         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
4601         of a bb.
4602
4603         * *.c: Use the new helper macro.
4604
4605 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
4606
4607         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
4608
4609 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
4610
4611         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
4612         stack slots.
4613
4614 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
4615
4616         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
4617         profiling is enabled.
4618         
4619         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
4620         the end.
4621         (mono_arch_emit_prolog): Add more first bblock optimizations.
4622
4623         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
4624         in order if possible.
4625         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
4626         bblock, since the arguments are still in their original registers.
4627
4628         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
4629
4630 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
4631
4632         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
4633         as well.
4634
4635         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
4636         offset 0.
4637
4638         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
4639
4640         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
4641         process async exceptions received while in unmanaged code.
4642
4643         * mini.c (mini_init): Install a callback with the runtime which will be called
4644         when a thread receives an async exception while in unmanaged code.
4645
4646         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
4647
4648         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
4649
4650 2008-01-16  Wade Berrier  <wberrier@novell.com>
4651
4652         * cpu-g4.md:
4653         * cpu-arm.md:
4654         * cpu-s390x.md:
4655         fix build
4656
4657 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
4658
4659         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
4660         compilation with sun cc.
4661
4662         * cpu-*.md: Fix the build.
4663
4664         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
4665
4666         * mini-amd64.h: Add some comments to the MonoLMF structure.
4667
4668         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
4669         
4670         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
4671         in the LMF structure if possible. This saves two instructions in the
4672         managed->native wrappers.
4673
4674         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
4675
4676 2008-01-16  Mark Probst  <mark.probst@gmail.com>
4677
4678         * generic-sharing.c: New type argument lookup code which uses the
4679         runtime generic context template.
4680
4681 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
4682
4683         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
4684
4685         * mini-arm.c (add_general): Fix arm eabi parameter passing.
4686         (mono_arch_output_basic_block): Fix localloc implementation.
4687
4688         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
4689
4690         * mini-ia64.c (peephole_pass): Fix ia64 build.
4691
4692         * mini-amd64.c (peephole_pass): Fix a warning.
4693         
4694         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
4695         at a constant offset from sp/fp.
4696
4697         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
4698         instead of obtaining it from *lmf in the managed method case.
4699
4700 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
4701
4702         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
4703
4704 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
4705
4706         * mini.h (MonoInstList): New type.
4707         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
4708         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
4709         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
4710         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
4711         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
4712         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
4713         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
4714         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
4715         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
4716         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
4717         MONO_INST_LIST_FOR_EACH_ENTRY,
4718         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
4719         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
4720         mono_inst_list_first, mono_inst_list_last,
4721         mono_inst_list_next, mono_inst_list_prev): New instruction
4722         list handling interfaces.
4723         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
4724         list head 'ins_list'.
4725         (MonoInst): Replace next pointer with list head 'node'.
4726         (MonoCallInst): Make 'out_args' a MonoInstList.
4727         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
4728         (MonoCompile): Delete reverse_inst_list and
4729         reverse_inst_list_len.
4730         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
4731         mono_arch_lowering_pass, mono_arch_local_regalloc,
4732         mono_arch_output_basic_block, mono_arch_emit_prolog):
4733         Convert to new instruction lists.
4734         (insert_after_ins): Delete.
4735         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
4736         instruction lists.
4737         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
4738         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
4739         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
4740         mono_emulate_opcode, mono_emit_load_got_addr,
4741         inline_method, mono_method_to_ir, mono_print_bb_code,
4742         print_dfn, decompose_pass, nullify_basic_block,
4743         replace_out_block_in_code, remove_block_if_useless,
4744         merge_basic_blocks, move_basic_block_to_end,
4745         try_unsigned_compare, optimize_branches, mono_print_code,
4746         mini_select_instructions, remove_critical_edges): Likewise.
4747         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
4748         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
4749         mono_arch_output_basic_block, mono_arch_emit_prolog):
4750         Likewise.
4751         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
4752         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4753         mono_arch_output_basic_block): Likewise.
4754         (inst_list_prepend, insert_after_ins): Delete.
4755         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
4756         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
4757         instruction lists.
4758         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
4759         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
4760         mono_arch_emit_prolog): Likewise.
4761         * cfold.c (mono_constant_fold): Likewise.
4762         * liveness.c (visit_bb, mono_analyze_liveness,
4763         optimize_initlocals): Likewise.
4764         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
4765         * graph.c (mono_draw_code_cfg): Likewise.
4766         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
4767         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
4768         mono_ssa_cprop): Likewise.
4769         * abcremoval (get_relations_from_previous_bb, process_block):
4770         Likewise.
4771         * local-propagation (mono_cprop_invalidate_values,
4772         mono_local_cprop_bb): Likewise.
4773         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
4774         peephole_pass, mono_arch_output_basic_block,
4775         mono_arch_emit_prolog): Likewise.
4776         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
4777         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4778         mono_arch_emit_prolog): Likewise.
4779         (insert_after_ins): Delete.
4780         * aliasing.c (print_code_with_aliasing_information,
4781         mono_build_aliasing_information, mono_aliasing_deadce):
4782         Convert to new instruction lists.
4783         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
4784         peephole_pass, NEW_INS, mono_arch_lowering_pass,
4785         mono_arch_local_regalloc, mono_arch_output_basic_block):
4786         Likewise.
4787         (insert_after_ins): Delete.
4788         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
4789         peephole_pass, mono_arch_output_basic_block): Convert to
4790         new instruction lists.
4791         * mini-codegen (InstList, inst_list_prepend,
4792         insert_after_ins): Delete.
4793         (insert_before_ins, get_register_force_spilling,
4794         get_register_spilling, free_up_ireg, free_up_reg,
4795         create_copy_ins, create_spilled_store, alloc_int_reg,
4796         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
4797         to new instruction lists.
4798         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
4799         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4800         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
4801         (insert_after_ins): Delete.
4802         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
4803         mono_arch_local_regalloc, mono_arch_output_basic_block,
4804         mono_arch_call_opcode): Convert to new instruction lists.
4805         (insert_after_ins): Delete.
4806         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
4807         peephole_pass, mono_arch_output_basic_block,
4808         mono_arch_emit_prolog): Convert to new instruction lists.
4809
4810 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
4811
4812         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
4813
4814         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
4815         Fixes #353182.
4816
4817         * Makefile.am (version.h): Make this work with non-bash shells.
4818
4819 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
4820
4821         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
4822
4823 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
4824
4825         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
4826         the InitializeArray optimization.
4827
4828 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
4829
4830         * mini.c driver.c: Don't include os/gc_wrapper.h.
4831
4832 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
4833
4834         * mini.c (print_jit_stats): Print GC statistics if available.
4835
4836 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
4837
4838         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
4839
4840 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
4841
4842         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
4843
4844 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
4845
4846         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
4847         
4848         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
4849
4850         * driver.c (mono_main): Ditto.
4851
4852 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
4853
4854         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
4855
4856         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
4857         in the vtable can't be encoded.
4858         (compile_method): Ditto.
4859
4860 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
4861
4862         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
4863         defined.
4864
4865         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
4866         lmf->rbp.
4867
4868         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
4869         the top LMF entry belongs to the current method.
4870
4871         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
4872
4873 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
4874
4875         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
4876         
4877         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
4878
4879         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
4880
4881         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
4882
4883         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
4884
4885         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
4886         implementation.
4887
4888         * basic-float.cs: Add an ulong->double cast test.
4889
4890 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
4891
4892         * mini.c (mono_method_to_ir): Fix a warning.
4893
4894 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
4895
4896         * mini-ops.h: Add OP_SWITCH.
4897
4898         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
4899         CEE_SWITCH in back-end code, use OP_SWITCH instead.
4900
4901 2007-12-11  Geoff Norton  <gnorton@novell.com>
4902
4903         * mini-s390x.c: Minor change to the MAX() define to allow
4904         it to compile with other gcc versions.
4905
4906 2007-12-11  Geoff Norton  <gnorton@novell.com>
4907
4908         * cpu-s390x.md:
4909         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
4910
4911 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4912
4913         exceptions-arm.c (mono_arch_get_restore_context): Restore
4914         the frame pointer.
4915
4916         exceptions-arm.c (throw_exception): Save the frame pointer.
4917         This is a partial fix for #323747. Only the client side is
4918         fixed.
4919
4920 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4921
4922         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
4923         was using an unrelated variable to log the class which
4924         needed the cctor to be called. This was crashing on arm.
4925
4926 2007-12-09  Robert Jordan  <robertj@gmx.net>
4927
4928         * mini-x86.c (mono_arch_emit_epilog):
4929         Consider all kinds of 64-bit types. Fixes #323114.
4930
4931 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
4932
4933         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
4934
4935 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4936
4937         * mini-amd64.c (peephole_pass): Add a missing instruction check.
4938
4939 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4940
4941         * mini.c: run type ctor before allocating an object, not only
4942         when running it's constructor method (fixes at least part of bug #342507).
4943
4944 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4945         
4946         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
4947         
4948         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
4949         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
4950         function.
4951
4952         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
4953         mono_generic_class_init_trampoline () the same as it is done with the other
4954         trampolines.
4955
4956         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
4957         aot-runtime.c aot-compiler.c: Implement AOT support.    
4958
4959 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4960
4961         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
4962         build for archs which don't have the vtable trampoline defined
4963         yet.
4964
4965 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4966
4967         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
4968
4969         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
4970
4971         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
4972
4973         * tramp-<ARCH>.c: Use the new helper function.
4974
4975 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4976
4977         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
4978         trampoline call, which takes a vtable argument.
4979
4980         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
4981         OP_TRAMPCALL_VTABLEs like other calls.
4982
4983         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
4984         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
4985         call.  Implemented a support function which fetches the vtable
4986         from a register set.
4987
4988         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
4989         Implemented a generic class init trampoline, using the
4990         OP_TRAMPCALL_VTABLE opcode.
4991
4992         * mini.c: Implemented static field access when sharing generic
4993         code.  This implies initing the class using the new
4994         OP_TRAMPCALL_VTABLE call.
4995
4996 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4997
4998         * mini.c: Don't compile methods with sharing enabled if their
4999         classes are disabled for sharing.
5000
5001 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5002
5003         * inssel.brg: Add a missing sign extension to the GETCHR and array access
5004         opcodes. Fixes #346563.
5005
5006         * objects.cs: Add a new test.
5007
5008         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
5009
5010         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
5011         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
5012
5013 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5014
5015         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
5016
5017 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
5018
5019         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
5020         code stream.
5021
5022 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
5023
5024         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
5025
5026         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
5027         optimization in the AOT case.
5028         
5029 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
5030
5031         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
5032         
5033         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
5034
5035         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
5036
5037         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
5038
5039         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
5040         is created by the inlined delegate ctor.
5041
5042         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
5043
5044         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
5045
5046 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
5047
5048         * cpu-x86.md: Fix the length of ckfinite.
5049
5050 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
5051
5052         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
5053         
5054         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
5055         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
5056
5057         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
5058
5059         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
5060         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
5061
5062 2007-11-28  Martin Baulig  <martin@ximian.com>
5063
5064         * mini-x86.c
5065         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
5066         after creating the trampoline.
5067
5068 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
5069
5070         * aot-runtime.c (load_aot_module): Check runtime version if needed.
5071
5072         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
5073         the same version.
5074
5075         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
5076         instead of the calling method to help AOT.
5077
5078         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
5079
5080 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
5081
5082         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
5083         is defined.
5084
5085 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
5086
5087         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
5088         
5089         * aot-compiler.c (compile_method): Correct check for generic method definitions.
5090         (encode_method_ref): No need to handle generic method definitions specially.
5091
5092         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5093
5094         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
5095         decode_klass_info.
5096
5097         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
5098         encode_klass_info.
5099         (compile_method): Enable generic sharing.
5100
5101 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
5102
5103         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
5104         (mini_method_compile): Add preliminary support for AOTing shared generic code.
5105
5106         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
5107         generic code.
5108
5109         * mini-trampolines.c: Fix a warning.
5110
5111         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
5112         NEW_PCONST.
5113         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
5114         (generic_class_is_reference_type): Remove unused function.
5115
5116         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
5117         in the generic vtable trampoline case.
5118
5119         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
5120         
5121         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
5122         return an AOT method based on a vtable slot.
5123
5124         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
5125
5126         * mini.c (mini_get_vtable_trampoline): Export this.
5127
5128 2007-11-22  Martin Baulig  <martin@ximian.com>
5129
5130         * debug-debugger.h
5131         (MonoDebuggerInfo): Move `debugger_version' up.
5132
5133 2007-11-22  Martin Baulig  <martin@ximian.com>
5134
5135         * mini-amd64.c
5136         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
5137
5138         * mini-trampolines.c
5139         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
5140         after compiling the method.
5141
5142 2007-11-20  Martin Baulig  <martin@ximian.com>
5143
5144         * debug-mini.c
5145         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
5146         (mono_debugger_remove_breakpoint): Likewise.
5147         (mono_debugger_check_breakpoints): Likewise.
5148
5149         * debug-debugger.c: Implement the new breakpoint interface here.
5150
5151 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
5152
5153         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
5154         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
5155
5156         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
5157
5158 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
5159
5160         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
5161
5162         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
5163         mini.c.
5164
5165         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
5166         mini.c.
5167
5168         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
5169         returning a vtype in a register.
5170
5171         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
5172         here from the arch specific code.
5173
5174         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
5175         mini.c.
5176
5177         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
5178         (mono_arch_emit_prolog): Increment maximum prolog size.
5179
5180         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
5181         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
5182
5183         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
5184         MonoGenericSharingContext.
5185
5186         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
5187         MonoGenericSharingContext. Allocate memory from the cfg mempool.
5188
5189 2007-11-15  Mark Probst  <mark.probst@gmail.com>
5190
5191         * mini.c, mini.h, generic-sharing.c: Functions for producing code
5192         which extract fields out of the runtime generic context.  Full
5193         sharing of the NEWARR opcode.
5194
5195 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
5196
5197         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
5198         --enable-minimal=ssa.
5199
5200 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
5201
5202         * mini-trampolines.c (mono_delegate_trampoline): Update after 
5203         mono_marshal_get_delegate_invoke () signature change.
5204
5205 2007-11-13  Mark Probst  <mark.probst@gmail.com>
5206
5207         * mini.c: Removed the shared context in favor of the generic
5208         sharing context.  Allocate the MonoJitInfo structure with room for
5209         the generic sharing context if it's needed.
5210
5211         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
5212         domain-internals.h now.
5213
5214         * mini-x86.c: Pass the generic sharing context to get_call_info ().
5215
5216         * generic-sharing.c: Several changes for working without a shared
5217         context and instead operating on open types instead.
5218
5219 2007-11-12  David S. Miller  <davem@davemloft.net>
5220
5221        * inssel-sparc.brg: Fix double instruction emit.
5222
5223 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
5224
5225         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
5226         Get/Set/Address methods.
5227         
5228         * mini.c debug-debugger.c mini-trampolines.c: Update after 
5229         mono_marshal_get_delegate_invoke signature change.
5230
5231 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5232
5233         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
5234         This can happens with dynamic methods. Fixes the other bug in #322722.
5235
5236 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5237
5238         * tramp-arm.c (mono_arch_patch_callsite): Support patching
5239         BX call sequence.
5240
5241         * mini-arm.c (arm_patch): Implement patching of BX call
5242         sequence. Fixes one of the bugs in #322722.
5243
5244 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
5245
5246        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
5247        under Linux.  We only need to flush every 32-byte cache line.    
5248
5249 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
5250
5251         * mini.c:
5252         move_basic_block_to_end: Add branches when needed, eventually creating
5253         a new BB.
5254         optimize_branches: added a parameter that tells if it's ok to create
5255         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
5256         and avoid calling move_basic_block_to_end when it's not ok.
5257         Fixes bug 318677.
5258
5259 2007-11-07  Mark Probst  <mark.probst@gmail.com>
5260
5261         * mini.c: Abort inlining call to InitializeArray if something
5262         looks wrong.  Let the icall handle it, which now has proper safety
5263         checks.
5264
5265 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5266
5267         * mini.c (mono_spill_call): add support for soft-float.
5268
5269         * mini.c (mono_method_to_ir): add support for soft-float
5270         to inlined functions that return float.
5271
5272         * mini.c (mono_method_to_ir): add support for soft-float
5273         to cee_stsfld opcode on float fields.
5274
5275 2007-11-05  Geoff Norton  <gnorton@novell.com>
5276
5277         * mini-x86.h: Fix the structure access for X86 Leopard.
5278
5279
5280 2007-11-05  Martin Baulig  <martin@ximian.com>
5281
5282         * mini-trampolines.c
5283         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
5284         after compiling the method to notify the debugger.
5285
5286 2007-11-05  Martin Baulig  <martin@ximian.com>
5287
5288         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
5289
5290 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
5291
5292         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
5293         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
5294
5295 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
5296
5297         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
5298         native-to-managed wrappers.
5299         
5300 2007-11-01  Geoff Norton  <gnorton@novell.com>
5301
5302         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
5303         members.
5304
5305 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5306
5307         * mini.c, mini-x86.c: when getting back from unmanaged code
5308         to managed via a marshaled delegate we also need to set the
5309         right domain.
5310
5311 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5312
5313         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
5314         for amd64.
5315
5316 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
5317
5318         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
5319         let the debugger or other external agents to tell the JIT when
5320         a sw breakpoint has been inserted in the code that the JIT needs
5321         to be able to inspect.
5322
5323 2007-10-31  Martin Baulig  <martin@ximian.com>
5324
5325         * debug-debugger.h
5326         (MonoDebuggerInfo): Remove `runtime_class_init'.
5327
5328 2007-10-30  Martin Baulig  <martin@ximian.com>
5329
5330         * debug-mini.h
5331         (mono_debugger_thread_created): Added `MonoThread *' argument.
5332         (mono_debugger_extended_notification): New public method.
5333         (mono_debugger_trampoline_compiled): New public method.
5334
5335         * debug-mini.c
5336         (MonoDebuggerThreadInfo): Added `thread' and
5337         `extended_notifications' fields.
5338
5339         * debug-debugger.c
5340         (debugger_executable_code_buffer): New static variable.
5341
5342         * debug-debugger.h
5343         (MonoDebuggerInfo): Added `executable_code_buffer',
5344         `executable_code_buffer_size', `breakpoint_info_area',
5345         `breakpoint_table' and `breakpoint_table_size'.
5346
5347 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
5348
5349         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
5350         that IP  either is an unused value or the vtable pointer. IMT 
5351         calls use vtable + offset now. Reduced by almost half the size
5352         of IMT entries.
5353
5354 2007-10-26  Jonathan Chambers <joncham@gmail.com>
5355
5356         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
5357         defines to access param registers. Replace long usage with
5358         gsize as sizeof(long) != sizeof(void*) on Win64.
5359
5360         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
5361         on Win64. Fix intrinsic, use _AddressOfReturnAddress
5362         instead of non-existant _GetAddressOfReturnAddress.
5363
5364         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
5365         param registers. Save/restore %rdi and %rsi in MonoLMF.
5366
5367         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
5368         param registers. Modify (throw_exception) signature to take 
5369         %rdi and %rsi on Win64. 
5370
5371         Code is contributed under MIT/X11 license.
5372
5373 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5374
5375         * helpers.c: unlink debugging output files.
5376
5377 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
5378
5379         * mini.c: Move mono_create_ftnptr () to object.c.
5380
5381 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5382
5383         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
5384         optional. This function can now be used to disassemble code generated
5385         outside the JIT such as trampolines and IMT thunks.
5386
5387         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
5388
5389         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
5390         vtable pointer from a ldr instruction.
5391
5392         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
5393         new IMT call sequence.
5394
5395         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
5396         call sequence for interface invocations.
5397
5398         * mini-arm.c (mono_arch_emit_imt_argument): added, required
5399         for imt support. This function is empty since IMT on ARM requires no
5400         special handling on the IR side.
5401
5402         * mini-arm.c (mono_arch_find_imt_method): added, required for
5403         imt support.
5404
5405         * mini-arm.c (mono_arch_find_this_argument): added, required
5406         for imt support.
5407
5408         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
5409         a ldr instruction to load a value stored in the code stream.
5410
5411         * mini-arm.c (mono_arch_build_imt_thunk):added, required
5412         for imt support.
5413
5414
5415 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
5416
5417         * mini.c (mini_init): Install the jump trampoline callback.
5418
5419 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5420
5421         * mini-trampolines.c: handle synchronized methods with the common
5422         vtable trampoline (bug #335601).
5423
5424 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
5425
5426         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
5427
5428         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
5429         64 bit platforms.
5430
5431         * mini-ia64.h mini-ia64.c: Add support for IMT.
5432
5433         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
5434         prolog. Fixes #331958.
5435
5436 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
5437
5438         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
5439
5440 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5441
5442         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
5443         trampoline.
5444
5445 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5446
5447         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
5448         trampoline.
5449
5450 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
5451
5452         * mini-x86.c, mini-x86.h: x86 support for the common vtable
5453         trampoline.
5454
5455 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
5456
5457         * mini-trampolines.c: changed the magic rampoline to understand
5458         the common vtable trampoline method: the method to invoke is
5459         determined by the vtable displacement of the call.
5460
5461 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5462
5463         * mini.c, mini.h: register the common vtable trampoline if the
5464         architecture supports it.
5465
5466 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5467
5468         * cpu-amd64.md: use the correct max length for tls_get.
5469
5470 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
5471
5472         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
5473         CEE_STELEM_ANY. Fixes #333696.
5474
5475 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5476
5477         * exceptions-x86.c: provide more graceful handling of the case where
5478         we followed a bogus function pointer from managed code (bug #332866).
5479
5480 2007-10-11  Mark Probst  <mark.probst@gmail.com>
5481
5482         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
5483         replaces the generic_shared flag and will carry more information
5484         in the future.
5485
5486         * generic-sharing.c: Added mini_type_stack_size() which allows
5487         allows open types if given a generic sharing context.
5488         mini_get_basic_type_from_generic() takes a
5489         MonoGenericSharingContext* instead of a MonoCompile* now.
5490
5491         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
5492         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
5493         mini-sparc.c, mini-x86.c: Trivial changes required by the two
5494         changes above.  Just passing arguments through to the right
5495         places.
5496
5497 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5498
5499         * mini-arm.c: unify the call emission to emit_code_seq().
5500
5501 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
5502
5503         * tramp-arm.c: reduced the trampoline size.
5504
5505 2007-10-10  Mark Probst  <mark.probst@gmail.com>
5506
5507         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
5508         variable handling out of arch-specific code.
5509
5510 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
5511
5512         * mini-arm.c: implemented fast delegate dispatch.
5513
5514 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
5515
5516         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
5517         that fp elimination is turned off if the space required by locals is too
5518         big. Fixes #331958.
5519
5520 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5521
5522         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
5523         ARM to the new style trampoline.
5524
5525 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
5526
5527         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
5528
5529         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
5530
5531 2007-10-09  Martin Baulig  <martin@ximian.com>
5532
5533         * debug-debugger.h
5534         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
5535         `field_info_offset_offset'.     
5536
5537 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
5538
5539         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
5540         removed more internal usage of the r11 register and made it available
5541         to the register allocator.
5542
5543 2007-10-08  Mark Probst  <mark.probst@gmail.com>
5544
5545         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
5546         when sharing generics and treat type variables as references.
5547
5548 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5549
5550         * mini-ppc.c: started removing the internal uses of register r11
5551         to eventually allow the register allocator to manage it as an
5552         additional available register.
5553
5554 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5555
5556         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
5557
5558 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
5559
5560         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
5561         specific trampolines as they are not performance critical as a jump
5562         target (maybe align as before only for AOT code?). This saves about
5563         200 KB of native code on x86 for monodevelop startup.
5564
5565 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
5566
5567         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
5568         monodevelop startup.
5569
5570 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
5571
5572         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
5573
5574         * mini-sparc.h mini-sparc.c: Implement IMT support.
5575
5576         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
5577         its smaller and doesn't clobber sparc_g1.
5578
5579         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
5580
5581 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
5582
5583         * mini-ppc.c: optimized the size of the IMT thunks a bit.
5584
5585 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5586
5587         * mini-ppc.c: implemented fast delegate invocation.
5588
5589 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
5590
5591         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
5592
5593 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5594
5595         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
5596         code to the new style trampoline in preparation for IMT support.
5597
5598 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
5599
5600         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
5601         systems already. This also reduces the specific trampiline sizes and
5602         prepares for the use of r12 as the IMT identifier register.
5603
5604 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5605
5606         * mini-mips.h: endianess fix (simplified from a patch by
5607         Thomas Kunze <thommy@tabao.de>, bug #323737).
5608
5609 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5610
5611         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
5612         to access ucontext fields and enable netbsd support
5613         (partially from Magnus Henoch <mange@freemail.hu>).
5614
5615 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5616
5617         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
5618         use the preprocessor from the CPP env var if it is set.
5619
5620 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5621
5622         * mini-trampolines.c: fixed an assertion and moved it earlier in the
5623         code, before interface_offset gets used.
5624
5625 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
5626
5627         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
5628         mono_class_setup_vtable () before accessing klass->vtable.
5629
5630 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
5631
5632         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
5633         hackish.
5634
5635 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5636
5637         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
5638         IMT slots (this saves hundreds of KB of memory in programs like
5639         IronPython and Monodevelop).
5640
5641 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5642
5643         * mini.c: print the delegate counter.
5644
5645 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
5646
5647         * mini-x86.c: make it easier to enable the debugging code for IMT
5648         slots.
5649
5650 2007-09-28  Martin Baulig  <martin@ximian.com>
5651
5652         * debug-debugger.h
5653         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
5654         `mono_method_klass_offset' and `mono_method_token_offset'.
5655
5656 2007-09-20  Mark Probst  <mark.probst@gmail.com>
5657
5658         * mini.c: First generics sharing implementation.  Can only share
5659         in very simple cases.  If sharing doesn't work it falls back to
5660         dedicated compilation.
5661
5662         * mini.h: Flag in MonoCompile to specify whether generic
5663         compilation is shared.  Flags enum for marking which generic inst
5664         of a context is used.  Prototypes for helper functions.
5665
5666         * generic-sharing.c: Helper functions for generic method sharing.
5667
5668         * optflags-def.h: Optimization flag (gshared) for enabling generic
5669         method sharing added.
5670
5671         * Makefile.am: generic-sharing.c added.
5672
5673 2007-09-19 Daniel Nauck <dna@mono-project.de>
5674
5675         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
5676
5677 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
5678         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
5679         fixes bug 325507.
5680
5681 2007-09-19  Martin Baulig  <martin@ximian.com>
5682
5683         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
5684         mono_debug_cleanup() is now part of mono_cleanup().
5685
5686 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
5687
5688         * driver.c (mono_main): Fix a warning.
5689
5690 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
5691
5692         * aot-compiler.c: Optimize various parts when processing large assemblies.
5693         Fixes ##325568.
5694
5695         * mini.c (mono_patch_info_hash): Improve hash function.
5696
5697 2007-09-14  Jonathan Chambers <joncham@gmail.com>
5698
5699         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
5700         
5701         Code is contributed under MIT/X11 license.
5702
5703 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5704
5705         * mini.c (mini_init): Fix a leak.
5706
5707         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
5708
5709 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5710
5711         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
5712
5713 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5714
5715         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
5716
5717 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
5718
5719         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
5720         variance tests.
5721
5722         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
5723
5724         * mini.c (handle_alloc): Enable managed allocators in AOT code.
5725
5726         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
5727
5728         * aot-runtime.c (decode_patch_info): Ditto.
5729
5730 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5731
5732         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
5733         static case. Cache delegates in architecture specific code, 
5734         based on number of parameters.
5735         
5736         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
5737         in architecture specific code, based on number of parameters.
5738         
5739         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
5740         caching happen in architecture specific code now.
5741         
5742         Code is contributed under MIT/X11 license.
5743
5744 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5745
5746         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
5747         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
5748         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
5749
5750         Code is contributed under MIT/X11 license.
5751
5752 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5753         * mini.c: (mono_thread_abort) Fixed bug #82416.
5754
5755 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5756
5757         * mini.: hook the new managed GC allocation feature into the JIT.
5758
5759 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5760
5761         * mini.c: implementation for the new runtime tls opcode.
5762
5763 2007-09-11  Martin Baulig  <martin@ximian.com>
5764
5765         * debug-debugger.h
5766         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
5767         `mono_method_inflated_offset'.
5768
5769 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
5770
5771         * driver.c mini.h mini.c: Add a new devel command line option for injecting
5772         async exceptions into a method.
5773
5774         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
5775         purpose of testing whenever the unwinder works at every instruction.
5776
5777 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
5778
5779         * mini.c: check accessibility of method used in ldftn (fixes
5780         bug #82635).
5781
5782 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
5783
5784         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
5785
5786         * inssel.brg: Fix a warning.
5787
5788 2007-09-03  Martin Baulig  <martin@ximian.com>
5789
5790         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
5791         now takes the `main_method' as argument.
5792
5793 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
5794
5795         * cpu-sparc.md (endfilter): Add missing src1:i argument.
5796
5797 2007-08-30  Jonathan Chambers <joncham@gmail.com>
5798
5799         * driver.c: include the cil-coff.h header on Windows.
5800         
5801         Code is contributed under MIT/X11 license.
5802
5803 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5804
5805         * mini.c, driver.c: don't include the cil-coff.h header.
5806
5807 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5808
5809         * mini.c: flag places that needs fixes fo soft-float support.
5810
5811 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
5812
5813         * mini.h, inssel-float.brg: fix soft-float constant loads on big
5814         endian systems (partially from Dean Jenkins, bug #81924).
5815
5816 2007-08-28  Mark Probst  <mark.probst@gmail.com>
5817
5818         * mini.c (check_linkdemand): Remove embedded reference object in
5819         call to LinkDemandSecurityException.
5820         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
5821         with an IntPtr instead of a reference object.
5822
5823 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
5824
5825         * mini.c (handle_initobj): Handle alignment properly.
5826
5827         * inssel.brg (mini_emit_memset): Ditto. 
5828
5829         * inssel.brg (mini_emit_memcpy): Ditto. 
5830
5831         * inssel-sparc.brg: Ditto.              
5832
5833         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
5834
5835 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
5836
5837         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
5838         exceptions raised in unmanaged code. Fixes part of #82594.
5839
5840 2007-08-24  Mark Probst  <mark.probst@gmail.com>
5841
5842         * mini.c (mono_method_to_ir), declsec.c
5843         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
5844
5845 2007-08-22  Martin Baulig  <martin@ximian.com>
5846
5847         * debug-mini.h
5848         (MonoDebuggerThreadInfo): New typedef.
5849         (mono_debugger_thread_table): New global variable.
5850         (mono_debugger_thread_created): New public function.
5851         (mono_debugger_thread_cleanup): New public function.
5852
5853         * debug-debugger.h
5854         (MonoDebuggerInfo):
5855         - removed `get_current_thread' and `lookup_assembly'.
5856         - removed `data_table'.
5857         - added `thread_table'.
5858
5859         * mini.c
5860         (mono_thread_start_cb): Call mono_debugger_thread_created().
5861         (mono_thread_attach_cb): Likewise.
5862         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
5863         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
5864         initial domain.
5865
5866         * driver.c (mono_main): Move mono_debug_init() up, before calling
5867         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
5868
5869 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5870
5871         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
5872         together when passing several arguments of type double (gives a small
5873         speedup and saves a few bytes of generated code).
5874
5875 2007-08-20  Jb Evain  <jbevain@novell.com>
5876
5877         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
5878
5879 2007-08-20  Jb Evain  <jbevain@novell.com>
5880
5881         * mini.c (mono_method_to_ir): throw MethodAccessException
5882         and FieldAccessException instead of InvalidProgramException.
5883
5884 2007-08-20  Mark Probst  <mark.probst@gmail.com>
5885
5886         * mini.c: CoreCLR security checks.
5887
5888         * mini.h: Removed MonoSecurityMode (moved to
5889         metadata/security-manager.h) and mono_security_mode global var
5890         (replaced by set/get functions in security-manager.h).
5891
5892         * driver.c: Added "core-clr-test" security mode for testing.  Used
5893         set-function for setting security mode.
5894
5895 2007-08-17  Mark Probst  <mark.probst@gmail.com>
5896
5897         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
5898         the new jit_info_table.
5899
5900         * driver.c: Test code for the new jit_info_table (enabled by the
5901         define MONO_JIT_INFO_TABLE_TEST).
5902
5903 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
5904
5905         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
5906         detection of call <REG> instruction sequence. Fixes build on freebsd.
5907
5908 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
5909
5910         * mini-exceptions.c: Fix a warning.
5911
5912 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
5913
5914         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
5915         stack overflow handling code on amd64 too.
5916
5917         * mini-exceptions.c (mono_setup_altstack): Make this use 
5918         mono_thread_get_stack_bounds ().
5919
5920         * mini-x86.h: Disable sigaltstack on solaris x86.
5921
5922 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
5923
5924         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
5925
5926 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
5927
5928         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
5929
5930 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
5931
5932         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
5933
5934         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
5935
5936 2007-08-03  Neale Ferguson <neale@sinenomine.net>
5937
5938         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
5939         due to alignment.
5940
5941 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5942
5943         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
5944         to be emitted (bug #82281).
5945
5946 2007-08-01  Martin Baulig  <martin@ximian.com>
5947
5948         Merged the `debugger-dublin' branch.
5949
5950         * debug-debugger.h (MonoDebuggerInfo):
5951         Removed the `old_*' compatibility entries.
5952         Added `debugger_version' and `data_table'.
5953         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
5954         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
5955
5956         * debug-mini.c
5957         (MiniDebugMethodBreakpointInfo): Add `address_list'.
5958         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
5959         instead of a `gconstpointer'.
5960         (mono_debugger_insert_method_breakpoint): Return a
5961         `MonoDebugMethodAddressList *'.
5962
5963 2007-06-28  Martin Baulig  <martin@ximian.com>
5964
5965         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5966
5967 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
5968
5969         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
5970         __builtin_frame_address () since it is broken on older gcc versions.
5971
5972 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5973
5974         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
5975         on the stack overflow handling and made the managed stack overflows
5976         catchable in most cases using soft guard pages.
5977         * exceptions-x86.c: added code to restore the protection in the soft
5978         guard pages at the end of exception handling.
5979
5980 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
5981
5982         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
5983
5984 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5985
5986         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
5987         exception handling.
5988
5989 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5990
5991         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
5992         signal handling support until it has been ported to the new mechanism.
5993         * mini.c: fixed stack overflow detection and use the new
5994         architecture code  to handle signals on the altstack.
5995
5996 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
5997
5998         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
5999         stack overflows on the alt stack.
6000
6001 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
6002
6003         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
6004         stack overflows on the alt stack.
6005
6006 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
6007
6008         * exceptions-ppc.c: cleanup preparing for altstack support.
6009
6010 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6011
6012         * exceptions-arm.c: cleanup preparing for altstack support.
6013
6014 2007-07-27  Mark Probst  <mark.probst@gmail.com>
6015
6016         * mini.c (print_jit_stats): Output hazard pointer stats.
6017
6018 2007-07-26  Mark Probst  <mark.probst@gmail.com>
6019
6020         * driver.c, mini.c: Replaced security mode flags with a single
6021         enum variable.
6022
6023 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6024
6025         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
6026
6027 2007-07-25  Mark Probst  <mark.probst@gmail.com>
6028
6029         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
6030         (which doesn't do anything yet) for activating Core CLR
6031         (Silverlight) security.
6032
6033 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
6034
6035         * mini-codegen.c: work around a possible gcc bug on arm.
6036
6037 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6038
6039         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
6040         message for platforms that don't support AOT compilation.
6041
6042 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6043
6044         * mini.h, mini.c, driver.c: temporary smcs hack.
6045
6046 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
6047
6048         * mini-arm.h, mini-arm.c: arm EABI fixes.
6049
6050 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
6051
6052         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
6053         case.
6054
6055         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
6056         trampolines taking a method argument.
6057
6058         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
6059
6060         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
6061         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
6062
6063         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
6064         JIT compilation throws an exception. Fixes #82050.
6065
6066 2007-07-19  Mark Probst  <mark.probst@gmail.com>
6067
6068         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
6069         with the MONO_EXCEPTION_ defines.
6070
6071 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
6072
6073         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
6074         #82117.
6075         
6076         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
6077         the cause of an assertion.
6078
6079 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
6080
6081         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
6082         removed.
6083
6084 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
6085
6086         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
6087         assert. Should fix #82103.
6088
6089 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
6090
6091         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
6092         here too. Fixes #82095.
6093
6094         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
6095         addresses.
6096
6097         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
6098
6099         * mini-amd64.h: Enable IMT for amd64.
6100         
6101         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
6102
6103 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
6104
6105         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
6106
6107 2007-07-12  Mark Probst  <mark.probst@gmail.com>
6108
6109         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
6110         as soon as check_linkdemand sets an exception_type.
6111
6112 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6113
6114         * mini-x86.c: fixed offsets for IMT call sequence.
6115         * mini-x86.h: enable IMT again.
6116
6117 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6118
6119         * trace.c (mono_trace_enter_method): Decode MonoType too.
6120
6121         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
6122
6123         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
6124
6125         * mini-amd64.c: Add preliminary IMT implementation.
6126         
6127 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6128
6129         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
6130         understand the new IMT-base interface invocation (thanks to
6131         Daniel Nauck for the report and the remote debugging session).
6132
6133 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6134
6135         * mini-x86.c: size and speed optimizations for the IMT bsearch.
6136
6137 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6138
6139         * Makefile.am (aotcheck): Make this actually use the AOTed code.
6140
6141 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
6142
6143         * mini-trampolines.c: implement AOT IMT support.
6144         * mini-x86.h: enable IMT support for wider testing.
6145
6146 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6147
6148         * inssel.brg (emit_imt_argument): Add aot support here.
6149
6150         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
6151
6152 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6153
6154         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
6155         of the IMT implementation, partially from massi, with my
6156         implementation of the bsearch sequence. Disabled by default until
6157         the AOT code is implemented.
6158
6159 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6160
6161         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
6162
6163         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
6164
6165 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6166
6167         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
6168         arch-independent IMT JIT code from Massimiliano
6169         Mantione (massi@ximian.com) with small cleanups from me.
6170
6171 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6172
6173         * Makefile.am: fix svn invocation to get the svn revision to be
6174         independent of the local language (build fix).
6175
6176 2007-07-09  Mark Probst  <mark.probst@gmail.com>
6177
6178         * mini.c (inline_method): Reset cfg->exception_type if the
6179         inlining is aborted.  Fixes: 82049.
6180
6181 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
6182
6183         * mini.c: remove assert from exception handling code when exception_ptr
6184         is not set.
6185
6186 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
6187
6188         * mini.c (mono_codegen): Add an assert.
6189
6190         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
6191         enter and leave code.
6192         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
6193
6194 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6195
6196         * mini-ppc.c: fixed memory corruption for localloc(0)
6197         (bug #81852).
6198
6199 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
6200         
6201         * mini.c: Fix warnings.
6202
6203 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
6204
6205         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
6206         to emit better double->int conversions.
6207
6208 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6209
6210         * mini.c: the provided Min/Max optimizations are valid for unisgned
6211         ints.
6212
6213 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
6214
6215         * 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
6216
6217 2007-06-28  Miguel de Icaza  <miguel@novell.com>
6218
6219         * mini.c (mono_running_on_valgrind): Add support for reporting the
6220         method and  its boundaries to valgrind.
6221
6222 2007-06-28  Martin Baulig  <martin@ximian.com>
6223
6224         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6225
6226 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
6227
6228         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
6229
6230         * generic.2.cs: Add new test case.
6231
6232 2007-06-25  Martin Baulig  <martin@ximian.com>
6233
6234         Merged the `debugger-dublin' branch.
6235
6236         * debug-mini.c
6237         (mono_debugger_insert_method_breakpoint): New public method.
6238         (mono_debugger_remove_method_breakpoint): Likewise.
6239         (mono_debugger_check_breakpoints): New static method.
6240         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
6241
6242         * debug-debugger.h (MonoDebuggerInfo):
6243         Renamed (to keep backward compatibility in the vtable):
6244         `insert_breakpoint' -> `old_insert_breakpoint'.
6245         `remove_breakpoint' -> `old_remove_breakpoint'.
6246         `create_string' -> `old_create_string'.
6247         `lookup_class' -> `old_lookup_class'.
6248         `lookup_type' -> removed; changed into a dummy field.
6249         `lookup_assembly' -> `old_lookup_assembly'.
6250         Added (same functionality, but different signature):
6251         `create_string', `lookup_class', `lookup_assembly'
6252         Added new:
6253         `get_method_addr_or_bpt', `remove_method_breakpoint',
6254         `runtime_class_init'.
6255
6256         * debug-debugger.c: Merged the `debugger-dublin' branch.
6257
6258 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
6259
6260         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
6261         well.
6262         (peephole_pass): Likewise.
6263
6264 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
6265
6266         * driver.c: hopefully make setaffinity work also for ancient
6267         versions of linux.
6268
6269 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
6270
6271         * driver.c : win32 build fix.
6272
6273 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6274
6275         * driver.c: check for the MONO_NO_SMP env var and bind to a single
6276         processor if it is set.
6277
6278 2007-06-21  Martin Baulig  <martin@ximian.com>
6279
6280         * debug-mini.h: New file.
6281
6282         * debug-mini.c
6283         (mono_debugger_insert_breakpoint_full): Moved here from
6284         ../metadata/mono-debug-debugger.c.
6285         (mono_debugger_remove_breakpoint): Likewise.
6286         (mono_debugger_breakpoint_callback): Likewise.
6287
6288 2007-06-15  Raja R Harinath  <rharinath@novell.com>
6289
6290         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6291         changes in MonoGenericClass.
6292
6293 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
6294
6295         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
6296
6297 2007-06-14  Raja R Harinath  <rharinath@novell.com>
6298
6299         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6300         removal of MonoGenericMethod.
6301
6302 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6303
6304         * mini-exceptions.c: hooks for the exception events profiling API.
6305
6306 2007-06-14  Randolph Chung  <tausq@debian.org>
6307
6308         * Makefile.ma: Add hppa target.
6309         * mini-arch.h: Include mini-hppa.h
6310         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
6311         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
6312         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6313
6314 2007-06-14  Randolph Chung  <tausq@debian.org>
6315
6316         * inssel.brg: Add rules for "chained" compare-branch operations so that
6317         a single compare op can affect multiple branches.  Adjust cost for
6318         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
6319         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
6320         cost for some rules so that they can more easily be overridden by
6321         per-arch rules (with fixes from lupus).
6322         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6323
6324 2007-06-13  Randolph Chung  <tausq@debian.org>
6325
6326         * mini-ops.h: Reorder branch ops so that they match the order of the
6327         corresponding CEE_* ops.  The code expects them this way.
6328         Add new ops for HPPA target.
6329         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6330
6331 2007-06-13  Randolph Chung  <tausq@debian.org>
6332
6333         * mini-exceptions.c: Handle cases where the stack grows towards
6334         larger addresses.
6335         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6336
6337 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6338
6339         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
6340         counter.
6341         * driver.c: explain where a non-matching corlib is found.
6342
6343 2007-06-13  Mark Probst  <mark.probst@gmail.com>
6344
6345         * mini.c (print_jit_stats): Output dynamic code allocation stats.
6346
6347 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
6348
6349         * mini-exceptions.c: Generate a method profile leave event during
6350         an exception to ensure that the profiler gets notified.
6351
6352 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
6353
6354         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
6355         branch.
6356
6357         * cpu-amd64.md: Add long_and/or/xor opcodes.
6358
6359 2007-06-06  Wade Berrier  <wberrier@novell.com>
6360
6361         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
6362         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
6363         length of instruction shr_imm (expected 8, got 10)
6364
6365 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
6366
6367         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
6368
6369 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6370
6371         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6372         MonoInternalHashTable again (fixed bug in the internal hash table
6373         code).
6374
6375 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6376
6377         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
6378         Have to figure out what makes it crash the SWF regression.
6379
6380 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
6381
6382         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
6383
6384 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6385
6386         * mini.c: optimize out the type check when storing null in a
6387         reference array.
6388
6389 2007-06-04  Mark Probst  <mark.probst@gmail.com>
6390
6391         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6392         MonoInternalHashTable.
6393
6394 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6395
6396         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
6397         signed integer methods.
6398
6399 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
6400
6401         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
6402         permanently since the current approach doesn't work.
6403
6404 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
6405
6406         * inssel.brg (stmt): Only call delegate->invoke_impl if 
6407         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
6408
6409 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
6410
6411         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
6412         the sreg2==rdx case.
6413         
6414         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
6415         account if it contains a rex prefix.
6416         (peephole_pass): Handle OP_FMOVE as well.
6417
6418 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
6419
6420         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
6421         as it causes regressions.
6422
6423 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
6424
6425         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
6426         static case as well.
6427
6428         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
6429
6430         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6431         (mono_arch_get_this_arg_from_call): Ditto.
6432
6433         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
6434
6435         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
6436         invoke_impl field.
6437
6438         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6439         (mono_arch_get_this_arg_from_call): Ditto.
6440
6441         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
6442         
6443         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
6444         try to create optimized invoke code and use that for further invocations. 
6445         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
6446
6447         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
6448
6449 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
6450
6451         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
6452         sealed classes or methods.
6453         *devirtualization.cs: tests for the new optimization
6454
6455 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
6456
6457         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
6458         by the update_volatile () function.
6459
6460 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
6461
6462         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
6463         require it.
6464
6465         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
6466
6467 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
6468
6469         * mini.c: Add configure checks for header files.
6470         * mini-x86.c: Add configure checks for header files.
6471         * trace.c: Add configure checks for header files.
6472         * aot-runtime.c: Add configure checks for header files.
6473         * aot-compiler.c: Add configure checks for header files.
6474         * driver.c: Add configure checks for header files.
6475         * mini-codegen.c: Add configure checks for header files.
6476         
6477         Code is contributed under MIT/X11 license.
6478
6479 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
6480
6481         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
6482         icompare_imm -128 + op_iclt. Fixes #81703.
6483
6484 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
6485
6486         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
6487
6488 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
6489
6490         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
6491         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
6492         so that all isinst checks now use "interface_bitmap".
6493
6494 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
6495
6496         * cpu-amd64.md (jmp): Fix a warning.
6497
6498         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
6499
6500         * basic.cs: Add new regression test.
6501
6502         * basic.cs: Remove test which is now in basic-long.cs.
6503
6504         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
6505
6506         * basic-long.cs: Add new test.
6507         
6508 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
6509
6510         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
6511
6512 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
6513
6514         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
6515
6516         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
6517         places.
6518         
6519         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
6520         throwing code a bit.
6521
6522         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
6523         the exception throwing code a bit.
6524
6525         * mini-x86.c (get_call_info): Allocate result from a mempool.
6526
6527 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
6528
6529         * aot-compiler.c (find_typespec_for_class): Fix the assert.
6530
6531         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
6532
6533         * mini.h (MonoCompile): Add 'token_info_hash' field.
6534
6535         * mini.c: Save token->method associations during compilation so the AOT 
6536         compiler can use it.
6537         
6538         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
6539         which reference generic classes and methods.
6540
6541 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
6542
6543         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
6544
6545         * aot-compiler.c (compile_method): Fix a typo in a comment.
6546
6547         * aot-runtime.c (decode_cached_class_info): Skip generic types.
6548
6549         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
6550         everything generic.
6551
6552         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
6553
6554 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
6555
6556         * mini.h (MonoCompile): Add 'args' field.
6557
6558         * mini.c (mono_compile_create_vars): Store variables representing the arguments
6559         into cfg->args.
6560
6561         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
6562
6563 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
6564
6565         * mini.c (mono_compile_get_interface_var): Remove this unused function.
6566
6567         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
6568
6569         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
6570         opcodes for some opcodes.
6571
6572         * mini.h *.brg *.c: Use the new opcodes.
6573
6574 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
6575
6576         * mini.h: Bumped aot revision.
6577
6578         * inssel.brg: modified code generation of type checks for interfaces
6579         to use the new "MonoClass.interface_bitmap" instead of the old
6580         "MonoClass.interface_offsets".
6581
6582 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
6583
6584         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
6585
6586 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
6587
6588         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
6589         64 bit platforms.
6590
6591 2007-04-27  Neale Ferguson <neale@sinenomine.net>
6592
6593         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
6594
6595 2007-04-27  Wade Berrier  <wberrier@novell.com>
6596
6597         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
6598         mini.h) to fix build.
6599
6600 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
6601
6602         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
6603         
6604         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
6605         causes the corlib unit tests to fail.
6606
6607 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
6608
6609         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
6610
6611         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
6612
6613         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
6614         opcodes to the comparison relations.
6615
6616         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
6617         opcodes to their types.
6618         
6619         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
6620
6621         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
6622         it in cfg->arch.cinfo.
6623
6624         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
6625
6626         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
6627         cfg->cil_offset_to_bb.
6628
6629 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
6630
6631         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
6632         created becase of initlocals.
6633
6634 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
6635
6636         * mini-alpha.c cpu-alpha.md: More alpha port work from 
6637         Sergey Tikhonov <tsv@solvo.ru>.
6638
6639 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
6640
6641         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
6642
6643 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
6644
6645         * cpu-s390.md (break): Correct the length of break instruction.
6646
6647 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6648
6649         * mini.c: fix a couple of soft-float issues and comments.
6650
6651 2007-04-15  Miguel de Icaza  <miguel@novell.com>
6652
6653         * trace.c (is_filenamechar): - is also a filename char.
6654
6655 2007-04-15  Neale Ferguson <neale@sinenomine.net>
6656
6657         * mini-s390.c: Correct checking for enum type in return value processing.
6658
6659 2007-04-14  Raja R Harinath  <rharinath@novell.com>
6660
6661         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
6662         (version.h): Makefile is in the build directory.
6663
6664 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
6665
6666         * mini-amd64.h: fix for assertion failure on Solaris/amd64
6667
6668 2007-04-11  Martin Baulig  <martin@ximian.com>
6669
6670         * mini.c (can_access_member): Fix handling of generic classes;
6671         fixes #81259.
6672
6673 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
6674
6675         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
6676
6677 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
6678
6679         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
6680
6681 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6682
6683         * mini-codegen.c: make sure the right spill amount is
6684         used for fp or integer registers (fixes the float_sub_spill() on ppc).
6685
6686 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
6687
6688         * mini-ppc.c: fixes for the fp_branch_nan test.
6689
6690 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
6691
6692         * basic.cs: Comment out new test which still fails on ia64.
6693
6694 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6695
6696         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
6697
6698 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6699
6700         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
6701
6702 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
6703
6704         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
6705         on 64 bit machines. Fixes part of #80738.
6706
6707         * basic.cs: Add regression test.
6708
6709 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6710
6711         * inssel.brg basic.cs: Revert previous change to fix build.
6712
6713         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
6714         platforms.
6715         
6716         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
6717
6718         * basic.cs: Add new regression test.
6719
6720 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6721
6722         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
6723         many arguments.
6724
6725 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6726
6727         * cpu-s390x.md: Correct length of break instruction.
6728
6729 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6730
6731         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
6732         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
6733
6734 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
6735
6736         * *.c: Begin WIN64 port.
6737         * mini.c:  Use correct register in profiler.
6738         * mini-amd64.c: No inline assembly on Win64.
6739         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
6740         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
6741         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
6742         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
6743         mono_arch_ip_from_context for Win64.
6744         
6745         Contributed under MIT/X11 license.
6746
6747 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
6748
6749         * exceptions-amd64.c (seh_handler): Ditto.
6750
6751         * exceptions-x86.c (seh_handler): Fix a memory leak.
6752
6753 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
6754
6755         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
6756         mini-s390x.c: fixed peephole optimizations to deal
6757         correctly with 1 and 2 byte reload avoidance.
6758
6759 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
6760
6761         * cpu-s390.md, cpu-s390x.md: update localloc length.
6762
6763 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6764
6765         * cpu-g4.md: added missing descriptions.
6766
6767 2007-03-14  Miguel de Icaza  <miguel@novell.com>
6768
6769         *  Makefile.am: Add support so the tail tests are not executed on
6770         PowerPC as that is a known limitation of the PowerPC port.
6771
6772 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6773
6774         * runmdesc.bat:  Move to msvc directory.
6775         
6776 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6777
6778         * runmdesc.bat:  Run executable that was produced by the current
6779         target and sent via an argument.
6780         
6781 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
6782
6783         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
6784         #81102.
6785
6786         * generics.2.cs: Add regression test.
6787
6788 2007-03-09  Wade berrier  <wberrier@novell.com>
6789
6790         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
6791
6792 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
6793
6794         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
6795         AOT code depends on this.
6796
6797 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6798
6799         * mini.c: more precise tracking of types in the eval stack
6800         (part of fix for bug #81044).
6801
6802 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
6803
6804         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
6805
6806         * aot-compiler.c (encode_patch): Remove an obsolete comment.
6807
6808 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
6809
6810         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
6811
6812         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
6813
6814 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
6815
6816         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
6817         a pointer on 64 bit systems. Fixes #80190.
6818
6819         * iltests.il: Add new regression test.
6820
6821 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6822
6823         * mini.c: inline a constant for Environment.IsRunningOnWindows.
6824
6825 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
6826
6827         * trace.c: Remove an erroneous alignemnt check when tracing.
6828           Fixes --trace on OSX86.
6829
6830 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6831
6832         * mini-$(arch).h: initialize SP in context for all the archs.
6833
6834 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
6835
6836         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
6837         regressions in the thread tests.
6838
6839 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
6840
6841         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
6842         - fixed implementation of LOCALLOC opcode
6843         - implemented non-un compare for floats
6844         - code cleanup
6845         - implementation of FDIV and CKFINITE opcodes
6846         - fixes for latest mono updates
6847         - additional arch opcodes
6848
6849 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6850
6851         * Makefile.am: simplify and merge rules for cross-compilation.
6852
6853 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
6854
6855         * local-propagation.c: Actually *apply* the fix for bug 80591...
6856
6857 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6858
6859         * mini-exceptions.c: backuot part of the last change
6860         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
6861
6862 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
6863         * inssel.brg: Fix bug 59286.
6864
6865
6866 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
6867
6868         * mini-exceptions.c: patch from Zoltan to correctly check for
6869         stack boundaries (using the stack register, not the frame register),
6870         fixes bugs #80724, #79717.
6871
6872 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
6873
6874         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
6875         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
6876
6877         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
6878         presence of frame pointer elimination.
6879
6880 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
6881         
6882         * mini-x86.h: NetBSD UCONTEX_REG defines.
6883
6884 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
6885
6886         * inssel-amd64.brg: Fix amd64 build.
6887
6888 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
6889
6890         * mini.h: remove extern to workaround what looks likes gcc bug 26905
6891         on amd64.
6892
6893 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
6894
6895         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
6896         ends.
6897
6898         * mini-<ARCH>.c: Use mono_is_regsize_var ().
6899
6900 2007-01-30 Mark Mason <mason@broadcom.com>
6901
6902            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
6903            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
6904            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
6905            beginning support for CEE_JMP [not quite working yet]
6906            * tramp-mips.c: LMF handling now works
6907         
6908 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
6909
6910         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
6911
6912         * mini.h (NULLIFY_INS): New macro.
6913
6914 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6915
6916         * mini.c: statistical profiler fix for windows, patch
6917         from Tor Lillqvist (tml@novell.com).
6918
6919 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
6920         * local-propagation.c: Fix bug 80591.
6921
6922 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6923
6924         * Makefile.am: put back the --export-dynamic option as with
6925         the previous gmodule flags (thanks to Robert Jordan).
6926
6927 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
6928
6929         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
6930
6931         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
6932         simplify and speed up the local register allocator. Also rename some fields
6933         like iassign->vassign.
6934         
6935         * regalloc.c: Remove some functions which are no longer used since their
6936         inlined version is in mini-codegen.c.
6937         
6938         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
6939
6940         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
6941
6942 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
6943
6944         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
6945         narrowing. Fixes #80622.
6946
6947         * iltests.il: Add new regresssion test. 
6948
6949 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6950
6951         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
6952         debug-debugger.c, debug-debugger.h: warning fixes.
6953         * driver.c: updated copyright year and made it fit in one line.
6954
6955 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
6956
6957         * aot-runtime.c: updated to use mono-dl instead of gmodule.
6958
6959 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
6960
6961         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
6962
6963         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
6964
6965         * iltests.il: Add new test for bug #80507.
6966
6967 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6968
6969         * mini-arm.h: use soft-float also on vfp for now.
6970
6971 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6972
6973         * mini.c: fix some more soft-float issues.
6974
6975 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
6976
6977         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
6978
6979 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
6980         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
6981         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
6982         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
6983
6984 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
6985
6986         * mini-arm.c: typo fix.
6987
6988 2007-01-23  Neale Ferguson <neale@sinenomine.net>
6989
6990         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
6991
6992 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
6993
6994         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
6995         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
6996
6997         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
6998
6999         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
7000
7001         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
7002         
7003         * inssel.brg: Fix a warning.
7004
7005         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
7006
7007         * abcremoval.c ssa.c ssapre.c: Update after this change.
7008         
7009         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
7010
7011         * dominators.c (df_set): Use mono_bitset_union_fast.    
7012
7013 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7014
7015         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
7016         mini-codegen.c: reduce relocations and memory usage for the cpu
7017         description.
7018
7019 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
7020
7021         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
7022
7023         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
7024         to reduce their size.
7025
7026 2007-01-19 Mark Mason <mason@broadcom.com>
7027
7028         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
7029         * mini-mips.c: more configuration macros, support long conditional branches, additional
7030         asserts, fix epilog instrumentation.
7031         * mini-mips.h: use standard stack walk
7032         * cpu-mips.md: increase size of div, rem and conditional branches
7033         
7034 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
7035
7036         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
7037         to cpu spec data.
7038
7039 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
7040
7041         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
7042         (compile_method): Ditto.
7043
7044         * aot-runtime.c (decode_klass_info): Ditto.
7045
7046         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
7047         needed by the code generated by inssel.brg. Also fix a warning.
7048
7049 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
7050
7051         * mini.c: deal with enums that become genericinsts by
7052         being nested in a generic class (bug #79956).
7053
7054 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7055
7056         * mini.c: match the generic definition to check for
7057         private access with generic types (bug #78431).
7058
7059 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7060
7061         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
7062         to make life easier for people cross-compiling that insist on not
7063         using scratchbox.
7064
7065 2007-01-17 Mark Mason <mason@broadcom.com>
7066
7067         * inssel-long.brg: patch to deal with mips missing flags
7068         * inssel-long32-mips.brg: implement overflow checks
7069         * insset-mips.brg: implement overflow checks
7070         * mini-mips.h: implement conditional exception handling
7071         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
7072           Remove unused code, minor cleanups.
7073         * exceptions-mips.c: minor cleanups
7074         * mini-ops.h: add mips conditional exception ops
7075         * cpu-mips.md: add mips conditional exception ops
7076
7077         
7078 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7079
7080         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
7081         to deal with mips missing of flags.
7082
7083 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7084
7085         * exceptions-ppc.c: execute fault handlers.
7086
7087 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
7088
7089         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
7090
7091 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7092
7093         * mini.c: handle also floating point values in initialize_array.
7094
7095 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7096
7097         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
7098         array initialization and make it conditional on the intrins option.
7099
7100 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7101
7102         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
7103         relocations and put the patch info names close to the enum definition.
7104
7105 2007-01-15 Mark Mason <mason@broadcom.com>
7106
7107         * basic.cs, exceptions.cs: break up large tests to increase debugability.
7108
7109 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7110
7111         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
7112
7113 2007-01-12  Raja R Harinath  <rharinath@novell.com>
7114
7115         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
7116
7117 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
7118
7119         * Makefile.am: distribute the mips sources.
7120
7121 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7122
7123         * mini-codegen.h: handle bug #80489 here, by excluding ecx
7124         directly.
7125
7126 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
7127
7128         * cpu-x86.md: back out for now as this triggers other regressions.
7129
7130 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7131
7132         * cpu-x86.md: force src1 and dest regpair for long shift instructions
7133         to eax:edx, so ecx can't get allocated to them (bug #80489).
7134
7135 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
7136
7137         * mini.c, mini-exceptions.c: enabled running fault handlers
7138         (bug #80469).
7139
7140 2007-01-03  Miguel de Icaza  <miguel@novell.com>
7141
7142         * driver.c: If nothing fail, do not use the string "failed",
7143         because it makes it very annoying to view test result logs on the
7144         web. 
7145
7146 2006-12-30  Miguel de Icaza  <miguel@novell.com>
7147
7148         * debug-debugger.c (mono_debugger_main): Rename "main" to
7149         "main_method" to prevent a warning.
7150
7151         Remove a warning for unused field.
7152
7153 2006-12-28  Martin Baulig  <martin@ximian.com>
7154
7155         * debug-debugger.c
7156         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
7157
7158 2006-12-22  Martin Baulig  <martin@ximian.com>
7159
7160         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
7161         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
7162         seperate `.mdb_debug_info' section, so we can access it from the
7163         debugger even if the binary is stripped.
7164
7165         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
7166         from the `.mdb_debug_info' here to prevent the linker from
7167         removing that section.
7168
7169         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
7170         mdb-debug-info64.s.
7171
7172 2006-12-19  Robert Jordan  <robertj@gmx.net>
7173
7174         * mini-x86: enable the code to return small structures in
7175         registers for FreeBSD as well. Fixes bug #80278.
7176         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
7177
7178 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7179
7180         * mini-x86.c: align the stack when calling the profiler
7181         function instrumenting the prolog (on OSX).
7182
7183 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
7184
7185         * mini.c: emit a break opcode where Debugger.Break () is called.
7186
7187 2006-12-13  Miguel de Icaza  <miguel@novell.com>
7188
7189         * mini.c (mono_method_to_ir): Provide useful information on this
7190         assert, to prevent others from debugging like I did.
7191
7192 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7193
7194         * mini.c: enable code which was incorrectly commented
7195         (bug #80235).
7196
7197 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7198
7199         * mini-x86.c: enable on OSX, too, the code to return small
7200         structures in registers.
7201
7202 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7203
7204         * mini-x86.c: remove the use of the dynamic code manager here, too.
7205
7206 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7207
7208         * mini.h, debug-debugger.c, tramp-*.c: fixed 
7209         mono_debugger_create_notification_function() to use
7210         mono_global_codeman_reserve () instead of a dynamic code manager.
7211
7212 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
7213
7214         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
7215         ves_array_element_address() jit icall and use a generated
7216         managed method instead (which is about 4 times faster for a rank 3
7217         array access).
7218
7219 2006-11-29  Mark Mason  <mason@broadcom.com>
7220
7221         * basic-calls.cs: additional tests for passing
7222         structures as function arguments.
7223
7224 2006-11-29  Mark Mason  <mason@broadcom.com>
7225
7226         * mini-mips.h: disable custom exception handling
7227         * mini-mips.c: throw/rethrow should use jalr to call
7228         exception stubs.  Fixed bug with passing structures
7229         by value. More support for tracing floating point
7230         functions.
7231
7232 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7233
7234         * mini.c: fixed typo in the soft-float ldind.r4 handling
7235         (bug #80086).
7236
7237 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7238
7239         * mini.c, mini.h, driver.c: added --runtime command line
7240         option to select a different runtime than the autodetected one.
7241         * jit.h: added API for embedders to initialize with a specific
7242         runtime version.
7243
7244 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
7245
7246         * mini.c: handle also boxing of r4 values (bug #80024).
7247
7248 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
7249
7250         * mini-ppc.c: force indirect calls until we reserve
7251         enough address space for all the generated code.
7252
7253 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
7254
7255         * exceptions-arm.c: workaround bugs in the libc definition
7256         of struct ucontext.
7257
7258 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7259
7260         * inssel.brg: fixes from me and Mark Mason.
7261
7262 2006-11-23  Dick Porter  <dick@ximian.com>
7263
7264         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
7265         semaphore display now we've fixed the initial value
7266
7267 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7268
7269         * inssel.brg: partially revert the last change to fix the build.
7270
7271 2006-11-21  Mark Mason  <mason@broadcom.com>
7272
7273         * inssel.brg: Add and use compare-and-branch macros to support
7274         architectures that do not have condition code registers (ie. MIPS).
7275         * *-mips.{c,brg,md}: Fix copyright statements
7276
7277 2006-11-20  Mark Mason  <mason@broadcom.com>
7278
7279         * Makefile.am: remove mini-codegen.c from list of MIPS sources
7280         * mini.c: Allow GET_CONTEXT to be specified by the arch port
7281         * mini.h: Added declaration for mono_print_ins()
7282         * mini-codegen.c: added ins_spec initializer for MIPS
7283         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
7284         vreg to be virtual and hreg to be non-virtual.
7285         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
7286         is not yet working/implemented correctly.
7287         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
7288         non-static, fixup calls to print_ins() from other parts in the file.
7289
7290 2006-11-20  Mark Mason  <mason@broadcom.com>
7291
7292         * basic-calls.cs: added tests for passing structures as arguments
7293         to calls.
7294
7295 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7296
7297         * inssel-long32.brg: optimize signed division by power of two.
7298
7299 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
7300
7301         * mini-arm.c: added support for interworking with thumb code
7302         (mono must be still be built using the ARM instruction encoding).
7303
7304 2006-11-19  Miguel de Icaza  <miguel@novell.com>
7305
7306         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
7307         verifier has different rules for it.   Fixes a few verifier issues
7308         in the test suite.
7309
7310         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
7311         at the end, so people know what happened.
7312
7313 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7314
7315         * brach-opts.c: in optimize_exception_target() make sure we
7316         are in a catch clause (fixes bug #79871).
7317
7318 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7319
7320         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
7321         more soft-float support fixes.
7322
7323 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
7324
7325         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
7326         that are passed half on the stack and half in registers.
7327
7328 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
7329
7330         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
7331         more mips integration work from Mark E Mason 
7332         <mark.e.mason@broadcom.com>.
7333
7334 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7335
7336         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
7337         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
7338         tramp-mips.c: added sources for the mips port, not
7339         integrated in the build yet. Contributed by
7340         Mark E Mason <mark.e.mason@broadcom.com>.
7341
7342 2006-11-14  Neale Ferguson <neale@sinenomine.net>
7343
7344         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
7345
7346 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7347
7348         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
7349         put the soft-float rules in its own file since it seems to
7350         break s390 compilation.
7351
7352 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7353
7354         * mini-arm.c: fixed wrnings.
7355
7356 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
7357
7358         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
7359         inssel-arm.brg: ARM support for soft-float.
7360
7361 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7362
7363         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
7364         loads and stores of 32 bit fp values.
7365
7366 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
7367
7368         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
7369
7370         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
7371         works. Fixes #79852 and #79463.
7372
7373 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7374
7375         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
7376         more soft-float support WIP and fixes.
7377
7378 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
7379
7380         * mini-arm.c: some VFP updates.
7381
7382 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7383
7384         * mini-exceptions.c: 0 is a valid local var offset in some
7385         architectures, don't assert (bug #78508).
7386
7387 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
7388
7389         * exceptions-arm.c: fixed off by one error in stack walk code.
7390
7391 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
7392
7393         * mini.h, mini.c: more precise tracking of type load exceptions.
7394
7395 2006-11-03  Robert Jordan  <robertj@gmx.net>
7396
7397         * Makefile.am: [WIN32] Add monow.exe target.
7398         * driver.c: [WIN32] Don't detach the console when debugging.
7399         Fixes bug #79797.
7400         
7401 2006-10-30  Miguel de Icaza  <miguel@novell.com>
7402
7403         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
7404
7405 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
7406
7407         * aot-compiler.c (emit_method_info): Add a case missed earlier.
7408
7409         * driver.c (mini_regression): Fix --regression with AOT.
7410
7411         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
7412
7413 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
7414
7415         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
7416
7417         * mini-sparc.h: Don't use sigaction on sparc/linux.
7418
7419         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
7420
7421         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
7422
7423         * mini-exceptions.c: Add proper include files for getpid ().
7424
7425 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
7426
7427         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
7428         address instead of a MonoJitInfo* to avoid decoding the exception info for the
7429         method.
7430
7431         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
7432         name cache to reduce its size.
7433
7434         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7435
7436 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
7437
7438         * mini-x86.c: Save/restore the current LMF structure more efficiently using
7439         the mono_lmf TLS variable.
7440
7441         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
7442         trampoline lmf frames.  
7443
7444         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
7445
7446 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
7447
7448         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
7449         the mono_lmf TLS variable.
7450
7451         * mini-exceptions.c: Access the LMF structure through accessors.
7452
7453         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
7454         variable instead of in jit_tls->lmf.
7455
7456         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
7457         
7458         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
7459         trampoline lmf frames.
7460
7461         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
7462
7463 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
7464
7465        * mini.c trace.c mini-x86.c: Revert these too.
7466         
7467        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
7468        signature change.
7469
7470 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
7471
7472         * genmdesc.c: removed now dead code.
7473
7474 2006-10-09  Robert Jordan <robertj@gmx.net>
7475
7476         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
7477
7478 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
7479
7480         * mini.h: do not leave gaps in the opcode values.
7481
7482 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
7483
7484         * jit-icalls.h: flag functions as internal here, too.
7485
7486 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
7487
7488         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
7489         functions with the internal attribute.
7490
7491 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
7492
7493         * aot-compiler.c: fclose the file descriptor in the profile read loop.
7494
7495 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
7496
7497         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
7498         for soft-float.
7499
7500 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
7501
7502         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
7503         tail calls as on other platforms.
7504
7505         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
7506
7507         * iltests.il: Add a few tailcall tests.
7508
7509 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7510
7511         * driver.c: fix loop for old compilers (bug #79521).
7512
7513 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
7514
7515         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
7516
7517         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
7518
7519         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
7520         metadata without any code.
7521
7522         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
7523         more precise debugging information using gdb.
7524
7525 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
7526
7527         * inssel-ia64.brg: Make the helper methods static.
7528
7529 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7530
7531         * inssel-x86.brg: make the helper methods static.
7532
7533 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
7534
7535         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
7536
7537 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7538
7539         * mini.c: updates for monoburg changes.
7540         * inssel.brg: make a few helper functions static as they should.
7541
7542 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
7543
7544         * Makefile.am: Move mini-codegen.c to common_sources.
7545
7546 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7547
7548         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
7549         instructions.
7550         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
7551         mini-ppc.h: port to use the common local register allocator.
7552
7553 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7554
7555         * mini.h: Remove the comment too then.
7556
7557 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
7558
7559         * mini.h: put back backend.data which is to be used shortly and
7560         doesn't increase the size of MonoInst. If any 64 bit arch aligned
7561         pointers on 4 byte boundaries it'd have much bigger issues running
7562         and you can ifdef it out anyway.
7563
7564 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7565
7566         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
7567         MonoInst size by 4 bytes on 64 bit machines.
7568
7569 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
7570
7571         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
7572         replacement with more meaningful field names. Arch maintainers, please
7573         check the assigned names are good enough for your arch.
7574
7575 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7576
7577         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
7578         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
7579
7580 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
7581
7582         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
7583         relocations and memory requirements, put the optimization flags
7584         definitions in their own file.
7585
7586 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
7587
7588         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
7589
7590         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
7591
7592 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
7593
7594         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
7595
7596 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
7597
7598         * inssel.brg: use the correct function to get the size of an item
7599         in an array, given an element class.
7600         * aot-compiler.c: do not access class->class_size directly.
7601
7602 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
7603
7604         * mini.h, debug-mini.c: added a debugging function to print
7605         info about local variables and arguments in a jitted method.
7606
7607 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
7608
7609         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7610
7611         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
7612
7613 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
7614
7615         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
7616         inner and outer loops when passing vtypes.
7617
7618 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
7619
7620         * mini-ppc.c: take into account the cpu errata for cache flushing
7621         which caused some random errors (bug #79381).
7622
7623 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
7624
7625         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
7626         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
7627
7628 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
7629
7630         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
7631         loaded.
7632
7633         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
7634         freebsd ports tree.
7635
7636         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
7637         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
7638
7639         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
7640         displacement.
7641
7642 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
7643
7644         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
7645
7646 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
7647
7648         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
7649         macro does not have to be changed during debugging.
7650
7651         * 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>.
7652
7653         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
7654
7655         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
7656         
7657         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
7658         MONO_ARCH_NO_EMULATE_MUL is defined.
7659
7660         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
7661
7662         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
7663
7664         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
7665
7666         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
7667         
7668 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
7669
7670         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
7671         stuff to mini-exceptions.c where it is used.
7672
7673         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
7674         setup code, the real one is in mini-exceptions.c.
7675
7676         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
7677         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
7678         some changes from the freebsd ports tree.
7679
7680         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
7681         constants.
7682         
7683         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
7684
7685 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
7686
7687         * mini.c: on Linux, check for /proc to be mounted
7688         (bug# 79351, novell bug#201204).
7689
7690 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
7691
7692         * mini.c: handle cases where pthread_attr_getstack() behaves
7693         incorrectly (bug #78096).
7694
7695 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
7696
7697         * mini-arm.c: support larger stack frames (bug #79272).
7698
7699 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
7700
7701         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
7702
7703         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
7704         tokens.
7705
7706         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
7707         mono_class_from_name () to find a class from its name.
7708
7709         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
7710
7711 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
7712
7713         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
7714
7715 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
7716
7717         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
7718
7719 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
7720
7721         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
7722         callinfo->trampoline.
7723
7724         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
7725         fixes #79271.
7726         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
7727         future.
7728
7729 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
7730
7731         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
7732
7733 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
7734
7735         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
7736         stats.method_trampolines, it is already done by the generic trampoline code.
7737
7738         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
7739         
7740 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
7741
7742         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
7743
7744         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
7745
7746         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
7747
7748         * mini.c (print_jit_stats): Print mscorlib mempool size too.
7749         
7750         * mini.c (print_jit_stats): Print new stats.
7751
7752         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7753
7754 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
7755
7756         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
7757         Address on two dimensional arrays. Fixes #78729.
7758
7759         * mini.h (MonoCompile): Add a 'skip_visibility' field.
7760
7761         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
7762         a method.
7763
7764         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
7765
7766         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
7767         #79130.
7768         
7769         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
7770         a race condition.
7771         (mini_get_ldelema_ins): Ditto.
7772
7773 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
7774
7775         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
7776         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
7777         Fixes #79213.
7778
7779 2006-08-29 Neale Ferguson <neale@sinenomine.net>
7780
7781         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
7782         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
7783
7784         * exceptions-s390x.c: Cosmetic change.
7785
7786         * tramp-s390.c: Fix warning.
7787
7788         * cpu-s390.md: Correct length of mul_imm.
7789
7790 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
7791
7792         * aot-compiler.c: added binary writer with ELF backend
7793         implementation (only on Linux/x86 for now).
7794
7795 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7796
7797         * Makefile.am: Don't run net 2.0 AOT tests.
7798
7799         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
7800         (mono_compile_assembly): Skip net 2.0 assemblies as well.
7801
7802         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
7803
7804 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7805
7806         * aot-compiler.c: simplified and refactored the asm-writing code
7807         to allow different backends.
7808
7809 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7810
7811         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7812
7813         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
7814         little. Share patches of type TYPE_FROM_HANDLE as well.
7815
7816         * mini.c (mono_patch_info_equal): New helper function.
7817         (mono_patch_info_hash): Ditto.
7818
7819         * aot-compiler.c (emit_method_code): Fix s390 build.
7820
7821         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
7822         is not handled because it is stored as a flag and not as a type ctor. Fixes
7823         #79016.
7824
7825 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
7826
7827         * aot-compiler.c: Fix computation of GOT slot statistics.
7828         
7829         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
7830         Also remove support for not PIC AOT.
7831
7832         * mini.h: Bump AOT file format version.
7833
7834         * objects.cs: Add a test for #78990.
7835
7836         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
7837         (peter.dettman@iinet.net.au). Fixes #79087.
7838
7839         * basic-long.cs: Add a test for the above.
7840
7841 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
7842
7843         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
7844         
7845         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
7846         code somewhat.
7847
7848 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
7849
7850         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
7851         exceptions.
7852
7853 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
7854
7855         * mini.c: Don't verify COM proxy invoke calls
7856         
7857
7858 2006-08-10  Dick Porter  <dick@ximian.com>
7859
7860         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
7861         which process is holding semaphores locked.
7862
7863 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
7864
7865         * mini-ia64.c mini-amd64.c: Fix #79027.
7866
7867         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
7868
7869         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
7870
7871         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
7872         implicit arguments in a vararg call. Fixes #79027.
7873
7874 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
7875
7876         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
7877         (mono_get_array_new_va_signature): Ditto.
7878
7879 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
7880
7881         * aot-runtime.c: Call init_plt lazily.
7882
7883         * inssel-long.brg: Fix unsigned long->int conversion.
7884
7885         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
7886
7887         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
7888         that most data is now in the .rss/.data section.
7889
7890 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
7891
7892         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
7893
7894         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
7895
7896         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
7897
7898         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
7899
7900         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
7901         virtual call. Fixes #79010.
7902
7903         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
7904         and use the result as the this argument in the real call.
7905
7906         * generics.2.cs: Add a new test for #79010.
7907         
7908 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
7909
7910         * mini-x86.c: Fix a warning.
7911
7912         * aot-compiler.c: Add a bunch of statistics.
7913
7914         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
7915
7916 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
7917
7918         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
7919
7920 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
7921
7922         * 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>.
7923
7924 2006-07-13  Miguel de Icaza  <miguel@novell.com>
7925
7926         * mini.c (mono_method_to_ir): Obtain the original method in the
7927         CIL stream and use this to perform validation.
7928
7929         Fixed: #78816
7930
7931 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
7932
7933         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
7934         (mono_arch_call_opcode): Ditto.
7935
7936         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
7937         #78826.
7938
7939         * mini.c (mono_patch_info_dup_mp): New helper function.
7940         
7941         * aot-compiler.c (compile_method): Fix some of the memory allocated during
7942         compilation. Fixes #78827.
7943
7944 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
7945
7946         * declsec.c: Use original security informations for
7947           MONO_WRAPPER_MANAGED_TO_MANAGED.
7948
7949 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
7950
7951         * mini.c: Allow Com Interop methods/classes and
7952         don't verify COM wrapper calls
7953         
7954
7955 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
7956
7957         * inssel-long32.brg: Fix long->i4 checked conversion.
7958
7959         * exceptions.cs: Add a test for the above.
7960
7961 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
7962
7963         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
7964
7965         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
7966         leaks.
7967
7968         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
7969         #78775.
7970
7971 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
7972
7973         * mini.c: Fix solaris/x86 exception handling.
7974
7975         * Makefile.am: Get rid of $(ICU_LIBS).
7976
7977 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
7978
7979         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
7980         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
7981         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
7982
7983         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
7984
7985         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
7986         this function causes a SIGSEGV.
7987
7988 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
7989
7990         * mini.c: Remove unused solaris/x86 includes.
7991
7992 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
7993
7994         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
7995
7996 2006-06-20  Jb Evain  <jbevain@gmail.com>
7997
7998         * cpu-g4.md: fix max length of start_handler instruction.
7999
8000 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
8001         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
8002
8003 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
8004         * ssa.c: Fixed bug 78653 for SSA based deadce.
8005         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
8006         MonoInst.flags, used in SSA based deadce.
8007         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
8008         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
8009
8010 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
8011
8012         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
8013         it can end up using non executable memory on ppc64 systems
8014         running ppc32 userspace (fix from Johannes Berg).
8015
8016 2006-06-14  Dick Porter  <dick@ximian.com>
8017
8018         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
8019         4.1.1
8020
8021 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
8022         * mini.c: Made so that inline is locally disabled if it would
8023         trigger a .cctor, because too many apps depend on this behavior
8024         (which seems to be also the one of the MS CLR).
8025
8026 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
8027
8028         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
8029         No idea why this worked before.
8030
8031         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
8032         which branch to outer exception clauses since they could skip the
8033         inner finally clauses. Fixes #78633.
8034
8035         * exceptions.cs: Add a test for the above.
8036
8037         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
8038         Fixes #78629.
8039
8040         * iltests.il: Add a test for the above.
8041
8042 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
8043
8044         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
8045         after the end of a try bblock, to prevent asserts in mini_method_compile ().
8046
8047         * iltests.il: Add a test for the above.
8048
8049 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
8050
8051         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
8052         
8053         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
8054         methods as instrinsics.
8055
8056 2006-06-09  Wade Berrier <wberrier@novell.com>
8057
8058         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
8059         (simple-cee-ops.h ssapre-mini-ops.h)
8060
8061 2006-06-09  Neale Ferguson <neale@sinenomine.net>
8062
8063         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
8064         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
8065         instruction).
8066         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
8067         * cpu-s390x.md: Fix max. length values for a couple of instructions.
8068
8069 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
8070
8071         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
8072
8073 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
8074
8075         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
8076         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
8077         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
8078         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
8079         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
8080         of opcodes, so that bug 78549 should not happen again.
8081         * ssapre.c: Updated to use the renamed files.
8082
8083 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
8084
8085         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
8086         in OP_ATOMIC_EXCHANGE_I4.
8087
8088 2006-06-07  Wade Berrier <wberrier@novell.com>
8089
8090         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
8091         in mono_debugger_create_notification_function)
8092
8093 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
8094
8095         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
8096         
8097         * mini.c (type_from_stack_type): Disable some changes which do not
8098         seem to work.
8099
8100         * driver.c: Reenable opts.
8101
8102         * mini.h (MonoStackSlot): New structure to keep track of the verification state
8103         of the evaluation stack.
8104         
8105         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
8106         evaluation stack trace at entry to the bblock.
8107
8108         * mini.c (merge_stacks): New function to perform verification of stack merges.
8109         Turned off by default.
8110
8111         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
8112         STACK_MP.
8113         
8114 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
8115
8116         * local-propagation.c: Fixed bug 78549.
8117
8118 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
8119
8120         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
8121
8122 2006-06-02  Miguel de Icaza  <miguel@novell.com>
8123
8124         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
8125         tramp-arm.c, tramp-ia64.c
8126         (mono_debugger_create_notification_function): Update signature to
8127         new signature and use new protocol for creating the notification
8128         function.  
8129
8130         Should fix the build.
8131
8132 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
8133
8134         * exceptions-ppc.c (mono_jit_walk_stack)
8135         (ves_icall_get_frame_info): Fix the build
8136
8137 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
8138
8139         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
8140
8141 2006-05-31  Raja R Harinath  <rharinath@novell.com>
8142
8143         * il2tests.2.il: New file for generics CIL tests.  Add test for
8144         #78019.
8145         * Makefile.am: Update.
8146
8147         Fix #78019
8148         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
8149         to nullable types.
8150
8151 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
8152
8153         * aliasing.c: Fixed bug 78311.
8154
8155 2006-05-29  Martin Baulig  <martin@ximian.com>
8156
8157         * mini-exceptions.c (mono_find_jit_info): When computing the
8158         native offset, check whether we're actually inside the method's
8159         code; call mono_debug_print_stack_frame() to format the frame.
8160         (ves_icall_System_Exception_get_trace): Call
8161         mono_debug_print_stack_frame() to format the stack frame.
8162         (ves_icall_get_trace): Update to the new debugging API.
8163         (mono_jit_walk_stack_from_ctx): Likewise.
8164         (ves_icall_get_frame_info): Likewise.
8165
8166         * mini.c (get_method_from_ip): Use the new debugging API.
8167         (mono_print_method_from_ip): Likewise.
8168
8169         * exceptions-ppc.c
8170         (mono_jit_walk_stack): Use the new debugging API.
8171         (ves_icall_get_frame_info): Likewise.   
8172
8173 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
8174
8175         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
8176
8177 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
8178
8179         * mini.c: Added "limitator" to inline for debugging.
8180
8181 2006-05-24  Martin Baulig  <martin@ximian.com>
8182
8183         * debug-debugger.c (mono_debugger_init): Create a private,
8184         malloc()-based code manager for the notification function and
8185         intentionally leak it on exit.  This fixes the crash-on-exit race
8186         condition.
8187
8188         * tramp-amd64.c
8189         (mono_debugger_create_notification_function): Added
8190         `MonoCodeManager *' argument.
8191
8192         * tramp-x86.c
8193         (mono_debugger_create_notification_function): Added
8194         `MonoCodeManager *' argument.
8195
8196 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
8197
8198         * aliasing.c: Fixed 64 bit issue.
8199         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8200         default since all known bugs are fixed (one more time!).
8201
8202 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8203
8204         * mini.c: write barrier support.
8205
8206 2006-05-23  Martin Baulig  <martin@ximian.com>
8207
8208         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
8209         check at the top of the file.
8210
8211 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
8212
8213         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
8214         reverting changes without reason and without changelog entries.
8215
8216 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
8217
8218         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
8219         to a few opcodes. Fixes #78439.
8220
8221         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
8222         consistency with other archs.
8223
8224         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
8225
8226 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8227
8228         * debug-debugger.c: fix the build.
8229
8230 2006-05-17  Martin Baulig  <martin@ximian.com>
8231
8232         * debug-debugger.c
8233         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
8234         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
8235         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
8236         (debugger_attach): Call GC_mono_debugger_add_all_threads().
8237
8238 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
8239
8240         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
8241
8242 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
8243
8244         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
8245         MONO_TYPE_GENERICINST.
8246         
8247         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
8248         MONO_TYPE_GENERICINST.
8249
8250 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
8251
8252         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
8253         #78325.
8254
8255 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
8256
8257         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
8258         mempool.
8259         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
8260
8261 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
8262
8263         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
8264         mono_trace_cleanup ().
8265
8266         * iltests.il: Fix problem with the newly added test.
8267
8268         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
8269         due to register constraints, free up the previous hreg. Fixes #78314.
8270
8271         * iltests.il: Add new test for #78314.  
8272
8273         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
8274         Interlocked.Add. Fixes #78312.
8275
8276         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
8277         
8278 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
8279
8280         * inssel.brg (mini_emit_virtual_call): Fix a warning.
8281
8282 2006-05-05  Martin Baulig  <martin@ximian.com>
8283
8284         * debug-mini.c (mono_debug_open_block): New method.
8285
8286         * mini-amd64.c
8287         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8288         the beginning of each basic block.
8289
8290         * mini-x86.c
8291         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8292         the beginning of each basic block.
8293
8294 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8295
8296         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8297         default until I understand why they break the build on amd64.
8298
8299 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
8300
8301         * mini.c (mini_cleanup): Call mono_cleanup ().
8302
8303         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
8304         errors.
8305
8306 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8307
8308         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
8309         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8310         default since all known bugs are fixed, and I cannot reproduce bug
8311         77944... I'm asking Matt Hargett to test again after this commit.
8312
8313 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
8314
8315         * mini-codegen.c: Fixed typo that thrashed inline.
8316
8317 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
8318
8319         * dominators.c (compute_dominators): Avoid using a worklist since
8320         it is not correct in some cases. Instead, iterate over all bblocks as
8321         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
8322
8323 2006-04-28  Miguel de Icaza  <miguel@novell.com>
8324
8325         * mini.c (mono_jit_compile_method_inner): Use
8326         mono_prepare_exception_from_error that resets the value
8327         internally.
8328
8329 2006-04-27  Miguel de Icaza  <miguel@novell.com>
8330
8331         * mini.c: Move the mini_loader_error_to_exception to metadata. 
8332         
8333 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8334
8335         * aliasing.c: Fixed bug 78210.
8336
8337 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8338
8339         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8340         default until all their problems (or the ones they trigger) are fixed.
8341
8342 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
8343
8344         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
8345         
8346         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
8347         as loaded only after resolving patches since that could invoke the same method.
8348
8349         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
8350
8351         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
8352         functions.
8353
8354         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
8355         AOT loader.
8356
8357         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
8358         stack.
8359
8360         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
8361         made from AOT code through the PLT table.
8362
8363         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
8364         holding the plt offset when a call is made to the aot plt trampoline.
8365         
8366 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
8367
8368         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
8369         amd64 AOT support.
8370
8371         * Makefile.am (common_sources): Fix build breakage.
8372
8373         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
8374         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
8375         intra-assembly calls if possible.
8376         
8377         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
8378
8379         * mini-trampolines.c: Handle PLT entries.
8380
8381         * mini.c: Avoid creating a GOT var for calls.
8382
8383         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
8384         from mscorlib code.
8385
8386         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
8387         from mscorlib code.
8388
8389         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
8390         AOT code.       
8391
8392         * mini.h: Bump AOT file format version.
8393         
8394         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
8395         covers more cases.
8396
8397 2006-04-25  Martin Baulig  <martin@ximian.com>
8398
8399         * driver.c: Disable copyprop, consprop and inline when running
8400         inside the debugger.
8401
8402 2006-04-25  Martin Baulig  <martin@ximian.com>
8403
8404         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
8405         with `get_current_thread' and added `detach'.
8406         (MonoDebuggerMetadataInfo): Added `thread_size',
8407         `thread_tid_offset', `thread_stack_ptr_offset' and
8408         `thread_end_stack_offset'.
8409
8410 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
8411
8412         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
8413         aot-runtime.c.
8414
8415         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
8416         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
8417
8418         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
8419
8420         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
8421
8422         * aot.c: Add support for ADJUSTED_IID.  
8423
8424 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
8425
8426         * aot.c (emit_method_order): Don't align method_order_end.
8427
8428         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
8429         the interface ID changes.
8430
8431 2006-04-21  Dick Porter  <dick@ximian.com>
8432
8433         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
8434         cleaning up a thread.  Fixes the new part of bug 77470.
8435
8436 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
8437
8438         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
8439         to managed wrapper.
8440                      
8441 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
8442
8443         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
8444         
8445         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
8446         SIGSEGV. Fixes #78072.
8447
8448         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
8449         unregister our SIGABRT handler.
8450
8451 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
8452
8453         * mini.c: Disabled inline where it can alter the call stack in a
8454         way visible from managed code.
8455         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
8456         default.
8457
8458 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
8459
8460         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
8461         on other platforms. Fixes #78089.
8462
8463 2006-04-13  Martin Baulig  <martin@ximian.com>
8464
8465         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
8466         determine whether we're inside the debugger.
8467
8468         * debug-debugger.h
8469         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
8470
8471 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
8472
8473         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
8474         handler clauses. Fixes #78024.
8475
8476         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
8477         in the CALL_MEMBASE opcodes. Fixes #78088.
8478         (mono_arch_get_vcall_slot_addr): Ditto.
8479
8480 2006-04-10  Martin Baulig  <martin@ximian.com>
8481
8482         * debug-debugger.c: The thread handling code has now been moved
8483         into ../metadata/threads.c.
8484
8485 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
8486
8487         * driver.c (mono_main): Fix --with-gc=none build.
8488
8489         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
8490         (mono_spillvar_offset_float): Ditto.
8491         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
8492         hreg, not when its !global, since on ia64, there is a third category: stacked
8493         registers.      
8494
8495 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
8496
8497         * mini.c: set MonoInst->klass for load field address and a few other
8498         places.
8499
8500 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
8501
8502         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
8503
8504 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
8505
8506         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
8507         the branch opt changes.
8508
8509 2006-04-06  Dick Porter  <dick@ximian.com>
8510
8511         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
8512         
8513         * wapihandles.c (mini_wapi_seminfo): 
8514         * driver.c (mono_main): Add semaphore info option
8515
8516 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
8517
8518         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
8519         branch optimization changes. Fixes #78009.
8520
8521 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8522
8523         * mini.c: ignore accessibility of methods in managed->native wrappers.
8524
8525 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
8526
8527         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
8528         
8529         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
8530
8531 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
8532
8533         * mini.c: Modify the branch optimizations to preserve the invariant that
8534         the entries inside the in_bb and out_bb arrays are unique.
8535         (mono_unlink_bblock): Avoid creation of new arrays.
8536
8537 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
8538
8539         * mini.c (mono_unlink_bblock): Fix regression caused by previous
8540         change (#77992).
8541
8542 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
8543
8544         * mini.c (optimize_branches): Remove the "optimizations" in
8545         the cbranch1/cbranch2 -> branch cases which were causing several
8546         problems in the past. Fixes #77986.
8547
8548 2006-03-31  Chris Toshok  <toshok@ximian.com>
8549
8550         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
8551         default optimizations :(
8552
8553 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
8554
8555         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
8556         branch.
8557
8558 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
8559
8560         * local-propagation.c: Added comments to structs and removed
8561         "Mono" prefixes from local tree mover types.
8562
8563 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
8564
8565         * Makefile.am (arch_sources): Define this for each architecture so 
8566         libmono_la_SOURCES is defined in one place.
8567
8568 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
8569
8570         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
8571         from handles/.
8572
8573 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
8574
8575         * driver.c: print the GC name supplied by configure.
8576
8577 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
8578
8579         * local-propagation.c: Added tree mover, and moved here all the
8580         local propagation code from mini.c
8581         * mini.c: Added support for treeprop, and moved all the local
8582         propagation code to local-propagation.c
8583         * mini.h: Added support for treeprop
8584         * driver.c: Added support for treeprop, enabled consprop, copyprop,
8585         treeprop, inline and deadce by default
8586         * Makefile.am: Added local-propagation.c
8587
8588 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
8589
8590         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
8591
8592 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
8593
8594         * debug-debugger.c: make it compile without the Boehm GC.
8595
8596 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8597
8598         * mini.c: fixed issue with mismatch when an icall is registered
8599         with multiple names but same address.
8600
8601 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8602
8603         * declsec.c, mini-exceptions.c: use write barrier to set reference
8604         fields of managed objects.
8605
8606 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
8607
8608         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
8609         (can_access_internals): Fix a warning.
8610
8611         * mini.c (print_method_from_ip): Rename this to 
8612         mono_print_method_from_ip so it gets exported.
8613
8614         * trace.c: Deal with strings inside StringBuilder's containing garbage
8615         and fix memory leaks. Fixes #77848.
8616
8617 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
8618
8619         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
8620         fixes #77787.
8621
8622 2006-03-16 Neale Ferguson <neale@sinenomine.net>
8623         
8624         * mini-s390.c: Remove OP_X86_TEST_NULL.
8625
8626 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8627
8628         * mini.c: use the correct GetHashCode() for the moving collector.
8629
8630 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
8631
8632         * liveness.c: Regalloc spill cost tuning.
8633
8634 2006-03-15 Neale Ferguson <neale@sinenomine.net>
8635         
8636         * mini-s390x.h: Correct S390_LONG macro.
8637
8638         * mini-s390x.c: Cleanup unused code.
8639
8640 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
8641
8642         * jit-icalls.h: New file.
8643
8644         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
8645         icalls and include that instead of including jit-icalls.c.
8646
8647         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
8648         OP_X86 opcodes.
8649
8650 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
8651
8652         * mini.c: when checking for member accessibility, also check for
8653         friend assemblies and for explicit interface implementations.
8654
8655 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
8656
8657         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
8658
8659         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
8660
8661         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8662         common cases are done first.    
8663
8664         * mini-ops.h: Only define platform specific opcodes on the given platform.
8665
8666         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
8667         branch.
8668         
8669 2006-03-14  Martin Baulig  <martin@ximian.com>
8670
8671         Revert Paolo's change from r57348:
8672
8673         * mini.h: don't use gboolean for bitfields.
8674         * mini.c: verifier changes for fields and methods accessibility.
8675
8676 2006-03-13  Neale Ferguson <neale@sinenomine.net>
8677
8678         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
8679
8680         * mini-s390x.c: Fix conv_r_un.
8681
8682         * cpu-s390, cpu-s390x.md: Fix lengths.
8683
8684 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
8685
8686         * mini.c: nested types have access to all the nesting
8687         levels, not just the enclosing types.
8688
8689 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
8690
8691         * mini.c: added a few more verification checks.
8692
8693 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
8694
8695         * liveness.c: Merge optimizations from the linear-il branch.
8696
8697 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8698
8699         * mini-ia64.c (emit_call): Add a comment.
8700
8701         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
8702
8703         * tramp-ia64.c: Fix some warnings.
8704
8705 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
8706
8707         * mini.h: don't use gboolean for bitfields.
8708         * mini.c: verifier changes for fields and methods accessibility.
8709
8710 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8711
8712         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
8713         lazy icall wrapper changes.
8714
8715         * dominators.c: Replace all the dominator algorithms with faster
8716         ones from the linear-il branch.
8717
8718         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
8719         the mempool.
8720
8721         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8722         common cases are done first.
8723
8724         * mini-amd64.c: Fix some warnings.
8725
8726         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
8727         from the mempool.
8728
8729         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
8730         added code.
8731
8732         * mini.h: Add a missing prototype.
8733
8734 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
8735
8736         * mini.c: Compile icall wrappers lazily.
8737
8738         * mini-codegen.c: Use printf instead of g_print since its much faster.
8739
8740         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
8741         function.
8742
8743         * mini.c (optimize_branches): Cache the negative result from 
8744         remove_block_if_useless ().
8745
8746         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
8747         Also fix some bblock linking issues.
8748
8749         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
8750         assembly files.
8751
8752         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
8753
8754         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
8755         accessed fields first, for better cache behavior.
8756         
8757 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8758
8759         * mini.c: speedup IList<T> array accesses.
8760
8761 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
8762
8763         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
8764         inline_costs counter. Fixes #77190.
8765
8766 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
8767
8768         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
8769         trace messages. Fixes #77706.
8770
8771 2006-03-04  Martin Baulig  <martin@ximian.com>
8772
8773         * tramp-amd64.c, tramp-x86.c
8774         (mono_debugger_create_notification_function): Use
8775         mono_global_codeman_reserve() to allocate a buffer at runtime and
8776         return it.
8777
8778         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
8779
8780         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
8781         notification function at runtime and then call `initialize' in the
8782         `MONO_DEBUGGER__debugger_info' vtable.
8783
8784 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
8785
8786         * iltests.il: Fix a visibility problem.
8787
8788 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8789
8790         * driver.c, mini.c: add hooks for the counters API.
8791
8792 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8793
8794         * driver.c: show disabled options.
8795
8796 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8797
8798         * linear-scan.c: always use cost-driven selection.
8799
8800 2006-02-28  Raja R Harinath  <rharinath@novell.com>
8801
8802         * jit-icalls.c (helper_compile_generic_method): Revert change from
8803         2006-02-24.
8804
8805 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
8806
8807         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
8808
8809 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
8810
8811         * inssel.brg: style fixes, mostly to force the updated monoburg
8812         to run for people using svn.
8813
8814 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
8815
8816         * mini.c: match monoburg changes.
8817
8818 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8819
8820         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
8821         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
8822         declaration in the header file.
8823
8824 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8825
8826         * helpers.c: reduce relocations and mem usage.
8827
8828 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
8829
8830         * mini.h, mini-codegen.c: disable logging features if
8831         requested by configure.
8832
8833 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
8834
8835         * mini.c: tiny verifier changes.
8836
8837 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8838
8839         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
8840         cpu-pentium.md: stack alignment changes for osx/x86,
8841         partially from Geoff Norton <gnorton@customerdna.com>.
8842
8843 2006-02-24  Raja R Harinath  <harinath@gmail.com>
8844
8845         * jit-icalls.c (helper_compile_generic_method): Update to changes
8846         in metadata/class.c.
8847
8848 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
8849         
8850         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
8851         
8852         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
8853         interface calls with large offsets.
8854
8855 2006-02-23  Raja R Harinath  <rharinath@novell.com>
8856
8857         * jit-icalls.c (helper_compile_generic_method): Document the
8858         special-case we depend on so that we can inflate the method twice
8859         with the same context with no bad side-effects.
8860
8861 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
8862
8863         * mini-x86.c, mini-amd64.c: fix for case when xen support
8864         is disabled.
8865
8866 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
8867
8868         * mini-x86.c, mini-amd64.c: generate code to access tls items
8869         in a faster way for Xen systems.
8870
8871 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8872
8873         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
8874         updates and compilation fixes for the OSX/x86 port, mostly from
8875         Geoff Norton <gnorton@customerdna.com>.
8876
8877 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8878
8879         * inssel.brg: faster interface call implementation
8880         to sync with the interface_offsets MonoVTable changes.
8881
8882 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8883
8884         * mini.c: more verification checks.
8885
8886 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
8887
8888         * mini.c: added a few more verification checks.
8889
8890 2006-02-17      Neale Ferguson <neale@sinenomine.net>
8891
8892         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
8893         facility on the processor and use it if available.
8894
8895 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8896
8897         * driver.c, aot.c, mini.c: throw exception if the IL code is
8898         invalid or unverifiable.
8899
8900 2006-02-17  Raja R Harinath  <rharinath@novell.com>
8901
8902         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
8903         m.StructField.
8904
8905 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
8906
8907         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
8908
8909 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8910
8911         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
8912         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
8913         handling of instantiated generic valuetypes.
8914
8915 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
8916
8917         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
8918         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
8919         instead.
8920
8921         * generics.2.cs: Revert the nullable reftypes tests.
8922
8923 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
8924
8925         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
8926         using __builtin_frame_address (1) as it doesn't work in the presence
8927         of optimizations. Hopefully fixes #77273.
8928
8929         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
8930         -> generics.cs change as it doesn't work with some automake versions.
8931
8932 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8933
8934         * mini.c: handle systems that sue a different way to
8935         retrieve the stack address of the current thread.
8936
8937 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
8938
8939         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
8940         it specially in the makefile.
8941
8942         * generics.2.cs: Add tests for nullable reference types.
8943
8944 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8945
8946         * mini.c: always handle the case when mono_jit_init()
8947         is called in a thread different from the main thread,
8948         confusing libgc (bug #77309).
8949
8950 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
8951
8952         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
8953
8954 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8955
8956         * mini.c: change optimize_branches () to use a single loop
8957         and introduce a new optimization to simplify some range checks.
8958
8959 2006-02-03  Martin Baulig  <martin@ximian.com>
8960
8961         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
8962         and merged with debugger_thread_manager_add_thread().
8963         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
8964         inform the debugger about the main thread.
8965
8966 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8967
8968         * basic.cs: Add test for div.un/rem.un constant folding.
8969
8970 2006-02-03  Neale Ferguson <neale@sinenomine.net>
8971
8972         * cpu-s390x.md: correct int_xor_imm length
8973
8974 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8975
8976         * generics.2.cs: New test for #77442.
8977
8978         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
8979         #77442.
8980
8981 2006-02-02  Martin Baulig  <martin@ximian.com>
8982
8983         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
8984         <mono/metadata/mono-debug-debugger.h>   
8985
8986         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
8987
8988 2006-02-02  Martin Baulig  <martin@ximian.com>
8989
8990         * debug-debugger.h: New header file for debug-debugger.c.
8991
8992         * debug-debugger.c: Big API cleanup; don't run the managed Main()
8993         function is a separate thread anymore; add support for attaching.
8994
8995 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
8996
8997         * tramp-x86.c: Fix a warning.
8998
8999 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
9000
9001         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
9002         on very large methods.
9003
9004         * aot.c (load_patch_info): Fix a warning.
9005
9006 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
9007
9008         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
9009         mini-ops.h: alu membase optimizations.
9010
9011 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
9012
9013         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
9014         to speedup StringBuilder.
9015
9016 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
9017
9018         * dominators.c (mono_compute_natural_loops): Fix detection of
9019         loop body start blocks.
9020
9021         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
9022
9023 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
9024
9025         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
9026         #75145.
9027
9028 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
9029
9030         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9031
9032 2006-01-25  Martin Baulig  <martin@ximian.com>
9033
9034         * debug-debugger.c: Moved the `MonoDebuggerManager' and
9035         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
9036         started to cleanup this file a little bit.
9037
9038 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
9039
9040         * mini.c: optimize a codepath frequently happening in generics code.
9041
9042 2006-01-23  Martin Baulig  <martin@ximian.com>
9043
9044         * Makefile.am: Only compile debug-debugger.c on supported platforms.
9045
9046         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
9047         functions directly.
9048
9049         * driver.c: debug-debugger.c is only available if
9050         `MONO_DEBUGGER_SUPPORTED' is defined.   
9051
9052 2006-01-23  Martin Baulig  <martin@ximian.com>
9053
9054         * debug-debugger.c: Only enable this on platforms where the Mono
9055         Debugger is working (x86 and x86_64).
9056
9057 2006-01-21  Martin Baulig  <martin@ximian.com>
9058
9059         The Mono Debugger is now using the normal `mono' instead of the
9060         `mono-debugger-mini-wrapper' when executing managed code.
9061
9062         * debug-debugger.c: New file; previously known as
9063         debugger/wrapper/wrapper.c.
9064
9065         * debug-mini.c (mono_init_debugger): Removed.
9066
9067         * driver.c (mono_main): Added new `--inside-mdb' command line
9068         argument which is used when running inside the debugger.
9069
9070 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
9071
9072         * liveness.c (mono_analyze_liveness): Remove some unused data
9073         structures.
9074
9075 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
9076
9077         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
9078
9079 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
9080
9081         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
9082         depends on implementation details of monobitset.
9083
9084         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
9085         Fixes #77271.
9086
9087 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
9088
9089         * liveness.c: Update after monobitset changes.
9090
9091 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
9092
9093         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
9094
9095 2006-01-11 Neale Ferguson <neale@sinenomine.net>
9096
9097         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
9098
9099         * mini-s390x.c: Remove warning messages.
9100
9101 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
9102
9103         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
9104
9105 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
9106
9107         * generics.2.cs: Add ldelem/stelem_any test.
9108
9109 2006-01-10 Neale Ferguson <neale@sinenomine.net>
9110
9111         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
9112
9113 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
9114
9115         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
9116         
9117 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
9118
9119         * generics.2.cs: Reenable vtype tests.
9120
9121         * inssel-x86.brg: Remove an icorrect valuetype rule.
9122
9123 2006-01-06 Neale Ferguson <neale@sinenomine.net>
9124
9125         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
9126         initial support for OP_ABS.
9127
9128 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9129
9130         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
9131
9132 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9133
9134         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
9135         conversion and implement LADD/LSUB.
9136
9137         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
9138         architectures.
9139
9140 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9141
9142         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
9143
9144         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
9145         architectures.
9146
9147 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9148
9149         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
9150         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
9151         (stack walk problem).
9152
9153 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
9154
9155         * aot.c (mono_aot_load_method): Fix a warning.
9156
9157 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9158
9159         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
9160
9161 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9162
9163         * iltests.il: Add test for #77148.
9164
9165         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
9166         #77148.
9167
9168 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9169
9170         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
9171
9172 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9173
9174         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
9175         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
9176
9177         * basic-long.cs: Add lconv-to-r4/r8 tests.
9178
9179 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9180
9181         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
9182
9183         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
9184         here as on other archs.
9185
9186 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9187
9188         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
9189
9190 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9191
9192         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
9193         
9194         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
9195
9196         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
9197         instrument_prolog; Add memory_barrier instruction.
9198
9199 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
9200
9201         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
9202
9203 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
9204
9205         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
9206
9207         * aliasing.c inssel.brg: Fix warnings.
9208
9209         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
9210         could skip initialization of some parts of memory.
9211
9212         * mini.c mini-ia64.c: Fix warnings.
9213
9214         * inssel-sparc.brg: Add an implementation of lneg which actually works.
9215
9216 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
9217
9218         * aliasing.c (mono_build_aliasing_information): Add a workaround for
9219         a crash seen on sparc.
9220
9221         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
9222         
9223         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
9224
9225 2005-12-21 Neale Ferguson <neale@sinenomine.net>
9226
9227         * mini-ops.h: Add s390_backchain instruction
9228
9229         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
9230
9231         * cpu-s390.md: Add s390_backchain instruction
9232
9233         * mini-s390.c: Significant ABI changes
9234
9235         * mini-s390.h: Cater for zero length structures
9236
9237 2005-12-20 Neale Ferguson <neale@sinenomine.net>
9238
9239         * mini-s390.c: ABI fixes
9240
9241         * inssel-s390.brg: Remove debug statements
9242
9243         * cpu-s390.md: Fix length of ATOMIC_xx operations
9244
9245 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
9246
9247         * basic-float.cs: Add float<->long conversion tests.
9248
9249 2005-12-16 Neale Ferguson <neale@sinenomine.net>
9250
9251         * mini-s390.c: Fix LOCALLOC processing.
9252
9253         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
9254
9255 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
9256
9257         * iltests.il: Add tests for some opcodes not covered by the other
9258         tests.
9259
9260 2005-12-15 Neale Ferguson <neale@sinenomine.net>
9261
9262         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
9263         register loading for Tail processing; Correct trace output.
9264
9265         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
9266
9267         * cpu-s390.md: Correct size of jmp instruction. 
9268
9269 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9270
9271         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
9272
9273 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9274
9275         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
9276           Bring s390 up to current level.
9277
9278 2005-12-12  Zltan Varga  <vargaz@gmail.com>
9279
9280         * generics.2.cs: Disable the newly added tests as they do not work yet.
9281         
9282         * generics.2.cs: Add valuetype tests.
9283
9284 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
9285
9286         * basic-long.cs: Add i4->u8 test.
9287
9288         * objects.cs: Add tests for JIT intrinsic.
9289
9290         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
9291         optimizations lost by a mistake.
9292
9293 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
9294
9295         * basic-long.cs: Remove a test moved to objects.cs.
9296
9297         * arrays.cs: Add more array tests.
9298
9299 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
9300
9301         * arrays.cs: Add new tests for multi-dimensional arrays.
9302
9303 2005-12-06  Raja R Harinath  <rharinath@novell.com>
9304
9305         * Makefile.am (test_sources2): Add generics.2.cs.
9306         (EXTRA_DIST): Add test_sources2.
9307
9308 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
9309
9310         Support for boxing and unboxing nullable types as well as the
9311         isinst operation on nullables, per the CLI ammendment.
9312
9313         * inssel.brg (CEE_ISINST): Special case for nullable
9314
9315         * mini.c (handle_unbox_nullable): new method
9316         (handle_box): Special case for nullable types
9317         (mono_method_to_ir): Call handle_unbox_nullable in correct
9318         places.
9319
9320         * generics.2.cs: New test suite
9321
9322         * Makefile.am: Support for regression tests with generics.
9323
9324 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
9325
9326         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
9327         allocated to registers. Fixes #76800.
9328
9329 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
9330
9331         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
9332
9333 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
9334
9335         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
9336         of platforms.
9337
9338 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
9339
9340         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
9341         objects.cs.
9342
9343         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
9344         
9345         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
9346 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
9347
9348         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
9349         single precision before storing to a single precision location.
9350
9351 2005-11-28  Raja R Harinath  <rharinath@novell.com>
9352
9353         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
9354
9355 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
9356
9357         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
9358         correct files.
9359
9360         * basic.cs: Remove test_0_byte_compares test which was moved to
9361         objects.cs a long time ago.
9362
9363 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
9364
9365         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9366
9367 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
9368
9369         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
9370         handlers are called.
9371
9372         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
9373         throwing code.
9374
9375          * mini-ia64.c: Add support for the throw->branch exception 
9376         optimization.   
9377
9378         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
9379
9380 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9381
9382         * mini.c: Enabled "fastpath" deadce :-)
9383         
9384 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9385
9386         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
9387         alias analysis pass to support it.
9388         * mini.h: Likewise.
9389         * ssa.c: Likewise.
9390         * liveness.c: Likewise (liveness computation can use aliasing
9391         information to be more accurate).
9392         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
9393         moreover made so that "--compile-all" uses the given optimization
9394         flags and not the default ones.
9395         * aliasing.c: Alias analysis (new file).
9396         * aliasing.h: Likewise.
9397         * Makefile.am: added "aliasing.c" and "aliasing.h".
9398         
9399 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
9400
9401         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
9402         OP_L opcodes.
9403
9404 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
9405
9406         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
9407         fp >= end_of_stack exit condition, as it is not needed, and it might
9408         become true for fp eliminated frames.
9409
9410 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
9411
9412         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
9413         coded offsets.
9414
9415 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
9416
9417         * mini-arm.c: fixed alignment of doubles/longs to match
9418         the C ABI (bug #76635).
9419
9420 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
9421
9422         * aot.c: fix compilation with --enable-minimal=aot.
9423
9424 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
9425
9426         * mini-arm.c: fixed compatibility with the new
9427         floating point emulator package for compares.
9428
9429 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
9430
9431         * mini.c : reverted sig->pinvoke changes (r51396-51397).
9432
9433 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
9434
9435         * mini-exceptions.c (print_stack_frame): Output to stderr.
9436         (mono_handle_native_sigsegv): Ditto.
9437
9438 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
9439
9440         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
9441         OP_LCONV_TO_OVF_I implementation.
9442
9443         * mini-amd64.c: Add support for the throw->branch exception 
9444         optimization.
9445
9446         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
9447         when the catch clause catches a more general exception, i.e. Object.
9448
9449 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
9450
9451         * cpu-ia64.md: Remove unused opcodes.
9452
9453         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
9454         specific defines for architectures defining USE_SIGACTION.
9455
9456         * mini-ia64.c: Fix some warnings.
9457
9458         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
9459         version seemed to skip a frame.
9460
9461 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
9462
9463         * mini.c: Clean up the usage of sig->pinvoke flag. Now
9464         only calls which are made to native code use this flag.
9465
9466 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
9467
9468         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
9469         varargs methods as well.
9470         
9471         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
9472         which have save_lmf set. Reorganize methods prologs a bit.
9473
9474         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
9475         debugger to the proper place.
9476
9477 2005-10-29  Martin Baulig  <martin@ximian.com>
9478
9479         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
9480         when running inside the debugger until the debugger has support
9481         for it.
9482
9483 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
9484
9485         * mini.h: Fix a warning.
9486
9487 2005-10-24  Miguel de Icaza  <miguel@novell.com>
9488
9489         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
9490         we expose publicly, this returns the string.
9491
9492 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
9493
9494         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
9495         with fp elimination.
9496
9497 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
9498
9499         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
9500         native stacktrace using the glibc 'backtrace' function if available.
9501
9502 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
9503
9504         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
9505
9506         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
9507         handle SIGSEGVs received while in native code.
9508
9509         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
9510         code, call mono_handle_native_sigsegv which will abort the runtime
9511         after printing some diagnostics, instead of converting it into a
9512         confusing NullReferenceException.
9513
9514 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
9515
9516         * cpu-pentium.md: Remove unused opcodes.
9517
9518 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
9519
9520         * mini-amd64.h (MonoLMF): Add rsp field.
9521
9522         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
9523         the lmf too.
9524
9525 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
9526
9527         * mini-codegen.c (get_register_spilling): Fix some warnings.
9528
9529 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
9530
9531         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
9532         elimination during exception handling. Enable fp elimination by
9533         default.
9534
9535         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
9536         elimination.
9537
9538 2005-10-16  Martin Baulig  <martin@ximian.com>
9539
9540         * mini-exceptions.c
9541         (mono_debugger_run_finally): New public method for the debugger.
9542
9543 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
9544
9545         * debug-mini.c (mono_debug_init_method): Fix warning.
9546
9547         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
9548         the 'exname' parameter const to fix some warnings.
9549
9550 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
9551
9552         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
9553         introduced by the previous patch.
9554
9555 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
9556
9557         * basic-float.cs: Add test for precision of float arithmetic.
9558
9559         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
9560         when loading/storing single values from/to memory.
9561
9562         * mini.c (mono_jit_compile_method_with_opt): Create the function
9563         pointers in the correct domain.
9564
9565 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
9566
9567         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
9568         introduced by previous patch.
9569         
9570         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
9571         when out_filter_idx is NULL.
9572
9573         * mini-exceptions.c: Don't run filter clauses twice during exception
9574         handling. Fixes #75755.
9575
9576 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
9577
9578         * aot.c: Add support for ldflda wrappers.
9579
9580         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
9581         #75902.
9582
9583 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
9584
9585         * mini.c, mini.h: do not consider exception handlers blocks when
9586         setting up interface variables.
9587
9588 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
9589
9590         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
9591
9592 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
9593
9594         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
9595         causes a regression.
9596
9597         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
9598
9599 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
9600
9601         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
9602         of the OP_P definitions.
9603
9604         * TODO: Add a proposal for dealing with the CEE/OP mess.
9605
9606         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
9607         optimizations from the x86 port.
9608
9609         * cpu-amd64.md: Ditto.
9610
9611         * basic.cs basic-long.cs: Add tests.
9612
9613 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
9614
9615         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
9616         Patrik Torstensson's implementation of my exception-handling
9617         optimization idea, when the exception object is not used
9618         (bug #62150).
9619
9620 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
9621
9622         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
9623         of the mul_imm optimizations from the old jit.
9624
9625 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
9626
9627         * mini.c, liveness.c: patch by Patrik Torstensson and
9628         Zoltan Varga to improve performance in methods with
9629         exception clauses.
9630
9631 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
9632
9633         * driver.c: Remove 'Globalization' entry from --version.
9634
9635 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
9636
9637         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
9638         there is a profiler interested in JIT events.
9639
9640         * aot.c: Load profile files produced by the AOT profiling module, and
9641         reorder methods based on the profiling info. Add a 'method_order' table
9642         to the AOT file to make mono_aot_find_jit_info work with the reordered
9643         methods.
9644
9645         * mini.h: Bump AOT file version info.
9646
9647 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
9648
9649         * mini-arm.h: work around what looks like a gcc bug when optimizations
9650         are enabled.
9651
9652 2005-09-28  Raja R Harinath  <rharinath@novell.com>
9653
9654         * Makefile.am (AM_CFLAGS): Don't use += to append inside
9655         conditionals.  Use ...
9656         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
9657
9658 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
9659
9660         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
9661         to determine the amount of memory to copy when passing valuetypes.
9662
9663         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
9664         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
9665
9666 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
9667
9668         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
9669         information about aot.
9670
9671 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
9672
9673         * *.c: Replace the use of {Enter,Leave}CriticalSection with
9674         macros. This will allow a deadlock debugger to easily be plugged
9675         in.
9676
9677 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
9678
9679         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
9680
9681 2005-09-27  Raja R Harinath  <rharinath@novell.com>
9682
9683         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
9684         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
9685         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
9686         ($(arch_built)) [CROSS_COMPILING]: Error out.
9687
9688 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
9689
9690         * aot.c: Add support for the no_special_static flag for classes.
9691
9692 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9693
9694         * Reapply reverted patches.
9695
9696         * *: Revert r50174 as well.
9697
9698         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
9699
9700 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9701
9702         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
9703
9704 2005-09-23  Miguel de Icaza  <miguel@novell.com>
9705
9706         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
9707         part of the SIG_HANDLER_SIGNATURE.  
9708
9709 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
9710
9711         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
9712         statistics.
9713
9714         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
9715         introduced by previous patch.
9716
9717 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
9718
9719         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
9720         saved registers too.
9721
9722         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
9723         upon the information returned by get_call_info ().
9724         
9725         * mini-x86.c (add_float): Fix stack size calculation.
9726         (mono_arch_call_opcode): Rewrite this so it works based up the
9727         information returned by get_call_info ().
9728         (mono_arch_get_this_vret_args): Ditto.
9729
9730 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
9731
9732         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
9733         in cinfo to determine the registers which need to be used.
9734
9735 2005-09-20  Miguel de Icaza  <miguel@novell.com>
9736
9737         * driver.c (mono_main): Add --server and --desktop flags. 
9738
9739 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
9740
9741         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
9742         registers as global registers.
9743
9744         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
9745         longer needed with the new register allocator.
9746
9747         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
9748
9749         * cpu-ia64.md: Remove unused opcodes.
9750         
9751         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
9752         
9753 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
9754
9755         * cpu-amd64.md: Remove unused opcodes.
9756
9757         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
9758         needed with the new register allocator.
9759
9760         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
9761         reg-reg moves.
9762
9763 2005-09-16  Raja R Harinath  <rharinath@novell.com>
9764
9765         * Makefile.am (check-local): Don't invoke semdel-wrapper.
9766
9767 2005-09-16  Martin Baulig  <martin@ximian.com>
9768
9769         * exceptions-amd64.c
9770         (throw_exception): Don't call mono_debugger_throw_exception() if
9771         we're a rethrow - see the FIXME in the code.
9772
9773 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
9774
9775         * mini.c (mono_init_exceptions): This only works on some architectures.
9776         
9777 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9778
9779         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
9780         on ia64.
9781
9782         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
9783
9784         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
9785         now in mini-exceptions.c.
9786
9787 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
9788
9789         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
9790         now in mini-exceptions.c.
9791
9792 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9793
9794         * exceptions-x86.c: Applied patch from Patrik Torstensson 
9795         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
9796
9797         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
9798         code into mini-exceptions.c. Add some assertions to it.
9799
9800 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
9801
9802         * aot.c (emit_section_change): Applied patch from "The Software Team" 
9803         (<software@solmersa.com>). Fix as errors on windows.
9804
9805 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9806
9807         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
9808         method info into the LMF.
9809
9810 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9811         
9812         * mini-ia64.c: Add proper unwind info for method epilogs.
9813
9814         * exceptions-ia64.c: Add some code to help debugging.
9815         
9816         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
9817
9818         * mini-exceptions.c: Fix warning.
9819
9820 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9821
9822         * mini.c: Really fix build.
9823
9824         * mini-x86.c mini-amd64.c: Fix build.
9825
9826 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9827
9828         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
9829
9830         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
9831         some Interlocked methods as intrinsics.
9832
9833         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
9834         for Thread methods as well.
9835
9836         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
9837
9838         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
9839
9840         * mini-ia64.c mini-x86.c mini-amd64.c 
9841         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
9842         OP_MEMORY_BARRIER.
9843         
9844         * mini.c (mono_init_exceptions): Fix build breakage.
9845
9846 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
9847
9848         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
9849         of instructions. Use the new ia64_unw_op macros for emitting unwind
9850         info.
9851
9852         * mini.c (mono_init_exceptions): Initialize exception handling
9853         related trampolines at startup.
9854
9855 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
9856
9857         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
9858
9859 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
9860
9861         * mini.c: Handle type loading errors gracefully during compilation and
9862         throw the appropriate exception.
9863
9864 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
9865
9866         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
9867         for the mono binary.
9868
9869 2005-09-09  Martin Baulig  <martin@ximian.com>
9870
9871         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
9872         the release.
9873
9874 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9875
9876         * mini-arm.h: use emulation for conv.r.un for the release.
9877
9878 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9879
9880         * mini-arm.c, objects.cs: more fixes and tests for them.
9881
9882 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9883
9884         * mini-arm.c: align structures to at least 4 bytes to be able
9885         to keep our current optimized memcpy.
9886
9887 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
9888
9889         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
9890
9891 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9892
9893         * mini.c: ignore SIGPIPE.
9894
9895 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
9896
9897         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
9898
9899         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
9900
9901 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
9902
9903         * mini.h: Add prototype for mono_allocate_stack_slots_full.
9904
9905 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9906
9907         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
9908         exception handling support.
9909         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
9910         patch by Brian Koropoff <briank@marakicorp.com>).
9911
9912 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
9913
9914         * mini.c: revert another 'optimization' which breaks when
9915         items on the eval stack need to be saved at a basic block end
9916         (bug #75940).
9917
9918 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9919
9920         * jit-icalls.c: for arrays, ensure we always provide
9921         lower bounds.
9922
9923 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
9924
9925         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
9926         
9927         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
9928
9929 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
9930
9931         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
9932         arguments in their original register.
9933
9934 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
9935
9936         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
9937         memset/memcpy.
9938
9939         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
9940         when ssapre is enabled.
9941
9942         * inssel-long.brg: Fix bug in previous patch.
9943
9944         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
9945         multiplication by a constant.
9946
9947 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
9948
9949         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
9950         icc.
9951
9952         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
9953         saving registers.
9954
9955 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
9956
9957         * inssel-arm.brg: apply changes tested by Brian Koropoff
9958         <briank@marakicorp.com>.
9959
9960 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
9961
9962         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
9963         
9964 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
9965
9966         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
9967         to the same register if dreg is just a base register.
9968         (print_ins): Improve printing of membase opcodes.
9969
9970         * inssel-x86.brg: Add optimized ldind(reg) rules.
9971
9972         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
9973
9974 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
9975
9976         * mini.c: when running under valgrind, set the stack bottom for
9977         the GC at the actual approximate stack for the app (fixes running
9978         mono with valgrind).
9979
9980 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
9981
9982         * mini.c: do no break at the first valuetype to init found
9983         (fixes bug #75791).
9984
9985 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
9986
9987         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
9988
9989 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
9990
9991         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
9992
9993 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
9994
9995         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
9996
9997 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9998
9999         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
10000
10001         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
10002         code.
10003
10004         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
10005         code.
10006
10007         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
10008         methods.
10009
10010 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
10011
10012         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
10013
10014 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10015
10016         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
10017         in the tail recursion optimization.
10018
10019         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
10020         debug info into the assembly file.
10021
10022         * iltests.il: Add test for filter regions.
10023
10024         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
10025         initial stack of filter regions. Fixes #75755.
10026
10027 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
10028
10029         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
10030         stack requirements.
10031
10032 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10033
10034         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
10035         the check for an already compiled method on non-ia64 platforms.
10036         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
10037         proper domain.
10038
10039         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
10040
10041         * inssel-x86.brg: Add some optimized call rules.
10042
10043 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
10044
10045         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
10046         method here.
10047
10048         * mini.h mini-trampolines.c: Pass the trampoline argument to 
10049         mono_arch_patch_delegate_trampoline.
10050
10051         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
10052
10053         * mini-trampolines.c: Fix build.
10054
10055         * mini-amd64.h: Add delegate trampolines.
10056
10057         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
10058
10059         * inssel-amd64.brg: Add optimized call rules.
10060         
10061         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
10062
10063         * inssel-ia64.brg: Add optimized ldind(reg) rules.
10064
10065 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
10066
10067         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
10068         change.
10069
10070         * mini-ia64.c: Remove LMF fixmes.
10071
10072         * mini-ia64.h: Remove most fields from LMF.
10073
10074         * inssel-ia64.brg (stmt): Fix unaligned access errors.
10075
10076         * mini-trampolines.c: Add support for IA64 function descriptors.
10077
10078         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
10079         for IA64 function descriptors.
10080
10081 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
10082
10083         * tramp-arm.c: patch the vtable for virtual calls. Added
10084         support code to register/unregister the LMF.
10085         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
10086         more LMF work.
10087
10088 2005-08-19  Dick Porter  <dick@ximian.com>
10089
10090         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
10091         bit value if needed.
10092
10093 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
10094
10095         * mini.c (mini_get_method): Move handling of wrapper data here.
10096
10097         * mini.c (mono_method_to_ir): Add support for dynamic methods.
10098
10099         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
10100         virtual.
10101
10102         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
10103         bblock->code does not remain empty.
10104
10105 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
10106
10107         * arrays.cs: Add regression test for #75832.
10108
10109         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
10110         rules. Fixes #75832.
10111
10112         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
10113         instruction scheduling.
10114
10115 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
10116
10117         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
10118
10119 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
10120
10121         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
10122
10123         * mini-codegen.c: Fix VC build.
10124
10125         * cpu-pentium.md: Increase length of atomic_exhange_i4.
10126
10127 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10128
10129         * mini.h: fix signature for mono_register_opcode_emulation.
10130
10131 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
10132
10133         * mini.c: Get rid of most of the helper_sig_... constants using
10134         mono_create_icall_signature ().
10135
10136 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
10137
10138         * jit-icalls.c (helper_ldstr): New helper function.
10139
10140         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
10141
10142         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
10143         throw, load the string using a helper call instead of creating a string object.
10144
10145         * aot.c: Update after LDSTR changes.
10146
10147         * mini.h: Bump AOT file version.
10148         
10149         * aot.c: Save class size info into the AOT file. Print more statistics during
10150         compilation.
10151
10152         * mini.h: Bump AOT file version.
10153
10154         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
10155         ordering of disasm cases. Fixes #74957.
10156
10157 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
10158
10159         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
10160         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
10161         the generic code needed for the ARM port.
10162
10163 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
10164
10165         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
10166         inssel-arm.brg: more ARM features and fixes.
10167
10168 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
10169
10170         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
10171         ARM port work in progress.
10172
10173 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
10174
10175         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
10176
10177         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
10178
10179         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
10180
10181         * inssel.brg (mini_emit_memset): Add support for unaligned access.
10182
10183         * *-ia64.*: Ongoing IA64 work.
10184         
10185         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
10186
10187 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
10188
10189         * TODO: Remove out-of-data todo stuff.
10190
10191         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
10192         dead code.
10193
10194         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
10195
10196         * mini.h: Bump corlib version.
10197
10198 2005-07-27  Martin Baulig  <martin@ximian.com>
10199
10200         * mini-codegen.c
10201         (create_copy_ins): Added `const unsigned char *ip' argument; set
10202         `copy->cil_code' from it.
10203
10204 2005-07-27  Martin Baulig  <martin@ximian.com>
10205
10206         * mini-exceptions.c (mono_handle_exception): Don't call
10207         mono_debugger_handle_exception() for filters.
10208
10209 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
10210
10211         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
10212         as well.
10213
10214 2005-07-26  Martin Baulig  <martin@ximian.com>
10215
10216         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
10217
10218         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
10219         helper_compile_generic_method() if the method is actually virtual
10220         and non-final.
10221
10222 2005-07-26  Martin Baulig  <martin@ximian.com>
10223
10224         * mini.c
10225         (trampoline_code): Renamed to `mono_trampoline_code' and made it
10226         public; this is now accessed directly by the debugger.
10227         (mono_generic_trampoline_code): Removed.
10228
10229         * debug-mini.c
10230         (mono_debug_init_method): Also add interncalls and wrappers.
10231
10232 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
10233
10234         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
10235
10236 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
10237
10238         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
10239
10240 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
10241
10242         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
10243
10244 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10245
10246         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
10247         getting TLS offsets on AMD64 too.
10248
10249 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
10250
10251         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
10252
10253 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
10254
10255         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
10256         inssel-arm.brg, mini-arm.h: ARM port work in progress.
10257
10258 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10259
10260         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
10261
10262         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
10263         to mini.c.
10264
10265         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
10266         mono_sparc_is_virtual_call ().
10267         
10268         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
10269
10270         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
10271         trampoline parameters.
10272
10273         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
10274         
10275         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
10276         to mono_arch_get_vcall_slot_addr.
10277
10278         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
10279         trampoline code.
10280
10281         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
10282
10283 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10284
10285         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
10286
10287 2005-07-19  Martin Baulig  <martin@ximian.com>
10288
10289         * exceptions-amd64.c (throw_exception): Call
10290         mono_debugger_throw_exception() here like we're doing it on i386.
10291
10292 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10293
10294         * mini-ia64.c: Add optimized TLS access support.
10295
10296 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
10297
10298         * mini-exceptions.c: Ongoing IA64 work.
10299
10300         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
10301
10302         * mini.c: Use the default optimization set when embedding. Fixes
10303         #75194.
10304
10305 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
10306
10307         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
10308         of trampolines to a separate file.
10309
10310         * mini-trampolines.c: New file.
10311
10312         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
10313         separate file.
10314         
10315         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
10316         amd64/ia64 code.
10317
10318         * mini-codegen.c: Fix cygwin build.
10319
10320 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
10321
10322         * mini.c: Add some minor changes needed by the IA64 port.
10323
10324         * *-ia64.*: Ongoing IA64 work.
10325
10326 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
10327
10328         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
10329         trampolines into arch-independent and arch-dependent parts.
10330
10331         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
10332
10333 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
10334
10335         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
10336
10337         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
10338         the xp-regalloc-branch for amd64.
10339
10340         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
10341         xp-regalloc-branch for x86.
10342
10343 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
10344
10345         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
10346
10347 2005-07-06  Martin Baulig  <martin@ximian.com>
10348
10349         * mini.c
10350         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
10351         (mono_jit_runtime_invoke): Likewise.
10352
10353 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
10354
10355         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
10356         on x86 too.
10357         
10358         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
10359         without loading their metadata. Reorganize the file format so exception handling+
10360         debug info is kept separate from normal method info. Create MonoJitInfo 
10361         structures for methods lazily.
10362
10363         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
10364         loading metadata.
10365         (x86_class_init_trampoline): Patch AOT class init trampolines too.
10366
10367         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
10368
10369         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
10370         in AOT code.
10371
10372         * mini.h: Bump AOT file version.
10373
10374 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
10375
10376         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10377
10378 2005-07-01  Raja R Harinath  <rharinath@novell.com>
10379
10380         * Makefile.am (check-local): Call semdel-wrapper.
10381
10382 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
10383
10384         * mini-x86.c: Revert the last change as it seems to break the build..
10385
10386 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
10387
10388         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10389         
10390         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
10391
10392 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
10393
10394         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
10395         outside of the macro, so strange stuff doesn't happen with gcc4
10396         (NEW_AOTCONST_TOKEN): Likewise.
10397
10398 2005-06-28  Martin Baulig  <martin@ximian.com>
10399
10400         * mini.c (mini_class_is_system_array): New static method; use this
10401         instead of `klass->parent == mono_defaults.array_class' everywhere
10402         since this also works for the new generic array class.
10403
10404 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
10405
10406         * inssel.brg: Remove warnings.
10407
10408 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
10409
10410         * mini-ia64.c: Ongoing IA64 work.
10411
10412         * basic-float.cs: Add float->i1 conversion test.
10413
10414         * iltests.il: Add conv.u4 test.
10415
10416 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
10417
10418         * inssel-long.brg: Fix bug caused by last change.
10419
10420 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
10421
10422         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
10423         BSDs.  Allows the x86 JIT to work on OSX86
10424
10425 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
10426
10427         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
10428         u4->i8 conversion.
10429
10430         * mini-ia64.c: Ongoing IA64 work.
10431
10432 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
10433
10434         * mini-ia64.c: Ongoing IA64 work.
10435
10436         * driver.c: Clean up jit_code_hash as well when using --regression.
10437
10438         * inssel-long.brg: Fix long->i4/u4 conversion rules.
10439
10440         * basic-long.cs: Add tests for long->u4 conversion.
10441
10442 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
10443
10444         * mini.c: Take mono_get_domainvar out of macros. This makes sure
10445         that we do not depend on undefined C behavior: the order stuff
10446         gets evaluated within an expression. Fixes mono when compiled on
10447         GCC 4.
10448
10449 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
10450
10451         * *-ia64.*: Ongoing IA64 work.
10452
10453         * aot.c: Lower memory usage while loading AOT methods.
10454
10455         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
10456
10457         * mini.h: Bump AOT file format version.
10458
10459 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
10460
10461         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
10462
10463 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
10464
10465         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
10466         not on callee assembly). Fixed some comments.
10467
10468 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
10469
10470         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
10471         it gets proper disassembly.
10472         (emit_method_info): Remove some dead code.
10473
10474         * mini.c (mini_method_compile): Allways allocate the GOT var in
10475         mono_method_to_ir for emulating opcodes.
10476
10477 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
10478
10479         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
10480         before freeing the code memory. Fixes #74990.
10481
10482         * objects.cs: Add regression test for #74992.
10483
10484         * liveness.c: Extend live ranges of arguments to the beginning of the
10485         method. Fixes #74992.
10486
10487         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
10488         so it points into the faulting instruction.
10489
10490 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
10491
10492         * jit-icalls.c (mono_imul_ovf): Add exception handling.
10493
10494         * *-ia64.*: Ongoing IA64 work.
10495
10496         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
10497
10498 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
10499
10500         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
10501
10502         * *-ia64.*: Ongoing IA64 work.
10503
10504 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
10505
10506         * basic-long.cs: Add tests for add/sub.ovf.
10507
10508         * basic.cs: Add tests for sub.ovf.
10509
10510         * *-ia64.*: Ongoing IA64 work.
10511
10512 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
10513
10514         * *-ia64.*: Ongoing IA64 work.
10515
10516         * basic.cs: Add conv.ovf.i4.un test.
10517
10518 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
10519
10520         * mini.c: (remove_block_if_useless) Fixed bug 75061.
10521         
10522 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10523
10524         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
10525
10526 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
10527
10528         * *-ia64.*: Ongoing IA64 work.
10529
10530 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10531
10532         * trace.[ch]:
10533         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
10534
10535 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
10536
10537         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
10538
10539 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
10540
10541         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
10542
10543         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
10544         of a call is callable by a near call.
10545
10546 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
10547
10548         * mini-ia64.c: Ongoing IA64 work.
10549
10550 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
10551
10552         * genmdesc.c: Make the generated array non-static.
10553
10554         * inssel-long.brg: Fix LSHR_IMM rule.
10555
10556         * *-ia64.*: Ongoing IA64 work.
10557
10558         * *-ia64.*: Ongoing IA64 work.
10559
10560 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10561
10562         * *-ia64.*: Ongoing IA64 work.
10563
10564         * *-ia64.*: Ongoing IA64 work.
10565         
10566         * mini-ia64.c: Ongoing IA64 work.
10567
10568         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
10569
10570 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10571
10572         * objects.cs basic-calls.cs: Move some tests to objects.cs.
10573         
10574         * objects.cs basic-long.cs: Move some tests to objects.cs.
10575
10576 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
10577
10578         * *-ia64.*: Ongoing IA64 work.
10579
10580         * iltests.il: Add a new test.
10581
10582         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
10583         newobj. Fixes #75042.
10584
10585 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
10586
10587         * *-ia64.*: Ongoing IA64 work.
10588         
10589         * *-ia64.*: Ongoing IA64 work.
10590         
10591         * *-ia64.*: Ongoing IA64 work.
10592
10593         * basic.cs objects.cs: Move tests accessing static variables as well.
10594
10595         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
10596
10597 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
10598
10599         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
10600
10601         * driver.c: Always print failed tests.
10602
10603         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
10604         frame pointer.
10605
10606         * *ia64*: Ongoing IA64 work.
10607
10608 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
10609
10610         * basic.cs: Add tests for add.ovf. Fix warnings.
10611
10612 2005-05-18  Miguel de Icaza  <miguel@novell.com>
10613
10614         * driver.c (mono_main): Avoid crash if no argument is passed to
10615         --break;  Do not use g_error, but f_printf.   And fix all other
10616         ocurrences of the same crash.
10617
10618 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
10619
10620         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
10621         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
10622         Fixes #74742.
10623
10624 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
10625
10626         * *-ia64.*: Add beginnings of IA64 backend.
10627
10628         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
10629
10630 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
10631
10632         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
10633         Fixes #74925.
10634
10635         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
10636
10637         * mini-amd64.c: Fix a warning.
10638
10639 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
10640
10641         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
10642         in float_neg. Fixes #74897.
10643
10644         * mini-amd64.c (emit_call): Fix another near call bug.
10645
10646 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
10647
10648         * declsec.c: Keep the appdomain information in the structure. Added a 
10649         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
10650         value gets overwritten).
10651         * declsec.h: Set the default MonoArray for the the stack to 6. Added
10652         an MonoAppDomain member to MonoSecurityFrame.
10653         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
10654         used in the stack walk. Now use a MonoArray which grow (double) when
10655         it gets full.
10656
10657 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
10658
10659         * mini.c: Re-enabled runtime cleanup, since running threads should
10660         now properly stop when exiting.
10661
10662 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
10663
10664         * mini-codegen.c: New file contaning the arch-independent local
10665         register allocator. Not used by any architectures yet.
10666
10667         * mini.h linear-scan.c: Merge some changes from the 
10668         mini-xp-local-regalloc branch.
10669
10670 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
10671
10672         * mini-amd64.c (emit_call): Fix calls to native functions when the
10673         runtime is compiled as a shared library. Fixes #74756.
10674
10675         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
10676         on a literal field. Fixes #74751.
10677
10678 2005-04-25  Raja R Harinath  <rharinath@novell.com>
10679
10680         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
10681
10682 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
10683
10684         * objects.cs: Add missing null casting test.
10685
10686 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
10687
10688         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
10689         in wrapper methods. Also rename 'address' variable to 'offset'.
10690
10691 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
10692
10693         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
10694         warnings.
10695         
10696         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
10697
10698         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
10699         work on windows.
10700
10701 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10702
10703         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
10704
10705 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10706
10707         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
10708         just the last bytes.
10709
10710 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10711
10712         * aot.c (mono_compile_assembly): Fix warning.
10713
10714         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
10715         by the _MSC_VER stuff.
10716
10717 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
10718
10719         * inssel-long.brg: Fix #74588.
10720
10721         * cpu-amd64.md: Fix #74591.
10722
10723         * iltests.il: Add new regression tests.
10724
10725 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
10726
10727         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
10728         valuetype.
10729
10730 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
10731
10732         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
10733
10734         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
10735         from Bill Middleton <flashdict@gmail.com>.
10736
10737 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
10738
10739         * arrays.cs: Add new regression test. Fix warnings.
10740
10741 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
10742
10743         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
10744         and leakage in CKFINITE.
10745
10746         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
10747         this to a null op since it is called on amd64 too.
10748
10749         * exceptions-amd64.c (get_throw_trampoline): Align stack.
10750
10751         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
10752         body since this is not used on amd64.
10753         
10754         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
10755
10756         * mini-amd64.c: Remove obsolete fixmes.
10757
10758         * mini.c (print_method_from_ip): Fix debugging support.
10759
10760 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10761
10762         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
10763         so that expressions that don't give much gain are not reduced.
10764         * ssapre.h: Likewise.
10765
10766 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
10767
10768         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
10769
10770         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
10771
10772         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
10773
10774 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
10775
10776         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
10777
10778         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
10779
10780 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
10781
10782         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
10783         stack touching.
10784
10785         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
10786
10787         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
10788
10789         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
10790
10791         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
10792         MONO_ARCH_USE_SIGACTION. Fixes #74252.
10793
10794         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
10795
10796         * mini-x86.c: Fix up stack overflow handling.   
10797
10798         * exceptions.cs: Add new regression test.
10799
10800 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
10801
10802         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
10803         mono_jit_thread_attach.
10804
10805         * mini.c (mono_method_to_ir): Verify called method is not abstract.
10806
10807 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10808
10809         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
10810         avoid calling constructors using callvirt.
10811
10812         * inssel.brg: Fix #74073.
10813
10814 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
10815
10816         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
10817         compilation with non-GCC compilers.
10818         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
10819         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
10820
10821 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
10822
10823         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
10824         klass->interface_offsets (will likely fix bug#74073).
10825
10826 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10827
10828         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
10829
10830 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
10831
10832         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
10833         to amd64_div_reg_size ().
10834         
10835         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
10836
10837 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
10838
10839         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
10840
10841 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10842
10843         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
10844
10845 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10846
10847         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
10848         
10849         * mini.c (mono_precompile_assembly): Load and precompile referenced
10850         assemblies as well. Fixes #74015.
10851
10852 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
10853
10854         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
10855
10856 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
10857
10858         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
10859         a lot of checks and (anyway) permissions cannot work until corlib is 
10860         loaded.
10861
10862 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
10863
10864         * mini-ppc.c: fixed ABI issue on sysv/ppc.
10865
10866 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
10867
10868         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
10869         calls (fixes bug#72824).
10870
10871 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10872
10873         * mini.c: fix tail recursion elimination (see test in bug#73936).
10874
10875 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
10876
10877         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
10878         some fp functions in sse2 mode.
10879
10880 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
10881
10882         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
10883
10884 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
10885
10886         * mini.h mini.c: Add mono_get_jit_tls_key ().
10887
10888         * mini-x86.c: Enable fast TLS support on windows.
10889
10890 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
10891
10892         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
10893         * mini.c: Check for p/invoke method when generating code. If a
10894         p/invoke method, or it's class, isn't decorated with [Suppress
10895         UnmanagedCodeSecurity] then generate code to call System.Security.
10896         UnmanagedDemand (only if the security manager is active).
10897
10898 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10899
10900         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
10901         last change as it seems to cause strange crashes.
10902         
10903 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10904
10905         * *.c: handle unsafe function pointers where needed.
10906
10907 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10908
10909         * mini.c (mono_jit_free_method): Remove the fixme too.
10910
10911 2005-03-15  Miguel de Icaza  <miguel@novell.com>
10912
10913         * mini.c: As discussed, make the code actually free the delegate
10914         thunk now, to enable the debugging of delegate problems, use
10915         MONO_DEBUG=1 when running Mono. 
10916
10917         This takes also care of parts of the leaks as seen by Joe.
10918
10919 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
10920
10921         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
10922         thread_tls_offset calculation.
10923
10924 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
10925
10926         * declsec.c: Reworked linkdemand checks for icall. The previous code
10927         was using the declaration code (untrusted) and didn't work as expected
10928         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
10929         specific case.
10930
10931 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
10932
10933         * iltests.il: Add new localloc test.
10934
10935         * mini-amd64.c: Handle large stack allocations the same way as on
10936         windows if stack overflow handling is working.
10937         
10938         * mini-amd64.c: Allocate the signal stack using mmap.
10939
10940         * mini.c (sigsegv_signal_handler): Fix reading of context.
10941
10942         * mini-exceptions.c: Fix up stack overflow handling.
10943
10944         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
10945
10946         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
10947
10948         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
10949
10950         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
10951
10952         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
10953         tramp_init functions as they are no longer needed.
10954
10955 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
10956
10957         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
10958         
10959         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
10960
10961         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
10962         
10963         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
10964         support that now.
10965
10966         * mini-ops.h: Add OP_LMUL_IMM.
10967
10968         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
10969         long mul/div opcodes as intrinsic.
10970
10971         * mini-amd64.c (emit_call): Handle the case when the callee might be
10972         an AOT method.
10973
10974 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
10975
10976         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
10977         extra safe.
10978         
10979         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
10980
10981         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
10982
10983 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
10984
10985         * mini.c (mono_codegen): Don't leak here, to help people running
10986         monogrind.
10987
10988 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
10989
10990         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
10991         conversions in sse2 mode.
10992
10993         * basic-float.cs: Add regression test.
10994         
10995         * mini-amd64.c: Reenable sse2.
10996
10997 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10998
10999         * mini-amd64.c: Disable sse2 until some regressions are fixed.
11000
11001 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
11002
11003         * driver.c: Copyright text should include 2005.
11004         
11005 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
11006
11007         * cpu-amd64.md (load_membase): Fix more max lengths.
11008
11009 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
11010
11011         * cpu-amd64.md (load_membase): Fix max length.
11012
11013         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
11014
11015         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
11016
11017         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
11018         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
11019
11020         * basic-float.cs: Add rounding regression test.
11021
11022         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
11023
11024 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
11025
11026         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
11027         structures in registers for pinvoke wrappers.
11028
11029 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
11030
11031         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
11032
11033 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
11034
11035         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
11036         wrapper to mono_jit_thread_attach.
11037
11038         * mini.c (mini_jit_thread_attach): New jit icall.
11039
11040         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
11041         native->managed wrappers.
11042
11043         * exceptions.cs: Add new regression test.
11044
11045         * mini.c (optimize_branches): Check regions in the cbranch to throw
11046         block case as well. Fixes #73242.
11047
11048 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11049
11050         * mini.c: thread safety fixes.
11051
11052 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
11053
11054         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
11055         patching stuff, since delegates use jump trampolines so there is
11056         no caller.
11057
11058         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
11059         jump trampolines.
11060         
11061         * tramp-amd64.c: Fix build.
11062
11063         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
11064         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
11065
11066         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
11067         Rename this to mono_arch....
11068         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
11069
11070         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
11071
11072         * mini-amd64.c (emit_call): If both the caller and the callee is
11073         guaranteed to have 32 bit addresses, emit a normal call.
11074
11075         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
11076
11077         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
11078         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
11079         method_ptr inside delegates.
11080
11081 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
11082
11083         * mini.c (mono_jit_free_method): Free the method info even if the native code is
11084         invalidated. Fixes #73001.
11085
11086         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
11087
11088         * mini-x86.c: Only use stdcall for pinvokes on windows.
11089
11090 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
11091
11092         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
11093         * mini-x86.c: remove unreliable __thread var offset detection,
11094         use the correct accessors and enable by default.
11095
11096 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
11097
11098         * mini.c (mono_jit_free_method): Fix memory leak.
11099
11100 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
11101
11102         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
11103
11104 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
11105
11106         * cpu-amd64.md: Fix lengths of atomic opcodes.
11107
11108 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
11109
11110         * driver.c: try to not imply using ICU is any good.
11111
11112 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
11113
11114         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
11115         functions as inline ops.
11116
11117         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
11118         some Interlocked functions as inline ops.
11119
11120         * mini.c (move_basic_block_to_end): Fix bug in last patch.
11121
11122         * mini.h (MonoBasicBlock): Reorganize fields a bit.
11123
11124         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
11125
11126         * mini.c: Add support for OP_NOT_TAKEN.
11127
11128         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
11129         structures in registers for pinvoke wrappers.
11130
11131         * mini-amd64.c: Fix warnings.
11132
11133 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
11134
11135         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
11136
11137         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
11138
11139         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
11140         address instead of loading the address from it.
11141
11142         * mini-x86.c: Add support for returning small structs in registers
11143         on Win32. Fixes part of #70864.
11144         
11145 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
11146
11147         * trace.c (get_token): Improve error checking.
11148
11149 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
11150
11151         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
11152
11153 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
11154  
11155         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
11156         it can be reused for MonoClass.
11157         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
11158         _LINKDEMAND.
11159
11160 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
11161
11162         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
11163         instead of a MonoReflectionMethod. The method information wasn't used
11164         when displaying SecurityException details (but will be now).
11165
11166 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
11167
11168         * Makefile.am : windows build fix.
11169
11170 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
11171
11172         * iltests.il: Add new regression test.
11173
11174         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
11175         #72522.
11176
11177 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
11178  
11179         * mini.c: Moved linkdemand check into helper function check_linkdemand
11180         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
11181         LDFTN, LDVIRTFTN).
11182
11183 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
11184
11185         * declsec.c: Added statistics counter for different kinds of 
11186         LinkDemands.
11187         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
11188         (and commented) declaration.
11189         * mini.c: Added statistics counter for security Demand code 
11190         generation. Added display of security statistics.
11191
11192 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
11193
11194         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
11195         Fix compilation errors under gcc-2.95.
11196
11197 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
11198
11199         * mini.c, driver.c: Use the new jit trampoline hashtable
11200
11201 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11202
11203         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
11204
11205 2005-02-11  Martin Baulig  <martin@ximian.com>
11206
11207         * debug-mini.c (mono_debug_close_method): Free the line number array.
11208
11209 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
11210
11211         * aot.c: Break up large methods into smaller ones. Share GOT slots for
11212         icalls.
11213
11214         * mini.h: Bump AOT file format version. 
11215
11216 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
11217
11218         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
11219         APTC and P/Invoke.
11220         * declsec.h: Added macros to get/set lazyly initialized security 
11221         informations about assemblies. Added new enum for different type of
11222         possible LinkDemand violation. Added function to check LinkDemands.
11223         * mini.h: Added a field to MonoCompile to hold any security violation
11224         detected when JITting a method (so it can be thrown later).
11225         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
11226         and CEE_CALLVIRT. Added code to throw exception at the end of
11227         mini_method_compile (note: the exception is unhandled right now).
11228
11229 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
11230
11231         * mini.c, jit-icalls.c: use the managed implementation of
11232         memset for initobj and memset, to avoid managed <-> unmanaged
11233         transitions.
11234
11235 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
11236
11237         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
11238         optimization if it would need a GOT var.
11239
11240         * basic.cs: Add tests for constant propagation and switch statements.
11241
11242         * ssa.c: Fix out-of-range constant propagation and switch statements.
11243
11244 2005-02-09    <vargaz@freemail.hu>
11245
11246         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
11247
11248 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
11249
11250         * cpu-amd64.md (load_membase): Fix max length of load_membase.
11251
11252 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11253
11254         * mini.c: update to new signature of mono_class_get_allocation_ftn().
11255
11256 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
11257
11258         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
11259         arithmetic operations.
11260
11261 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
11262
11263         * mini-ppc.c: add a workaround for broken user code that
11264         DllImports vararg functions with non-vararg signatures.
11265
11266 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
11267
11268         * mini.c (mono_jit_compile_method_inner): Add detection and a 
11269         meaningfull error message for assemblies written in Managed C++.
11270
11271         * tramp-amd64.c mini-amd64.h: Add support for 
11272         create_trampoline_from_token ().
11273
11274         * aot.c mini-x86.c abcremoval.c: Applied patch from
11275         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
11276
11277 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
11278
11279         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
11280         which takes a MonoImage/token as parameter instead of a MonoMethod.
11281
11282         * aot.c: Use the new trampoline for initializing vtables.
11283
11284         * aot.c: Add support for ldfld/stfld_remote wrappers.
11285
11286         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
11287         rules for compare <MEM>, IMM.
11288
11289         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
11290
11291         * aot.c: Handle inherited finalizers correctly.
11292
11293 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
11294
11295         * inssel.brg (stmt): Add a missing _setup_... ().
11296
11297         * aot.c: Save some parts of the class state to the AOT file and use it
11298         to recompute that state when a class is initialized.
11299
11300         * mini.c: Install AOT hooks into the runtime.
11301
11302         * mini.h: Bump AOT file format version.
11303         
11304         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
11305         Fixes #72148.
11306
11307         * iltests.il: Add new test.
11308
11309 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
11310
11311         * mini.c: fix typo.
11312
11313 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
11314
11315         * mini.c: setup the statistical profiler in the thread attach
11316         callback to cope with the new single thread code.
11317
11318 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
11319
11320         * mini-ppc.c: ensure we have enough room for the profiler
11321         calls (fixed bug#72084).
11322
11323 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
11324
11325         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
11326         it.
11327
11328 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11329
11330         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
11331
11332 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11333
11334         * ssapre.c: Fixed an issue with down safety (this allows IronPython
11335         to succesfully execute parrotbench).
11336         * ssapre.h: Likewise.
11337
11338 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11339
11340         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
11341         variable for stores to method arguments (fixes a SSAPRE issue).
11342
11343 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11344
11345         * mini.c: handle value types in dup, fixes gen-112.cs.
11346
11347 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
11348
11349         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
11350         sequence for calls in dynamic methods to avoid thunks.
11351
11352 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
11353
11354         * mini.c: correctly remove dynamic methods from the hashtable.
11355
11356 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11357
11358         * driver.c: Disabled SSAPRE until fix the bug that appears
11359         in IronPython's parrotbench.
11360
11361 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
11362
11363         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
11364
11365         * mini.c (mono_method_to_ir): Revert the previous change.
11366         
11367         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
11368         when AOT compiling.
11369
11370         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
11371         mono_jit_info_table_find () etc. when running under valgrind.
11372
11373         * inssel.brg: Fix warnings.
11374
11375         * mini-exceptions.c: Fix warnings.
11376
11377 2005-01-31  Martin Baulig  <martin@ximian.com>
11378
11379         * driver.c (compile_all_methods_thread_main): Don't try to compile
11380         generic methods or anything which has type parameters.
11381
11382 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
11383
11384         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
11385
11386         * TestDriver.cs: Add --verbose flags.
11387
11388         * graph.c ssa.c: Fix 64 bit warnings.
11389         
11390         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
11391         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
11392         Fix 64 bit warnings.
11393
11394         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
11395         variable not spotted by gcc.
11396         
11397         * mini-amd64.c inssel-amd64.brg: Applied patch from  
11398         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
11399         X86_COMPARE_MEMBASE opcodes.
11400
11401         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
11402
11403 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
11404
11405         * *: MonoMethod->signature might be NULL now. You *MUST* use
11406         mono_method_signature.
11407
11408 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
11409
11410         * driver.c (compile_all_methods_thread_main): Compile the methods
11411         without invoking cctors.
11412
11413 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11414
11415         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
11416         * basic-calls.cs: test for the above.
11417
11418 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
11419
11420         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
11421         MonoJitInfo changes.
11422
11423 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
11424
11425         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
11426         eagerly if it contains dynamic methods.
11427         
11428         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
11429
11430         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
11431         trace, it is now computed by an icall from trace_ips.
11432         
11433         * mini-exceptions.c: Fix a warning.
11434
11435 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
11436
11437         * mini-exceptions.c: don't bother getting stack trace info if
11438         it's not going to be used.
11439
11440 2005-01-27  Raja R Harinath  <rharinath@novell.com>
11441
11442         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
11443         ssapre-mini-ops.h.
11444
11445 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
11446
11447         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
11448
11449         * aot.c: Avoid calling mono_method_get_header () if not needed.
11450
11451         * mini.h: Bump AOT file format version.
11452         
11453         * mini.c (mono_emit_native_call): Allocate a GOT var here.
11454
11455         * mini.c (mono_print_tree): Print more info for calls.
11456
11457 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
11458
11459         * declsec.h: Remove warning by adding missing include for marshal.h
11460
11461 2005-01-26  Martin Baulig  <martin@ximian.com>
11462
11463         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
11464         `ip' twice.
11465
11466 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
11467
11468         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
11469         flags.
11470
11471         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
11472
11473         * aot.c (mono_compile_assembly): Fix a warning.
11474
11475 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
11476
11477         * declsec.c: Look for security attributes on the original MonoMethod 
11478         (and not the wrapped one). This fix permissions on icalls.
11479
11480 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
11481
11482         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11483
11484         * mini.c (mono_allocate_stack_slots): Add a fixme.
11485
11486         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11487
11488 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11489
11490         * inssel.brg: optimize casts of sealed types (more
11491         optimizations waiting for fixes in remoting).
11492
11493 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
11494
11495         * inssel.brg (stmt): Add another dummy rule.
11496
11497         * driver.c: Fix warnings.
11498
11499         * driver.c (mono_main): If running under valgrind, instruct glib to use
11500         the system allocation functions so valgrind can track the memory
11501         allocated by the g_... functions.
11502
11503         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
11504
11505         * mini-ops.h: Add OP_DUMMY_STORE opcode.
11506
11507         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
11508
11509         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
11510         variables in try regions.
11511
11512         * mini.c (mini_method_compile): Don't disable optimizations on large
11513         methods when AOT compiling.
11514
11515         * mini.c (mono_allocate_stack_slots): New arch independent method to 
11516         allocate stack slots. Not yet used.
11517
11518 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
11519
11520         * debug-mini.c (mono_debug_close_method): Plug some leaks.
11521
11522 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
11523
11524         * mini-ppc.c: make the branch info relative as the code
11525         buffer can be reallocated.
11526
11527 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
11528
11529         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
11530         * driver.c: Removed the AOT/security restriction. Now initialize the
11531         security manager (in metadata) if --security is used.
11532         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
11533         rather than the pointer to declarative security, when AOT is used.
11534
11535 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
11536
11537         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
11538         basic blocks, reduced intrinsic exception throwing code size.
11539
11540 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
11541
11542         * driver.c (mini_usage): Reorder the usage screen.
11543
11544 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
11545
11546         * mini.c (mono_resolve_patch_target): Fix warning.
11547
11548 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
11549
11550         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
11551         previous patch.
11552
11553         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11554
11555         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
11556         breaks the amd64 build.
11557
11558         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
11559         register allocation. Fixes #71454.
11560
11561         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11562
11563         * arrays.cs: Add new regression test.   
11564
11565 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11566
11567         * ssapre.c: Turned usage of snprintf to GString.
11568         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
11569         (I left it on by mistake in my previous commit).
11570
11571 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
11572
11573         * mini.c, cfold.c, basic-calls.cs: preserve side effects
11574         on cond branch optimization (fixes bug# 71515).
11575
11576 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11577
11578         * abcremoval.c: Fixed bug 71062.
11579         * abcremoval.h: Likewise.
11580
11581 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11582
11583         * mini.c: Added a new functionality to optimize_branches, the removal
11584         of useless basic blocks, and fixed some problem in the removal of
11585         critical edges; some utility functions added for both purposes.
11586         * ssapre.c: Added complex expression support, and fixed bug 70637.
11587         * ssapre.h: Likewise.
11588         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
11589         enabled in SSAPRE.
11590         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
11591         * driver.c: Re-enabled SSAPRE.
11592
11593 2005-01-19  Martin Baulig  <martin@ximian.com>
11594
11595         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
11596         the result of mono_get_method_constrained().
11597
11598 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
11599
11600         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
11601         manager.
11602
11603 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
11604
11605         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
11606         be detected.  Fixes #59296.
11607
11608 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
11609
11610         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
11611         which can happen. Fixes #71361.
11612
11613 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
11614
11615         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
11616         manager.
11617
11618 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
11619
11620         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
11621         appdomain-unload.exe to fail.
11622         
11623         * mini.c: Fix some memory leaks.
11624
11625 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
11626
11627         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
11628         Fixed bug and sped up some codepaths.
11629
11630 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
11631
11632         * mini.c: Fix some memory leaks.
11633
11634         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
11635         conversion.
11636
11637         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
11638
11639         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
11640         #71320.
11641
11642         * iltests.il: Add regression test for #71320.
11643
11644 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
11645
11646         * mini.c (mono_codegen): Fix installation of profiler hooks.
11647
11648         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
11649
11650 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
11651
11652         * mini.h, mini.c, cfold.c: optimize access to enum
11653         readonly fields, too. Eval conditional branches if possible
11654         to perform unreachable code removal in more cases.
11655
11656 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
11657
11658         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
11659
11660         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
11661         code manager.
11662
11663         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
11664         WinXP DEP. Fixes #71244.
11665
11666 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
11667
11668         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
11669
11670 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
11671
11672         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
11673
11674 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
11675
11676         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
11677         changes.
11678
11679         * mini.h: Bump AOT version.
11680
11681         * mini.h (MonoCompile): Change exvar to a hash table.
11682
11683         * mini.c: Allocate a separate exvar for each handler block.
11684
11685         * mini.c: Get rid of the computation of filter_lengths, its not needed.
11686
11687         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
11688         ex var with the pending exception and only throw if the two are equal.
11689         Fixes #68552.
11690         
11691         * exceptions.cs: Add tests for rethrow and nested catch clauses.
11692
11693         * mini-x86.c: Fix warnings.
11694
11695         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
11696         used by all the ports now.
11697
11698         * aot.c: Add write-symbols and save-temps options.
11699
11700 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11701
11702         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
11703
11704 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
11705
11706         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
11707         operations.
11708
11709         * tramp-s390.c: Check vtable slot belongs to the domain.
11710
11711         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
11712         as per other platforms.
11713
11714         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
11715
11716 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
11717
11718         * driver.c: we don't run the Main() code in a subthread anymore.
11719
11720 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
11721
11722         * mini.c: added experimental rtc support in the statistical
11723         profiler: if the user has the permission, more accurate statistics
11724         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
11725         The MONO_RTC value must be restricted to what the linux rtc allows:
11726         power of two from 64 to 8192 Hz.
11727
11728 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11729
11730         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
11731
11732 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
11733
11734         * mini-ppc.c: better icache flush for smp.
11735
11736 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
11737
11738         * mini-amd64.c (emit_move_return_value): Fix memory leak.
11739
11740         * mini-x86.c (get_call_info): Add the get_call_info () code from the
11741         amd64 port, not yet used.
11742
11743 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11744
11745         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
11746         a struct type.
11747
11748 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
11749
11750         * driver.c: Added --security option to activate the security manager.
11751         Right now this will allow code generation for declarative demands and
11752         is disabled when AOT is specified.
11753         * mini.c: Add code generation for declarative security demands.
11754         * mini.h: Add mono_use_security_manager as an extern gboolean.
11755
11756 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11757
11758         * aot.c (mono_compile_assembly): Speed up compilation a bit by
11759         emitting more dense assembly code.
11760
11761         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
11762         exception throwing stuff.
11763
11764 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
11765
11766         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
11767         dead code.
11768
11769         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
11770         left in by mistake.
11771
11772         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
11773         fixed.
11774
11775         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
11776
11777         * tramp-*.c: Only patch vtable slots if the object is in the current
11778         domain. Fixes appdomain-unload.exe.
11779
11780         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
11781         
11782         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
11783         x86 branch.
11784
11785 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11786
11787         * mini.c (reverse_branch_op): New helper function.
11788
11789         * mini.c (optimize_branches): Run the new optimization only on 
11790         platforms which support it. Also reverse all kinds of branches.
11791
11792         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
11793
11794         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
11795         a throw statement.
11796
11797         * mini.c (optimize_branches): Reverse not-equals branches if the false
11798         bblock is a throw. This happens a lot of time with argument checking in
11799         corlib.
11800
11801         * mini.c (mono_codegen): Add support for placing basic blocks after
11802         the function epilogue.
11803
11804         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
11805         function epilogue.
11806         
11807 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
11808
11809         * mini.c (setup_stat_profiler): Only set this up if the platform
11810         supports ITIMER_PROF.
11811
11812 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11813
11814         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
11815         previous patch.
11816
11817         * inssel.brg: Fix a warning.
11818
11819 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11820
11821         * mini.c: added support for statistical profiler 
11822         (run with: --profile=default:stat).
11823
11824 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
11825
11826         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
11827
11828         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
11829
11830         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
11831         related to global registers from the amd64 port.
11832
11833 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
11834
11835         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
11836
11837         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
11838         with global registers.
11839         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
11840
11841         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
11842
11843 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
11844
11845         * debug-mini.c (encode_value): Fix off-by-one.
11846
11847         * aot.c (encode_value): Likewise.
11848
11849         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
11850
11851 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
11852
11853         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
11854         AOT.
11855
11856         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
11857         
11858         * aot.c (emit_method_info): Increase size of temp buffer.
11859
11860         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
11861         the AOT case.
11862
11863 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
11864
11865         * aot.c (emit_method_info): Fix build.
11866         
11867         * aot.c: Further rework of the AOT file format to reduce the size of
11868         the method info data.
11869
11870         * mini.h: Bump AOT file format version.
11871
11872 2004-12-27  Martin Baulig  <martin@ximian.com>
11873
11874         * mini.c (mini_get_method): New static method; call
11875         mono_get_method_full() and mono_get_inflated_method().
11876         (mono_method_to_ir): Use mini_get_method() instead of
11877         mono_get_method_full(). 
11878
11879 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
11880
11881         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
11882
11883 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
11884
11885         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
11886
11887         * inssel-amd64.brg: Add some optimization rules.
11888
11889 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
11890
11891         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
11892         standard not GC'd stuff is fine.
11893
11894 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
11895
11896         * aot.c: Rework the AOT file format to get rid of most of the global
11897         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
11898
11899         * mini.h: Bump AOT file format version.
11900         
11901 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
11902
11903         * mini.h: Bump AOT file format version.
11904
11905         * aot.c (mono_aot_is_got_entry): New function to determine if an 
11906         address is inside a GOT.
11907
11908         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
11909
11910         * cpu-pentium.md: Increase the maximum size of some instructions which
11911         might involve a got access.
11912         
11913         * mini.c (get_method_from_ip): Another debug helper function.
11914
11915         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
11916         when got var accesses are created during the decompose phase.
11917
11918         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
11919
11920         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
11921         argument mini_compile_method and to MonoCompile, and use this to
11922         determine whenever a given method is compiled for AOT. This allows the
11923         other methods compiled during AOT compilation to be free of AOT stuff,
11924         so the backends does not need to add special support for them by
11925         creating a fake GOT etc.
11926
11927         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
11928         longer needed.
11929
11930 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11931
11932         * mini.c (mono_method_to_ir): It turns out that some of the
11933         x-appdomain wrappers are lax with types, so just ignore this for
11934         all wrappers.
11935
11936         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
11937         at the vtable->klass. If it is non-shared code we can just use the
11938         vtable.
11939
11940 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
11941
11942         * mini-ppc.c: access MonoDomain from tls, too.
11943
11944 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
11945
11946         * declsec.c: Removed unused variable (and related warning ;-)
11947
11948 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11949
11950         * iltests.il: New test for LDELEMA on an array of ref types.
11951
11952         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
11953         all ldelema's on reftypes.
11954         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
11955         it was the wrong place to put it.
11956
11957         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
11958         register to pop to make this cleaner, at the request of Paolo.
11959
11960 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11961
11962         * mini-ops.h (OP_GETHASHCODE): New op.
11963
11964         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
11965
11966         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
11967         operation.
11968
11969         For a microbenchmark, this reduces the cost of Hashtable.get_Item
11970         by 25%.
11971         
11972         * mini-x86.c (mono_arch_output_basic_block): Rather than
11973
11974         add ebp, 4
11975
11976         Emit
11977
11978         pop edx
11979
11980         The first is 3 bytes while the second is 1. This saves 36 kb on
11981         mscorlib, quite a big saving. When bootstraping mcs, I was able to
11982         see a small boost because of icache locality.
11983
11984         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
11985
11986 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
11987
11988         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
11989         started code sharing with the generic code.
11990
11991 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
11992
11993         * mini-ppc.c, cpu-g4.md: added code for direct access to
11994         tls data slots.
11995
11996 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
11997
11998         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
11999          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
12000         to OP_TLS_GET.
12001
12002 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
12003
12004         * declsec.c|h: Added functions to cache the declarative stack modifiers
12005         in MonoJitInfo and to create a security frame from a MonoJitInfo 
12006         structure.
12007         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
12008         created. Register internal calls for System.Security.SecurityFrame::
12009         _GetSecurityFrame and _GetSecurityStack.
12010         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
12011         the definitions for the new stack walk/callback mechanism.
12012         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
12013         first security frame for LinkDemands and InheritanceDemands) and
12014         GetSecurityStack for Demands. Both use the new mono_walk_stack code
12015         from lupus.
12016         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
12017         walk initialization (lupus).
12018
12019 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
12020
12021         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
12022         idiom.
12023         (handle_loaded_temps): Do not create a temporary variable for
12024         things that we know are temps. They will never be modified.
12025         (mono_spill_call): Set MONO_INST_IS_TEMP
12026         (mono_emulate_opcode): ditto
12027         (emit_tree): ditto
12028         (mono_method_to_ir.CEE_DUP): ditto
12029
12030 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
12031
12032         * mini.c (type_to_eval_stack_type): Make this handle the void type
12033         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
12034         (emit_tree): use ip_in_bb to special case some common idioms
12035         Update all callers to pass in the IP.
12036         (mono_method_to_ir): Make CEE_CALL* do the above as well.
12037
12038         This gives us a nice 2% speedup in mcs bootstrap.
12039
12040         * mini-x86.c (peephole_pass): Peephole pass to make
12041         mov  [foo], eax
12042         push [foo]
12043
12044         into
12045
12046         mov [foo], eax
12047         push eax
12048
12049         * mini.c (ip_in_bb): new method.
12050         (mono_method_to_ir): use this method rather than doing the hash
12051         lookup ourselves.
12052
12053         * linear-scan.c (mono_linear_scan): When expiring actives, you
12054         don't need to keep around variables that expire on this
12055         instruction. This makes it so that:
12056              a = b + 1
12057         will turn into:
12058              store (ebx add (ebx, 1))
12059         which will become
12060              add ebx, 1
12061
12062 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
12063
12064         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
12065         combination to avoid doing two copies. Fix up problems with previous
12066         patch.
12067
12068         * mini.c: Fix 64 bit warnings.
12069
12070         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
12071
12072 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
12073
12074         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
12075         changes from the x86 code.
12076
12077         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
12078
12079 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
12080
12081         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
12082         throwing code to reduce its size, unify the AOT and non-aot code and 
12083         get rid of relocations in the AOT case.
12084
12085         * mini-x86.h mini.c exceptions-x86.c 
12086         (mono_arch_get_throw_corlib_exception): New arch specific function to 
12087         raise corlib exceptions which doesn't require relocations in the 
12088         caller.
12089
12090         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
12091
12092 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
12093
12094         * mini.c (mono_emit_method_call): Only allocate the got var when it is
12095         needed.
12096
12097         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
12098         in the AOT case.
12099
12100 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12101
12102         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
12103         with add function when used from Inc/dec atomic 
12104         functions. Re-enabled optimization on x86.
12105         * mini-ops.h: renamed atomic_add functions to
12106         allow _add to match the Interlocked::Add and
12107         _add_next to match Interlocked::Inc/Dec.
12108
12109 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
12110
12111         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
12112         linking of BBs to the end BB, and enabled SSAPRE also with
12113         consprop and copyprop (which was prevented by that bug).
12114
12115 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12116
12117         * mini-x86.c: disabling the Interlocked optimizing code. 
12118
12119 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
12120
12121         * aot.c (load_aot_module): Move reading of got_addr after the AOT
12122         file version check.
12123         
12124 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12125
12126         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
12127         interlocked optimization due lack of support on x86, rewrote 
12128         exchange to take into account that base may be in eax.
12129         
12130         xsp works again; activated Interlocked optimizing code.
12131         
12132 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
12133
12134         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12135
12136 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
12137
12138         * mini-ops.h: Add new opcodes.
12139
12140         * mini.h: Add new patch types. Add got_var to MonoCompile.
12141
12142         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
12143         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
12144         make it work with all kinds of patchable code.
12145
12146         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
12147         address of the GOT, and referencing entries in the GOT.
12148
12149         * mini.c: Add code to load the GOT address if needed by an opcode.
12150
12151         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
12152         independent AOT code on the x86 using an elf-style Global Offset Table.
12153
12154 2004-12-14  Raja R Harinath  <rharinath@novell.com>
12155
12156         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
12157
12158 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12159
12160         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
12161         when running xsp.
12162
12163 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
12164
12165         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
12166         of Interlocked:Increment/Decrement/Add as inline ops.
12167         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
12168
12169 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
12170
12171         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
12172         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
12173
12174 2004-12-12  Duncan Mak  <duncan@ximian.com>
12175
12176         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
12177         again. `patch_info->table_size' is no longer valid after Zoltan's
12178         commit #37636.
12179
12180 2004-12-12  Martin Baulig  <martin@ximian.com>
12181
12182         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
12183         if we are the "real" method, ie. not an inlined method inside it.
12184
12185 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
12186
12187         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
12188         before we look in the special fields table. This fixes
12189         ../tests/thread-static-init.cs.
12190
12191 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12192
12193         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
12194         for Array get_Rank and get_Length. Fixes bug #70465.
12195
12196 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
12197
12198         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
12199         separate structure to reduce the size of MonoJumpInfo.
12200
12201 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
12202
12203         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
12204
12205 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
12206
12207         * mini.c (mini_get_inst_for_method): Changed to allow ports
12208         to return a MonoInst instead of opcode 
12209         (renamed mini_get_opcode_for_method to better reflect the new functionality)
12210         
12211         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
12212         Allow ports to return a created MonoInst instead of op-code, will enable
12213         new optimizations.
12214         (renamed mini_get_opcode_for_method to better reflected the functionality)
12215
12216 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
12217
12218         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
12219
12220 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
12221
12222         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
12223         Fixes #69985.
12224
12225 2004-12-08  Martin Baulig  <martin@ximian.com>
12226
12227         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
12228         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
12229
12230 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
12231
12232         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
12233         correctly.
12234
12235         * exceptions.cs: Disable some tests which depend on properties of x86 fp
12236         arithmetic.
12237
12238 2004-12-08  Raja R Harinath  <rharinath@novell.com>
12239
12240         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
12241
12242 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
12243
12244         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
12245         bug introduced by the previous patch.
12246
12247 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12248
12249         * mini-ppc.c, objectc.cs: handle large structs passed by value
12250         (fixes bug #69972).
12251
12252 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
12253
12254         * mini-ppc.c: OP_ARGLIST implementation from
12255         Geoff Norton  <gnorton@customerdna.com>.
12256
12257 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12258
12259         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
12260         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
12261
12262 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12263
12264         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
12265
12266 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12267
12268         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
12269         support.
12270
12271 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
12272
12273         * mini-sparc.c: Zero out localled-ed memory.
12274
12275         * iltests.il: Add tests for zeroing out localloc-ed memory.
12276
12277 2004-12-04  Martin Baulig  <martin@ximian.com>
12278
12279         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
12280         mono_method_get_signature_full().       
12281
12282 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
12283
12284         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
12285         and some utility functions (always for SSAPRE), integrated SSAPRE.
12286         * mini.h: Likewise.
12287         * driver.c: Added ssapre option.
12288         * ssa.c: Small fix on OP_ARG handling.
12289         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
12290         * Makefile.am: Likewise.
12291
12292 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
12293
12294         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
12295         now in the xp code.
12296
12297         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
12298         icall.
12299
12300 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12301
12302         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
12303         
12304         * cpu-s390.md : Increase instruction length of oparglist.
12305
12306         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
12307
12308 2004-11-30  Martin Baulig  <martin@ximian.com>
12309
12310         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
12311         virtual generic methods.  We call a special helper_compile_generic_method()
12312         icall to retrieve the method from the vtable, inflate and compile
12313         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
12314
12315         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
12316
12317 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
12318
12319         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
12320
12321 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
12322
12323         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
12324         Fixes #69929.
12325
12326 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
12327
12328         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
12329         platforms with PIC aot.
12330
12331 2004-11-28  Martin Baulig  <martin@ximian.com>
12332
12333         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
12334         Fixes gen-112.cs.
12335
12336 2004-11-28  Martin Baulig  <martin@ximian.com>
12337
12338         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
12339         the result of mono_type_get_underlying_type() to check whether
12340         we're byref.
12341
12342 2004-11-26  Martin Baulig  <martin@ximian.com>
12343
12344         * mini.c
12345         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
12346         in the g_assert().
12347
12348 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
12349
12350         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
12351         the same way as the other arguments so they won't get clobbered.
12352
12353         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
12354         calls through R11 since it is clobbered by the trampoline code.
12355
12356 2004-11-26  Raja R Harinath  <rharinath@novell.com>
12357
12358         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
12359         pick up in-tree mscorlib.dll.
12360
12361 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
12362
12363         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
12364
12365         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
12366         runtime data/code are now stored in a table similar to the GOT in ELF. 
12367         This allows the code itself to be position independent.
12368
12369         * aot.c: Fix loading of referenced assemblies after the lazy assembly
12370         loading changes.
12371
12372         * aot.c: Attach ELF type (object/function) directives to all global
12373         symbols.
12374
12375         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
12376
12377         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
12378
12379         * mini-amd64.h: Turn on PIC AOT code.
12380
12381         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
12382         returning the offset within an OP_AOTCONST instruction where the GOT
12383         offset needs to be added.
12384
12385         * mini.h: Bump AOT file format version.
12386
12387 2004-11-25  Martin Baulig  <martin@ximian.com>
12388
12389         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
12390         uninflated generic methods.
12391
12392 2004-11-25  Martin Baulig  <martin@ximian.com>
12393
12394         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
12395
12396 2004-11-24  Martin Baulig  <martin@ximian.com>
12397
12398         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
12399         original klass (this only applies for generic instances).
12400
12401 2004-11-24  Martin Baulig  <martin@ximian.com>
12402
12403         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
12404         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
12405         that array).
12406
12407 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
12408
12409         * mini.c (mono_method_to_ir): Disable inlining for methods containing
12410         localloc. Fixes #69678.
12411
12412         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
12413         
12414 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
12415
12416         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
12417         used SSE registers on pinvoke calls. Fixes #69774.
12418
12419 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
12420
12421         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
12422         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
12423
12424 2004-11-23  Raja R Harinath  <rharinath@novell.com>
12425
12426         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
12427         Refer directly to the mcs/ tree.
12428
12429 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12430
12431         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
12432         Check if a trampoline for a synchronized method is required. 
12433
12434 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
12435
12436         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
12437         with localloc if needed. Throe arithmetric exception in
12438         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
12439         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
12440
12441 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
12442
12443         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
12444         types before switching on type.  Fixes #69622.
12445
12446 2004-11-19  Raja R Harinath  <rharinath@novell.com>
12447
12448         * Makefile.am (check-local): New.  Integrate into 'make check'.
12449         (MCS,RUNTIME): Define using in-tree mono and mcs.
12450         (ILASM): New.
12451         (%.exe): Use $(ILASM).
12452
12453 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
12454
12455         * mini-ppc.c: adjust initial prolog size (bug #69691).
12456
12457 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
12458
12459         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
12460         #69664.
12461
12462 2004-11-17  Raja R Harinath  <rharinath@novell.com>
12463
12464         * Makefile.am (clean-local): Rename from 'clean'.
12465
12466 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12467
12468         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
12469         to mono_arch_is_int_overflow. 
12470         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
12471         SIGFPE events.
12472
12473 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
12474
12475         * declsec.c|h: New files to support declarative security attributes.
12476         Added function to check if a method has (applicable) security.
12477         * mini.c|h: Add check for declarative security attributes in
12478         mono_method_check_inlining.
12479         * Makefile.am: Added declsec.c and declsec.h to the build.
12480
12481 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
12482
12483         * mini.c, mini.h: update to keep dynamic code info per-domain.
12484
12485 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
12486
12487         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
12488         (mini_init): Get rid of it from here too.
12489
12490 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
12491
12492         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
12493         implemented OP_RETHROW (patch by Geoff Norton
12494         <gnorton@customerdna.com>).
12495
12496 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
12497
12498         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
12499         between appdomains.  Fixes appdomain-unload on PPC.
12500
12501 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
12502
12503         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12504         mini-exceptions.c: handle the new wrapper types.
12505         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
12506         token value as a MonoClass* when compiling a wrapper.
12507         mono_jit_create_remoting_trampoline now takes an additional
12508         MonoRemotingTarget parameter.
12509         
12510 2004-11-10  Martin Baulig  <martin@localhost>
12511
12512         * mini.c (mono_method_to_ir): Use `generic_container->context'
12513         rather than creating a new one.
12514
12515 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12516
12517         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
12518
12519         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
12520
12521 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
12522
12523         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
12524         the experimental aot cache stuff.
12525
12526 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
12527
12528         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12529         mini-exceptions.c: update to exception clause structure changes.
12530
12531 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
12532
12533         * exceptions-x86.c (throw_exception): Fix warnings.
12534
12535         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
12536         for OP_RETHROW.
12537
12538 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
12539
12540         * exceptions-sparc.c (get_throw_exception): Really fix this.
12541
12542 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
12543
12544         * tramp-*.c: we no longer support icalls without wrappers, so
12545         a bit of code can be removed here
12546
12547 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
12548
12549         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
12550         patch.
12551
12552         * cpu-sparc.md: Add op_rethrow.
12553
12554         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
12555
12556         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
12557
12558         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
12559         * mini-ops.h: Add OP_RETHROW.
12560
12561         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
12562
12563         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
12564
12565 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
12566         
12567         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
12568         Makes the output much easier to read
12569
12570 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
12571
12572         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
12573         prevents another huge leak when compiling with ssa. Secondly, the
12574         performance of doing this rather than freeing the lists is much
12575         better. GList does a lock every time you allocate a list link,
12576         so that it can use a memory pool. So, it is better to just use
12577         a memory pool of our own.
12578         
12579         * ssa.c, linear-scan.c: replace g_list_remove_link with
12580         g_list_delete.  The remove one does not free the GList, so we were
12581         leaking memory. On -O=all --compile-all with corlib, this cut down
12582         3 MB of allocations.
12583
12584 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
12585
12586         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
12587
12588         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
12589
12590         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
12591         into a new function mono_create_jit_trampoline ().
12592
12593 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
12594
12595         * trace.c (get_spec): Allow tracing of classes without a namespace.
12596
12597 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
12598
12599         * mini.c: Fix pointer overwrite in mini_method_compile.
12600
12601 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
12602
12603         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
12604         The darwin ABI needs some special handling for 1 and 2 byte structs
12605         Lets use lbz/lhz instead of lwz everywhere.
12606         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
12607         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
12608         Use stb/sth for the former, and put the latter always on stack instead of in
12609         argument registers.
12610
12611 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
12612
12613         * trace.c (is_filenamechar): Add '_'.
12614
12615 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
12616
12617         * mini-s390.c: Fix prolog length to allow for large trace requirements.
12618
12619         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
12620
12621 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
12622
12623         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
12624         depends on libmonogc. Fixes #68805.
12625
12626 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
12627
12628         * mini.c (mono_jit_free_method): Provide extra information for
12629         this error.  Currently this leaks, but will be turned into a
12630         developer option in the future.
12631
12632 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
12633
12634         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
12635
12636 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
12637
12638         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
12639         boundary. Fixes reading of PATCH_INFO_R4 and R8.
12640         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
12641
12642 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
12643
12644         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
12645         trampolines for AOT code.
12646
12647 2004-10-22    <vargaz@freemail.hu>
12648
12649         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
12650         constructed types. Fixes #68136.
12651
12652 2004-10-21  Martin Baulig  <martin@ximian.com>
12653
12654         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
12655         if it returns true, unwind the stack to the call instruction.
12656
12657 2004-10-21    <vargaz@freemail.hu>
12658
12659         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
12660
12661         * mini.h: Bump AOT version number.
12662
12663         * objects.cs: Add another test for unbox trampolines.
12664
12665         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
12666         valuetype methods.
12667
12668 2004-10-20    <vargaz@freemail.hu>
12669
12670         * driver.c: Add SHARED to the set of optimizations tested.
12671
12672         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
12673
12674         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
12675         used by CEE_NEWARR.
12676
12677         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
12678
12679 2004-10-20  Martin Baulig  <martin@ximian.com>
12680
12681         * mini-exceptions.c (mono_handle_exception): Call
12682         mono_debugger_handle_exception() to tell the debugger about
12683         catch/finally clauses.
12684
12685 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
12686
12687         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
12688
12689         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
12690         #68447.
12691
12692 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
12693
12694         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
12695         methods as their native size, fixed bug #57543, #57545.
12696         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
12697         This saves a temporary register and mullw call down into 1 (minor perf
12698         increase for cases like sum = sum * 5;  This use to translate into:
12699             li r11,5
12700             mullw r28,r28,r11
12701         It now translates to
12702             mulli r28,r28,5
12703
12704 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
12705
12706         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
12707         #68388.
12708
12709 2004-10-11  Martin Baulig  <martin@ximian.com>
12710
12711         * mini.c (mono_method_to_ir): If we're a generic method, get the
12712         MonoGenericContainer from our MonoMethodNormal and create a
12713         MonoGenericContext from it.
12714
12715 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
12716
12717         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
12718
12719         * basic-long.cs: Add test for checked i8->i2 cast.
12720
12721 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12722
12723         * inssel-ppc.brg: added a couple of speedup rules.
12724
12725 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
12726
12727         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
12728         to speed up rebuilds.
12729
12730 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12731
12732         * mini-s390.c: Minor fix to OP_OR_IMM.
12733
12734 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
12735
12736         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
12737         better. Fixes appdomain-unload.exe on sparc.
12738
12739 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
12740
12741         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
12742         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
12743         see bug 67324.
12744
12745 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
12746
12747         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
12748
12749 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
12750
12751         * mini.c: Always generate a field read/write wrapper for members
12752         of the class MarshalByRefObject since the actual instance could
12753         be a CBO.
12754
12755 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
12756
12757         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
12758
12759 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
12760
12761         * driver.c mini.h trace.c: Move the setting of the main assembly into
12762         a separate function called mono_trace_set_assembly () and call it after
12763         actually loading the main assembly. Fixes #66872.
12764
12765 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
12766
12767         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
12768         using the code manager.
12769
12770 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
12771
12772         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
12773
12774 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
12775
12776         * cpu-amd64.md: Fix bug in previous patch.
12777         
12778         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
12779         #66650.
12780
12781 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
12782
12783         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12784         mini-exceptions.c: updates for changed stack walk interface.
12785
12786 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12787
12788         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
12789
12790 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
12791
12792         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
12793
12794 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
12795
12796         * driver.c (mini_regression_list): Do not call mono_assembly_close 
12797         since assemblies can't be unloaded.
12798         
12799 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12800
12801         * cpu-amd64.md: Fix more instruction lengths.
12802
12803         * cpu-amd64.md: Fix lengths of some instructions.
12804
12805 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
12806
12807         * inssel.brg: Make the array ldelema check aot friendly.
12808
12809 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12810
12811         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
12812
12813         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
12814
12815 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
12816
12817         * mini-x86.c: Fix build.
12818
12819         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
12820         mono_type_get_underlying_type () helper function to simplify code.
12821         
12822 2004-09-09  Martin Baulig  <martin@ximian.com>
12823
12824         * mini-amd64.c: Don't access `type->data.klass' directly, call
12825         mono_class_from_mono_type() instead since the type may be a
12826         generic instance.
12827
12828 2004-09-09  Martin Baulig  <martin@ximian.com>
12829
12830         * mini-amd64.c (get_call_info): Fix support for generic instances.
12831         (add_valuetype): Use mono_class_from_mono_type() to get the class
12832         since we can be a generic instance.
12833
12834 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
12835
12836         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
12837
12838 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
12839
12840         * liveness.c: reset spill costs on each scan: bug 62107
12841
12842 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
12843
12844         * exceptions-sparc.c (mono_arch_find_jit_info): remove
12845         unnecessary line that doesn't compile
12846
12847 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12848
12849         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
12850         trampolines, make them call an error function so people can fix their
12851         code.
12852
12853 2004-09-06  Martin Baulig  <martin@ximian.com>
12854
12855         * mini.c (mono_method_to_ir): When initializing locals, handle a
12856         generic instances like a valuetype if it's a valuetype and like a
12857         class if it's a class.
12858
12859 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12860
12861         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
12862         stack. Fixes #64674.
12863
12864         * exceptions.cs: Add test for unwinding of call arguments.
12865
12866 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
12867
12868         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
12869         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
12870         set the carry/borrow flag). The sparc and s390 implementations
12871         can now use optimized versions (and simplify the code). ppc bugfixes.
12872
12873 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12874
12875         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
12876
12877 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
12878
12879         * inssel-amd64.brg: Remove leftover 32 bit rule.
12880
12881         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
12882
12883 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
12884
12885         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
12886         mono_arch_find_jit_info functions into a new function. Fix a memory
12887         leak.
12888
12889         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
12890         refactored code.
12891         
12892 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12893
12894         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
12895         as well.
12896         
12897         * exceptions.cs: Add array size tests.
12898
12899         * mini.c: Allocate a separate icall wrapper for each arity of 
12900         mono_array_new_va. Fixes #59509.
12901
12902         * exceptions.cs: Add testcase for 64578.
12903
12904         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
12905
12906         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
12907         
12908 2004-09-02  Martin Baulig  <martin@ximian.com>
12909
12910         * mini.c (mono_method_to_ir): When initializing the locals, call
12911         handle_initobj() on the generic instance itself, not its
12912         underlying type.
12913
12914 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12915
12916         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
12917         MonoJitInfo for dynamic methods.
12918
12919         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
12920
12921         * mini.c: Add support for freeing JIT data for dynamic methods.
12922         
12923 2004-09-01  Martin Baulig  <martin@ximian.com>
12924
12925         * mini-x86.c (is_regsize_var): Added support for generic
12926         instances.
12927         (mono_arch_emit_prolog): Make this compile again, use
12928         `x86_push_imm_template (code)'.
12929
12930 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
12931
12932         * mini-x86.c: make all push_imm instructions that get
12933         patched always emit the long form
12934
12935 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
12936
12937         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
12938         in a per-domain hash.
12939
12940         * mini-amd64.c (merge_argument_class_from_type): Handle generic
12941         types.
12942
12943 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
12944
12945         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
12946         work.
12947         
12948         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
12949         work.
12950
12951         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
12952         Beginnings of SSE2 support.
12953
12954         * exceptions.cs: Add more tests for checked int<->uint casts.
12955
12956 2004-08-28  Martin Baulig  <martin@ximian.com>
12957
12958         * mini-x86.c (mono_arch_instrument_epilog): Added support for
12959         generic instances.
12960
12961         * mini.c
12962         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
12963         Handle generic instances recursively.
12964
12965 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12966
12967         * iltests.il: test for conv.u8 on a constant
12968
12969 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12970
12971         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
12972         LCONV_x4 (shrun_32 (membase)).
12973
12974 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12975
12976         * inssel-x86.brg: c&p rules for push/setret of long
12977
12978 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12979
12980         * inssel-x86.brg: c&p rules for compare (base, regvar) and
12981         compare (regvar, base)
12982
12983         * inssel-x86.brg: more burg love
12984
12985         * inssel.brg: more cleanup
12986
12987         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
12988
12989 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12990
12991         * basic-long.cs, basic-calls.cs: new tests for optimization.
12992
12993 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
12994
12995         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
12996         patch.
12997
12998 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12999
13000         * mini-amd64.c (read_tls_offset_from_method): Add another case.
13001         
13002 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
13003
13004         * inssel.brg (mini_emit_memcpy): use 
13005         NO_UNALIGNED_ACCESS to disable memcpy optimization
13006
13007 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13008
13009         * mini-amd64.c: Handle generic types in various places.
13010
13011         * mini.c (mono_method_to_ir): Handle generic types in init locals.
13012
13013 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
13014
13015         * mini.c (handle_box): Fix warning.
13016
13017         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
13018
13019         * mini-amd64.h: Enable the emit_state optimization.
13020
13021         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
13022
13023         * mini-amd64.c: Add some new 64 bit peephole opts.
13024
13025         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
13026
13027         * cpu-amd64.md: sreg1 of div instructions must be %rax.
13028
13029         * mini-amd64.c: Register allocator fixes.
13030
13031         * mini.c: Add an optimization to emit_state to avoid allocation of new
13032         registers on some platforms.
13033
13034 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
13035
13036         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
13037
13038         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
13039         allocation. Fixes #63085.
13040
13041         * basic-long.cs: Add new regression test.
13042
13043         * mini-amd64.c: Register allocator improvements.
13044
13045 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
13046
13047         * mini-amd64.c (read_tls_offset_from_method): Add another code
13048         sequence.
13049
13050         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
13051         instruction sequence for nullifying class init trampolines.
13052
13053         * objects.cs: Add new regalloc test.
13054
13055         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
13056
13057 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13058
13059         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
13060         
13061         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
13062         arguments.
13063
13064         * driver.c: Fix profiling after TLS changes.
13065         
13066         * driver.c (mono_main): Set mono_stats.enabled if needed.
13067
13068         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
13069         CEE_BOX.
13070
13071 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
13072
13073         * mini-x86.c: use a 1 op rather than a 2 op tls access
13074         instruction -> faster.
13075
13076 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13077
13078         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
13079         x86 backend.
13080
13081 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
13082
13083         * exceptions-sparc.c (throw_exception): fix typo
13084
13085 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13086
13087         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
13088         set tree->dreg correctly with tls. Allow any
13089         register to be used.
13090
13091         * mini-x86.c (read_tls_offset_from_method): add new code
13092         generation pattern seen with GCC.
13093
13094
13095 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13096
13097         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
13098         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13099         exceptions-sparc.c: fix some performance issues in exception
13100         handling and setting of the stack trace for exceptions that were
13101         already thrown.
13102
13103 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13104
13105         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
13106         x86 backend.
13107         
13108         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
13109         registers.
13110
13111 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13112
13113         This patch inlines tls access, when possible.
13114         
13115         * mini.h: new arch functions for TLS intrinsics.
13116         All platforms updated with a stub.
13117
13118         * mini.c: use the new intrinsics
13119
13120         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
13121         arch specific intrinsic for tls variables
13122
13123 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13124
13125         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
13126         under windows.
13127
13128 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13129
13130         * mini.c: thread local allocation
13131
13132 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
13133
13134         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
13135
13136         * Makefile.am: Link against the static version of libmonogc.
13137         
13138         * Makefile.am: Link the static versions of the convenience libraries
13139         into the mono executable.
13140
13141         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
13142
13143 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
13144
13145         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
13146         on integer overflow.
13147
13148         * mini-amd64.c: Reorganize function call code.
13149
13150         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
13151
13152 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13153
13154         * inssel-x86.brg: use xor eax,eax.
13155         
13156         * basic.cs: new tests
13157
13158 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13159
13160         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
13161         in exception throwing code.
13162         
13163 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13164
13165         * inssel-x86.brg: use xor esi,esi.
13166
13167 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13168
13169         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
13170         can trace methods compiled during mini_init () too.
13171
13172         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
13173         CEE_CONV_U4.
13174
13175 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13176
13177         * Makefile.am: static link on x86 (r=zoltan)
13178
13179 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13180
13181         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
13182         code since it causes some programs to fail.
13183
13184 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
13185
13186         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
13187
13188 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
13189
13190         * mini.c: ovfops_op_map - add STACK_OBJ case for
13191         CONV_I 
13192         * basic.cs: add test_0_pin_string as test
13193         case for above.
13194
13195 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
13196
13197         * Makefile.am: build C# if srcdir != builddir
13198
13199 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13200
13201         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
13202         fall-through blocks.
13203
13204 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13205
13206         * driver.c: enable loop by default again and include abcrem in -O=all.
13207
13208 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
13209
13210         * iltests.il: Add some localloc tests.
13211
13212         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
13213
13214         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
13215         Fixes #62574.
13216
13217         * inssel-amd64.brg: Add some optimizations.
13218
13219         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
13220         for gcc-3.4.
13221
13222         * Makefile.am: Statically link mono against libmono on AMD64.
13223         
13224         * mini-amd64.c inssel-amd64.brg: Optimizations.
13225
13226 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
13227
13228         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
13229
13230         * tramp-amd64.c: Patch calling code in trampolines.
13231
13232 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
13233
13234         * mini-amd64.c: pinvoke struct passing fixes.
13235
13236 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
13237
13238         * mini-sparc.c: redo change, make mono_arch_cpu_init call
13239         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
13240
13241 2004-08-05  Duncan Mak  <duncan@ximian.com>
13242
13243         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13244         CEE_LDELEM_ANY.
13245
13246 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13247
13248         * mini-amd64.c (emit_move_return_value): Move return value for normal
13249         calls too.
13250
13251 2004-08-05  Martin Baulig  <martin@ximian.com>
13252
13253         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
13254         `type->type'; just modify `type' itself when dealing with enums
13255         and generic instances.
13256         (check_call_signature): Make `simple_type' a `MonoType *'.
13257
13258 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13259
13260         * mini.c: Use OP_PADD to add offsets to addresses.
13261
13262         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
13263
13264 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
13265
13266         * mini-sparc.c (mono_arch_emit_epilog): fix check
13267         for folding last op into restore instruction
13268
13269 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13270
13271         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
13272         helper methods using the code manager.
13273         
13274         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
13275
13276         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
13277
13278 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13279         
13280         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
13281           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
13282
13283         * mini-s390.c: fix tail processing
13284
13285 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
13286
13287         * mini-ppc.c: mul.ovf.un exception name fix.
13288
13289 2004-08-03  Martin Baulig  <martin@ximian.com>
13290
13291         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
13292         instances; before jumping to `handle_enum', also modify `ptype'.
13293
13294 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
13295
13296         * cpu-sparc.md: fcall maximal length too small.
13297
13298 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
13299
13300         * mini-amd64.c mini.h: Add initial support for passing/returning 
13301         structures to/from pinvoked methods.
13302
13303 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
13304
13305         * mini-ppc.c: reg allocator fix.
13306
13307 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
13308
13309         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
13310
13311         * inssel.brg: Optimize memset on 64 bit machines.
13312
13313         * mini-amd64.c: Fix some vararg cases.
13314
13315 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13316
13317         * mini-s390.c: Corrected macro in emit_float_to_int
13318
13319         * s390-abi.cs: Tests to exercise the s390 ABI
13320
13321 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13322
13323         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
13324         caller saved regs.
13325
13326         * basic.cs: Add a test for add.ovf.un.
13327
13328 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
13329
13330         * mini-sparc.c: add case for OP_IDIV_UN
13331
13332 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13333
13334         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
13335         
13336         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
13337
13338 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
13339
13340         * basic.cs: regression tests.
13341
13342         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
13343         regressions.
13344
13345 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13346
13347         * basic.cs: Add a new test.
13348
13349         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
13350         and AOT. Various fixes and optimizations.
13351
13352         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
13353
13354 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13355
13356         * mini-ppc.c: make sure temp regs are not used for global reg
13357         allocation.
13358
13359 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
13360
13361         * cpu-sparc.md: conv_i8 fix for 64bits
13362
13363         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
13364
13365 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
13366         
13367         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
13368         add opcode for cmp BYTE PTR [eax], imm.
13369
13370         * inssel.brg: Make memcpy and memset takes bases.
13371
13372 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13373
13374         * *-amd64.*: More AMD64 work.
13375         
13376 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13377
13378         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
13379         add a compare-not-equal opcode.
13380         
13381 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
13382
13383         * mini.c: Use mono_init_from_assembly instead of mono_init.
13384         
13385 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13386
13387         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
13388
13389         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
13390
13391         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
13392
13393         * inssel.brg: 64 bit fixes.
13394
13395         * mini.h (MonoCallInst): Add some AMD64 specific data.
13396
13397         * mini.h: Add some OP_P opcodes.
13398
13399 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13400
13401         * basic.cs: tests for 61797 and 61740
13402
13403 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13404
13405         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
13406         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
13407
13408 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
13409
13410         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
13411
13412         * *-amd64*.*: Ongoing AMD64 work.
13413
13414 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
13415
13416         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
13417
13418         * *-amd64*: Ongoing AMD64 work.
13419
13420         * mini-arch.h: Add AMD64 support.
13421
13422         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
13423
13424         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
13425
13426         * mini-ops.h: Add new opcodes.
13427
13428         * Makefile.am: Add AMD64 support.
13429
13430         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
13431         rules into the inssel-long*.brg files.
13432
13433         * *-amd64.*: Add beginnings of AMD64 backend.
13434
13435 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
13436
13437         * mini.c (print_dfn): commenting out the code that prints
13438         the cil. With -O=deadce, this makes -v -v crash.
13439         
13440         * cpu-pentium.md: make checkthis have a length of 2
13441
13442 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
13443
13444         * mini-sparc.h: fix implementations of __builtin
13445         functions for Sun compiler for V9.
13446
13447 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
13448
13449         * mini.c: use the new stelem.ref wrapper
13450         * exceptions.cs, arrays.cs: new stelem.ref tests
13451
13452 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13453
13454         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
13455         new XSP should work with these changes).
13456
13457 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
13458         
13459         * inssel-{long32,x86,}.brg: trivial optimizations.
13460         
13461 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
13462
13463         * mini.c: load value when emitting box operation in
13464         constrained calls.
13465
13466 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
13467
13468         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
13469         is one byte shorter than cmp DWORD PTR [eax], 0.
13470
13471 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13472
13473         * inssel-ppc.brg: arguments on the stack are always
13474         relative to the stack pointer (spotted by Neale Ferguson).
13475
13476 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13477
13478         * exceptions-x86.c: delay appending the method name to the trace until
13479         after mono_jit_info_table_find is called, as this gets the real
13480         MonoMethod.
13481
13482 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
13483
13484         * aot.c: register roots
13485
13486 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13487
13488         * aot.c : I could just use PLATFORM_WIN32 flag.
13489
13490 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13491
13492         * aot.c : Reverting the previous fix. This time it broke linux build.
13493
13494 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13495
13496         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
13497
13498 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
13499
13500         * mini.c (handle_stack_args): Remove some more debugging code.
13501         
13502         * mini.c (handle_stack_args): Remove debug output left in by mistake.
13503
13504         * driver.c mini.h aot.c: Allow additional options to be specified with
13505         --aot and pass them to mono_compile_assembly.
13506
13507         * aot.c: Add experimental code to AOT compile all loaded assemblies
13508         on demand and save the code into a cache in the filesystem.
13509
13510         * aot.c: Add support for more wrapper methods.
13511         
13512         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
13513         58863.
13514
13515         * cpu-*.md: Remove removed opcodes.
13516
13517         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
13518         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
13519         related icalls to marshal.c.
13520
13521 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
13522
13523         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
13524
13525         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
13526
13527         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
13528
13529 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
13530         * liveness.c: If liveness is recomputated we need to reset the information
13531         for each variable. This way, if the liveness range has been narrowed
13532         by optimizations that happened after the last computation, we can return
13533         a smaller range.
13534         
13535         For example, if you have
13536         
13537         {
13538                 int i = 0;
13539                 
13540                 // Tons of code that does not affect i
13541                 
13542                 i = foo ();
13543                 ...
13544         }
13545         
13546         i = 0 is dead code and will be removed by SSA. However, when
13547         linear scan gets to the code, i will still appear to be live
13548         throughout the entire block. This prevents good register allocation.
13549
13550 2004-07-06  Martin Baulig  <martin@ximian.com>
13551
13552         * debug-mini.c (mono_debug_init_method): Allow
13553         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
13554         (mono_debug_add_icall_wrapper): New method.
13555
13556         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
13557
13558 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
13559
13560         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
13561         optimization.
13562
13563 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
13564
13565         * aot.c (mono_aot_load_method): Fix loading of debug info.
13566
13567 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13568
13569         * aot.c: Add logging support.
13570
13571 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13572
13573         * mini.h: Add prototype for mono_print_method_from_ip.
13574
13575         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
13576
13577         * inssel.brg: 64 bit fixes.
13578
13579         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
13580         inssel-long32.brg.
13581
13582         * Makefile.am: Add SPARC64 support.
13583
13584 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13585
13586         * aot.c: Fix alignment problems on 32 bit platforms.
13587
13588 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13589
13590         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
13591         SPARC64.
13592
13593         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
13594         problems.
13595
13596         * mini.h: Bump AOT file version. Some 64 bit fixes.
13597
13598 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13599
13600         * inssel-sparc.brg: Add new rule to avoid register moves.
13601
13602         * inssel.brg: Add ldind_to_load_membase helper function.
13603
13604 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
13605
13606         * mini.c: OffsetToStringData intrinsic.
13607         
13608 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13609
13610         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
13611
13612         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
13613         regression tests.
13614
13615         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
13616 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13617
13618         * mini.c: reinstated mono_compile_get_interface_var()
13619         on x86, too, since the change breaks the Gtk# build there as well.
13620
13621 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13622
13623         * driver.c: remove loop from the default optimizations: it seems to
13624         interact badly with some of the other options (see bug #60613).
13625
13626 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
13627
13628         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
13629         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
13630
13631 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
13632
13633         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
13634         vararg-using methods.
13635
13636 2004-06-21  Martin Baulig  <martin@ximian.com>
13637
13638         * mini/mini-exceptions.c
13639         (mono_handle_exception): Added `gpointer original_ip' argument.
13640         After calling mono_unhandled_exception(), call
13641         mono_debugger_unhandled_exception() and if that returns true,
13642         restore the context and return.
13643
13644 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13645
13646         * mini-ppc.c: prefer the use of relative branches so
13647         they won't need to be patched in aot code (patch from Patrick Beard).
13648
13649 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13650
13651         * aot.c: patch from Patrick Beard to make the output assembly
13652         more correct for the MacOSX assembler. Small tweak to
13653         generate sane images on Linux/PPC, too.
13654
13655 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13656
13657         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
13658         case until bug #59509 is fixed (shows up in #60332).
13659
13660 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13661
13662         * mini.c: make sure the needed wrappers are compiled, too, with
13663         precomp.
13664
13665 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
13666
13667         * driver.c: remove NPTL reference in --version output.
13668
13669 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13670
13671         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
13672         generate valid assembly for the Mach-O assembler.
13673
13674 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13675
13676         * driver.c: don't include abcrem in the all optimization specifier
13677         since it slows down jit compilation too much for now.
13678
13679 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
13680
13681         * mini.c: use BIGMUL only if both operands have the same signage.
13682         * iltests.il: Test for bug 60056. (errors related to signage in
13683         BIGMUL).
13684
13685         r=lupus.
13686
13687 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
13688
13689         * mini.c, aot.c: memory leak fixes.
13690
13691 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13692
13693         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
13694
13695 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
13696
13697         * Makefile.am: remove the -static hack completely, it links in
13698         statically glib as well.
13699
13700 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
13701
13702         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
13703         * exceptions.cs: make it compile with new mcs/csc.
13704
13705 2004-06-03 Massimiliano Mantione <massi@ximian.com>
13706         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
13707         and added relevant test case.
13708
13709 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13710
13711         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
13712         regressions in gtk-sharp.
13713
13714 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
13715
13716         * exceptions.cs: New regression tests.
13717
13718         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
13719
13720 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13721
13722         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
13723
13724 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
13725
13726         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
13727
13728         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
13729
13730 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
13731
13732         * mini.c (mono_jit_runtime_invoke): Init class in this
13733         method instead of trusting mono_jit_compile_method to
13734         do the work (because wrappers can be in object class)
13735
13736 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
13737
13738         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
13739
13740         * basic-long.cs: New regression test.
13741
13742 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
13743
13744         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
13745         and div/rem checks.
13746
13747 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13748
13749         * Makefile.am: fix miguel's change to build mono statically against
13750         libmono (track build dependencies).
13751
13752 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13753
13754         * cfold.c: Some glib versions do not have G_MININT32.
13755
13756 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
13757
13758         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
13759         with precision of tan, atan, sin and cos, and implemented related
13760         regressions tests (fixes bug 54467, but one new problem appeared and
13761         is not fixed yet).
13762
13763 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13764
13765         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
13766
13767         * exceptions.cs: Add test for constant folding && division by zero.
13768
13769         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
13770         since driver.c is in libmono too, so the optimization was useless.
13771
13772         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
13773         variable to driver.c so the compiler can emit more efficient code to
13774         access them.
13775
13776 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13777
13778         * Makefile.am: don't distribute generated inssel.[ch] files.
13779
13780 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
13781
13782         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
13783         into the default appdomain. Fixes #58707.
13784
13785         * jit-icalls.c: Remove the broken approximation for truncl, doing
13786         no conversion is better.
13787
13788         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
13789         Fixes #58863.
13790
13791 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13792
13793         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
13794         of the mcrxr instruction which is not available on some processors
13795         even if it's documented to be. Implement add and sub overflow correctly
13796         (still not complete for long unsigned). Speed up icalls a bit.
13797
13798 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
13799
13800         * mini.c (mono_jit_compile_method_with_opt): Make sure that
13801         we run .cctor in the current domain instead of target_domain.
13802         
13803         Fixes bug #58558, .cctor not being called in -O=shared.
13804
13805 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13806
13807         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
13808
13809 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
13810
13811         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
13812         which can be done with an imm8, do it that way.
13813         (mono_arch_output_basic_block): ditto for a jmp
13814         (mono_arch_emit_prolog): Computate maximum offset of a label.
13815
13816 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
13817
13818         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
13819         now tries to allocate prefered physical reg's for virtual
13820         regs. This reduces the number of emited spills/loads with
13821         20-30% on our core assemblies.
13822
13823 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13824
13825         * jit-icalls.c: truncl() is not needed and trunc() is
13826         the correct thing to do anyway (bug #58287).
13827
13828 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
13829
13830         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
13831         if available.
13832
13833 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13834
13835         * driver.c: enable loop optimizations by default.
13836
13837 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13838
13839         * mini-x86.c: fix calc of max loop size when aligning loops start.
13840
13841 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
13842
13843         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
13844         the stack.
13845
13846 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
13847
13848         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
13849         should set carry.
13850
13851         * basic-long.cs: Add tests for add/subtract of immediates with carry.
13852
13853         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
13854         
13855         * mini.c (inline_method): Allways inline some wrappers even if the cost
13856         is too large. Fixes #58785.
13857
13858         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
13859         
13860 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
13861
13862         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
13863         (crichton@gimp.org). Beginning of support for sparc/linux.
13864
13865         * mini-sparc.c: Optimize retrieval of LMF address.
13866
13867 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
13868
13869         * exceptions-ppc.c:  handle alloca in methods with clauses.
13870
13871 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
13872
13873         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
13874
13875 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
13876
13877         * mini.c: Delegate most of the abort signal work to 
13878           mono_thread_request_interruption, which also handles Stop and Suspend
13879           states.
13880
13881 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
13882
13883         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
13884         supports the save/restore lmf opcodes.
13885
13886 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
13887
13888         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
13889         by gcc-3.4 as well.
13890
13891         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
13892
13893 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13894
13895         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
13896         methods which contain array accesses.
13897
13898         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
13899         boundaries. Fixes #58537.
13900
13901         * iltests.il: Add regression test for #58537.
13902
13903 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13904
13905         * mini-x86.c (mono_arch_local_regalloc): Last part of
13906         fix for bug #58633 (releasing register to early).
13907
13908 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
13909
13910         * basic-long.cs: Add new regression test.
13911
13912 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13913
13914         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
13915         register too early on the chain.
13916
13917 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13918
13919         * mini.c (create_helper_signature): Use a helper function to reduce
13920         the code which needs to be written. Also set the calling convention of
13921         icalls on windows. Fixes #57840.
13922
13923 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13924
13925         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
13926         exceptions-ppc.c: added helper function to get the instruction address
13927         from a signal handler context.
13928
13929 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13930
13931         * helpers.c: use g_get_tmp_dir. Invokes happyness 
13932         from gonzalo.
13933
13934 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13935
13936         * helpers.c: Add new env variable to pass args to objdump.
13937         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
13938
13939 2004-05-17  Radek Doulik  <rodo@ximian.com>
13940
13941         * Makefile.am (common_sources): added abcremoval.h so it get
13942         disted and daily mono packages on go-mono.com will build again
13943
13944 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
13945
13946         * abcremoval.c: Fixed coding style, added copyright header.
13947
13948         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
13949
13950         * mini.h: Added prototype for abc removal main function.
13951
13952         * build_relations_propagation_table.pl: Added copyright header.
13953
13954 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13955
13956         * basic-long.cs: reg test for complex ceq_long bug.
13957
13958 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13959
13960         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
13961         reg in long and clob case (bug #58343). Fixed/added comments.
13962
13963 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
13964
13965         * mini.c (mono_jit_runtime_invoke): Follow new convention
13966         of calling the invoke method with an function pointer.
13967
13968 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
13969
13970         * ChangeLog: Fix author of memory leak patch.
13971
13972 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
13973
13974         * Makefile.am: fix make dist as well...
13975
13976
13977 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
13978
13979         * cfold.c: Made so that conversions from pointer to int4 are no-ops
13980         on archs where pointers are 4 bytes long.
13981
13982         * Makefile.am: Added abcremoval.c source file.
13983
13984         * abcremoval.c: Added abcremoval.c.
13985
13986         * abcremoval.h: Added abcremoval.h.
13987
13988         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
13989
13990         * inssel.brg: Enabled bounds check removal.
13991
13992         * mini.c: Added support for abcrem optimization.
13993
13994         * mini.h: Added abcrem optimization label.
13995
13996         * driver.c: Added support for abcrem optimization.
13997
13998         * propagated_relations_table.def: Added propagated_relations_table.def.
13999
14000 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
14001
14002         * mini.c, cfold.c: fix style.
14003
14004 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14005
14006         * mini.c: handle issue with the low-level implementation of
14007         some long opcodes (bug #54209).
14008
14009 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
14010
14011         * basic.cs: test for my new cmov stuff.
14012
14013 2004-05-13      Patrik Torstensson
14014
14015         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
14016         opt and added peephole documentation.
14017
14018 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14019
14020         * tramp-ppc.c: rewrote the generic trampoline code.
14021
14022 2004-05-11      Patrik Torstensson
14023
14024         * mini-x86.c: optimize long shl/shr asm code (one less branch)
14025
14026 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
14027
14028         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
14029
14030         * mini.h mini.c dominators.c: Applied patch from Derek Woo
14031         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
14032
14033         * mini.c: Add new icalls for AsAny marshalling.
14034
14035 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14036
14037         * tramp-ppc.c, mini-ppc.c: more cleanups.
14038
14039 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14040
14041         * mini.c: no warnings.
14042
14043 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14044
14045         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
14046
14047 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
14048
14049         * mini.c: In the thread abort signal handler, if the thread is in the
14050         process of being stoped, don't throw the Abort exception, just stop the
14051         thread.
14052
14053 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
14054
14055         * tramp-ppc.c: removed old code.
14056
14057 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14058
14059         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
14060         do some simple speed optimizations on ppc.
14061
14062 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14063
14064         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
14065         and large offsets in load/store.
14066
14067 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14068
14069         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
14070         it causes regressions.
14071
14072 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14073
14074         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
14075         support.
14076
14077 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14078
14079         * jit-icalls.c: remove warnings.
14080         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
14081         speedups for unsafe code.
14082
14083 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
14084
14085         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
14086
14087 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
14088
14089         * basic-calls.cs: Add new regression test.
14090
14091         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
14092         more portable.
14093
14094         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
14095
14096         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
14097         is no longer used.
14098
14099 2004-05-06      Patrik Torstensson
14100
14101         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
14102         long reg allocation in any reg (not only eax:edx) and implemented 
14103         long shl/shr ops in asm instead of helpers.
14104
14105 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
14106
14107         * mini-sparc.h: Fix warnings.
14108
14109         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
14110         stack.
14111
14112         * mini-exceptions.c (mono_handle_exception): Call the filter in a
14113         separate statement for clarity.
14114
14115         * mini-sparc.c: Update status.
14116
14117 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
14118
14119         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
14120         here.
14121
14122 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14123
14124         * inssel-ppc.brg: another small pre-release workaround:
14125         we don't do overflow detection for long_sub_un.
14126
14127 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14128
14129         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
14130         (also works around a weird ppc bug: 57957).
14131
14132 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
14133
14134         * tramp-ppc.c: trampoline fixes.
14135
14136 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
14137
14138         * mini-ppc.c: fixed typos.
14139
14140 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14141
14142         * mini-ppc.c, exceptions-ppc.c: more code saves registers
14143         at the top of the stack. Fixed typos. Use a frame registers
14144         for all the methods with exception clauses.
14145
14146 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14147
14148         * exceptions-ppc.c: restore fp registers.
14149
14150 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14151
14152         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
14153         order from the stack top (moved the stack room to save the
14154         return value for trace after the param area). Fixed corruption
14155         in restoring registers on unwind.
14156
14157 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14158
14159         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
14160
14161 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14162
14163         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
14164         and prolog/epilog for methods that use it. Allow
14165         enough param area room for varargs methods. Fix miguel's
14166         breakage in exception handling.
14167
14168 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14169
14170         * Makefile.am: run genmdesc only on current arch.
14171
14172 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14173
14174         * exceptions-x86.c:
14175         * mini-x86.h: fix the build on windows.
14176
14177 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
14178
14179         * 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.
14180
14181         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
14182
14183         * mini-exceptions.c: New file.
14184         
14185         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
14186         Move some parts of the x86 exception handling code to an 
14187         arch-independent file so it can be shared with other ports.
14188
14189 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
14190
14191         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
14192
14193 2004-04-26  David Waite  <mass@akuma.org>
14194
14195         * driver.c: remove comma from end of enumeration declaration
14196
14197 2004-04-26  Jackson Harper  <jackson@ximian.com>
14198
14199         * driver.c: parse config file before loading first assembly. This
14200         allows the user gac to be enabled/disabled. 
14201         
14202 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
14203
14204         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
14205         simpler mechanism: we do not care what is encoded initially
14206         (branch absolute or relative), we care about the code and its
14207         target.  I kept the old code for reference for now.
14208
14209         The new code tries first to determine if the jump is anywhere in
14210         the -/+32 absolute meg range, if it succeeds, it encodes using the
14211         absolute branch;  If not, it tried to find something in the
14212         relative range, if not, it uses the handle_thunk code. 
14213
14214 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
14215
14216         * exceptions-ppc.c: use the correct ip register on macosx.
14217
14218 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
14219
14220         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
14221
14222 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
14223
14224         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
14225         Raise exception on integer divide by zero by hand since the hw
14226         doesn't support it. Handle NaNs in FP compares.
14227
14228 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
14229
14230         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
14231         code reducing duplication between the platforms and enabled
14232         signal exception handling (on linux for now).
14233
14234 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
14235
14236         * exceptions-ppc.c: more macosx support.
14237
14238 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14239
14240         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
14241
14242 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
14243
14244         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
14245
14246 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
14247
14248         * iltests.il: more tests.
14249
14250 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14251
14252         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
14253         vars as well.
14254
14255 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14256
14257         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
14258
14259 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14260
14261         * liveness.c: Mark variables as volatile in all basic blocks reachable
14262         from exception clauses.
14263
14264 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
14265
14266         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
14267         inlining.
14268
14269 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
14270
14271         * iltests.il, basic.cs: more tests for regalloc.
14272
14273 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14274
14275         * iltests.il: Some tests for register allocation modifications
14276         I have locally.
14277
14278 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
14279
14280         * exceptions.cs: Add regression test for bug #56782.
14281
14282         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
14283         original stack trace if an exception is rethrown. Fixes #56782. Oh,
14284         the beauty of fixing the same thing in 5 different files...
14285
14286 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
14287
14288         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
14289         methods.
14290
14291 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
14292
14293         * mini.c: Add support for STRWLPARRAY marshalling convention.
14294
14295 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
14296
14297         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
14298         to init the context to setup the regs pointer).
14299
14300 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14301
14302         * exceptions-ppc.c: more exceptions work.
14303
14304 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14305
14306         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
14307         not allowed.
14308
14309 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14310
14311         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
14312         can use the memory directly.
14313
14314         * cpu-pentium.md: Update documentation from a post from Zoltan. 
14315
14316         add x86_add_membase, x86_sub_membase, x86_mul_membase
14317
14318 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14319
14320         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
14321         GENERAL_REGS they were also hardcoded for all PPC ports.
14322
14323         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
14324
14325         Remove hard-coded limit for floating point registers, use
14326         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
14327
14328         Notice that in MacOS X calling conventions you can fit a lot more
14329         floating point values in registers, so I should update the PInvoke
14330         test to excercise the passing of floating point values on the
14331         stack (currently broken).
14332         
14333 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
14334
14335         * tramp-ppc.c (create_trampoline_code): Added
14336         JUMP_TRAMPOLINE_SIZE. 
14337         (ppc_magic_trampoline): Follow the pattern from
14338         x86_magic_trampoline: if code is set to zero, return. 
14339         (create_trampoline_code): Always pass MonoMethod to the jump
14340         trampoline, before it was passing a null.
14341         (mono_arch_create_jump_trampoline): Implement the jump stub, could
14342         share the code with mono_arch_create_jit_trampoline. 
14343
14344         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
14345         implemented.
14346         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
14347         implemented.  
14348
14349         * cpu-g4.md: Added length for jmp instruction, the worst case
14350         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
14351         for save_lmf).
14352
14353 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
14354
14355         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
14356
14357 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
14358
14359         * mini.c: Only set bblock->real_offset when adding a new bblock, and
14360         before each IL instruction.
14361
14362         * mini.c (CEE_BOX): Fix warnings.
14363
14364 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14365
14366         * mini.c: removed a few unused vars and extra whitespace.
14367
14368 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
14369
14370         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
14371         checks.
14372         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
14373         index.
14374         (OP_GETCHR): use the above
14375         (CEE_LDELEMA): use the above.
14376
14377         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
14378         version of the generic impl.
14379         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
14380         (CEE_LDELEMA): use the above.
14381
14382 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14383
14384         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
14385         Fixes #56317.
14386
14387         * iltests.il: Added new regression test for #56317.
14388
14389 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14390
14391         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
14392         under NetBSD. Fixes #56450.
14393
14394         * liveness.c (update_gen_kill_set): Fix previous patch.
14395
14396 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14397
14398         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
14399
14400 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
14401
14402         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
14403         ldsfld and ldsflda.
14404
14405         * inssel-sparc.brg: Add more optimizations.
14406
14407         * mini-sparc.c: Replace multiply/divide with shifts if possible.
14408
14409 2004-04-01  Martin Baulig  <martin@ximian.com>
14410
14411         * mini.c (handle_box): New static function; moved the
14412         implementation of CEE_BOX here.
14413         (mono_method_to_ir): Added `constrained_call' variable.
14414         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
14415         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
14416         mono_method_get_constrained() to get the method.
14417
14418 2004-04-01  Martin Baulig  <martin@ximian.com>
14419
14420         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
14421         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
14422         (mono_method_to_ir): We don't need these macros anymore since
14423         mono_class_get_full() already takes care of it. 
14424
14425 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14426
14427         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
14428         use @function (as doesn't accept #function here) and check the return
14429         value of system and stop if fails.
14430
14431 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14432
14433         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
14434
14435 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
14436
14437         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
14438
14439         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
14440
14441         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
14442         #56223.
14443
14444         * basic-long.cs: Add test for negation of Int64.MinValue.
14445
14446 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
14447
14448         * mini-sparc.c: Update status.
14449
14450         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
14451
14452         * exceptions-sparc.c: Fix return value in filters.
14453
14454         * inssel-sparc.brg: Fix register allocation in some rules.
14455
14456 2004-03-28  Martin Baulig  <martin@ximian.com>
14457
14458         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
14459         if neccessary.  
14460
14461 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
14462
14463         * mini-x86.c (mono_arch_patch_code): Fix warnings.
14464         
14465         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
14466         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
14467         remove unused conv_u4 opcode.
14468
14469         * mini-x86.c: Remove valgrind workaround since it slows down things
14470         even when mono is not run under valgrind.
14471
14472 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
14473
14474         * mini-sparc.c: Update status.
14475
14476         * inssel-sparc.brg: Add some optimizations.
14477
14478         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
14479         future delay slot filling. Add support for varargs, tail calls and JMP.
14480
14481         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
14482         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
14483
14484         * inssel.brg: Fix register allocation in OP_ARGLIST.
14485
14486         * inssel.brg: Fix warnings.
14487
14488 2004-03-25  Martin Baulig  <martin@ximian.com>
14489
14490         * mini.c (inflate_generic_field): Removed.
14491         (mini_get_method): Removed, use mono_get_method_full(),
14492         (mini_get_class): Removed, use mono_class_get_full().
14493         (mono_method_to_ir): Pass our generic context to
14494         mono_field_from_token().        
14495
14496 2004-03-25  Martin Baulig  <martin@ximian.com>
14497
14498         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
14499         of a `MonoMethod *'.
14500         (mini_get_method): Take a `MonoGenericContext *' instead
14501         of a `MonoMethod *'.
14502         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
14503         a new local variable called `generic_context' which holds the
14504         current `MonoGenericContext *'; use it to lookup things.
14505
14506 2004-03-24  Martin Baulig  <martin@ximian.com>
14507
14508         * mini.c (mini_get_class): New static method; if we're inside a
14509         generic instance, inflate the class if neccessary.
14510         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
14511
14512 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
14513
14514         * iltests.il: New regression test for #55976.
14515
14516         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
14517         #55976.
14518
14519 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
14520
14521         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
14522         output.
14523
14524 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
14525
14526         * liveness.c: Consider SSA stores as well as loads when making vars
14527         volatile.
14528
14529         * exceptions.cs: New regression tests for register allocation.
14530         
14531 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
14532
14533         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
14534         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
14535           domain lock only to protect puntual access to data structures.
14536           Added access lock for sighash, jit_icall_hash_name, 
14537           jit_icall_hash_addr and domain->code_mp.
14538
14539 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
14540
14541         * driver.c: Print SIGSEGV handling method.
14542
14543         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
14544
14545         * mini.c (setup_jit_tls_data): Handle case when this is called
14546         multiple times for a thread.
14547
14548         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
14549         is different from fbxx_un. Fixes #54303. Also use constants instead of
14550         magic numbers in a lot of places.
14551
14552 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
14553
14554         * exceptions.cs: Fix cctor test when --regression is used.
14555
14556 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
14557
14558         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
14559         for Linux/ppc.
14560
14561 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14562
14563         * inssel-ppc.brg: fixed register assignments for some rules.
14564
14565 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14566
14567         * exceptions.cs: Add test for exceptions in static constructors.
14568
14569         * mini.c (mono_jit_compile_method_with_out): Move the calling of
14570         static constructors outside the domain lock. Fixes #55720.
14571
14572 2004-03-17  Martin Baulig  <martin@ximian.com>
14573
14574         * mini.c (get_generic_field_inst): Removed, this'll never happen.
14575         (inflate_generic_field): Take the `MonoMethod *' instead of the
14576         `MonoClass *' and added support for generic method.
14577         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
14578         have a `field->parent->gen_params', only inflate the field if it's
14579         an open constructed type.
14580
14581 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14582
14583         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
14584         exception object instead of the preconstructed ones.
14585
14586 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14587
14588         * mini.c: reverted changed to sigsegv_signal_handler commited
14589         accidentally in the previous patch.
14590
14591 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14592
14593         * mini.c:
14594         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
14595         running --aot with an old assembly.
14596
14597 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
14598
14599         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
14600         point values.
14601
14602         * mini-sparc.c: Add support for v9 branches with prediction.
14603
14604 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
14605
14606         * mini.c (mini_init): #warning is GNUC only
14607
14608         * mini-sparc.h: implement __builtin_frame_address
14609         and __builtin_return_address for Sun C compiler
14610
14611 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
14612
14613         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
14614
14615 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
14616
14617         * basic-calls.cs: Add test for unaligned byref long argument passing.
14618
14619         * mini-ops.h: Add sparcv9 compare and branch instructions.
14620
14621         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
14622         v9 instructions if we have a v9 cpu.
14623
14624         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
14625         registers for global allocation.
14626
14627         * exceptions-sparc.c: Fixes.
14628         
14629 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
14630
14631         * liveness.c (mono_analyze_liveness): Optimized version.
14632
14633         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
14634
14635         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
14636         sparc work.
14637
14638         * basic-float.cs basic-calls.cs: New regression tests.
14639
14640 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
14641
14642         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
14643         sigaltstack implementation.
14644
14645         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
14646         
14647         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
14648         stuff if SIGSEGV_ON_ALTSTACK is not defined.
14649
14650 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
14651
14652         * mini.c: Fix warnings.
14653         
14654         * mini.c (mono_resolve_patch_target): New function which contains the
14655         arch independent part of the patching process.
14656
14657         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
14658         patching code to a separate function.
14659
14660 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
14661
14662         * mini.c (add_signal_handler): ifdef out on Windows
14663
14664 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
14665
14666         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
14667         cpu-sparc.md: Add exception handling support + other fixes.
14668
14669         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
14670         typed GC detection in --version.
14671
14672         * basic.cs exceptions.cs: New regression tests.
14673
14674         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
14675         the arch specific code can store data during a compilation.
14676
14677         * mini-ops.h: Add OP_SETFRET.
14678
14679         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
14680         function, register a separate icall for each arity, so the icalls can
14681         get a wrapper.
14682         
14683         * mini.c (mono_print_tree): Print negative offsets in a more readable
14684         form.
14685         
14686         * mini.c: Make signal handling work on sparc.
14687         
14688         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
14689
14690         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
14691
14692         * jit-icalls.c: Emulate truncl by aintl on solaris.
14693
14694         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
14695
14696 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
14697
14698         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
14699
14700 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
14701
14702         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
14703         a MarshalByRef type, inline a method that performs the check, taking into
14704         account that the object can be a proxy. Also implemented tow new opcodes:
14705         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14706         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
14707         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14708
14709 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
14710
14711         * mini-ppc.c: if a relative branch displacement is too big
14712         but it points to and area reachable with an absolute branch, 
14713         avoid the thunks.
14714
14715 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
14716
14717         * mini.c: optimize small copies in cpblk.
14718
14719 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
14720
14721         * basic-calls.cs basic-float.cs: New regression tests.
14722
14723         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
14724         negative offsets from %fp. Implement localloc. Fix local register 
14725         allocation. Fix the case when the this argument needs to be saved to
14726         the stack. Implement some missing opcodes.
14727
14728 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
14729
14730         * mini.c (mini_method_compile): Reenable global regalloc in methods
14731         with exception handlers.
14732
14733         * linear-scan.c (mono_varlist_sort): Fix warning.
14734
14735         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
14736
14737         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
14738         regalloc costs.
14739
14740         * liveness.c: Make all variables uses in exception clauses volatile, to
14741         prevent them from being allocated to registers. Fixes #42136.
14742
14743 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
14744
14745         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
14746         causes regressions.
14747
14748         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
14749         argument to mono_arch_regalloc_cost.
14750
14751         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
14752         precisely.
14753
14754 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
14755
14756         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
14757         Make the cost of allocating a variable to a register arch dependent.
14758
14759         * basic-calls.cs: Fix compilation of tests.
14760         
14761         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
14762         helper function to cut back on the number of #ifdefs needed.
14763
14764         * mini-ppc.c: Fix compilation.
14765
14766         * basic-calls.cs: New regression tests.
14767
14768         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
14769
14770         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
14771         of l0 since that is callee saved.
14772
14773         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
14774         to virtual calls.
14775
14776         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
14777         of delay instruction.
14778
14779         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
14780
14781         * mini.h (MonoCallInst): Add 'virtual' flag.
14782
14783         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
14784
14785 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
14786
14787         * *.cs: New regression tests.
14788
14789         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
14790         work.
14791
14792         * mini.c (mono_runtime_install_handlers): Fix build.
14793
14794         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
14795         'signal_stack_size' members.
14796
14797         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
14798         alternate signal stack.
14799
14800         * exceptions-x86.c: Add stack overflow handling.
14801
14802         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
14803         functions to arch independent code.
14804
14805         * mini.c (mono_print_tree): Print more detailed info for load_membase
14806         opcodes.
14807         
14808 2004-02-23  Martin Baulig  <martin@ximian.com>
14809
14810         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
14811
14812 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14813
14814         * mini-x86.c: fixed reg allocation for div/rem.
14815
14816 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
14817
14818         * driver.c (mono_main): Report some configuratio options on --version.
14819
14820 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
14821
14822         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
14823         low in the address space. Correctly flush memory in thunks where we
14824         output native code.
14825
14826 2004-02-20  Martin Baulig  <martin@ximian.com>
14827
14828         * mini.c (mini_get_method): New static method; inflate all generic
14829         methods and methods in open generic instances.
14830         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
14831         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
14832
14833 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14834
14835         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
14836
14837         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
14838
14839 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
14840
14841         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
14842
14843         * mini-sparc.c (flushi mono_arch_output_basic_block): make
14844         it compile using Sun's compiler.
14845
14846 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14847
14848         * 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.
14849
14850         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
14851
14852 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14853
14854         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
14855         code.
14856         * mini-ppc.c: handle calls outside of the allowed range with thunks
14857         allocated using the code manager.
14858         * tramp-ppc.c: use the code manager to hold generated native code.
14859         Fixed the magic trampoline to just patch vtable entries.
14860
14861 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
14862
14863         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
14864         independent file.
14865
14866 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
14867
14868         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
14869         PPC.
14870
14871         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
14872         if we have a working __thread implementation.
14873
14874         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
14875         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
14876
14877 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
14878
14879         * mini-x86.c: Fix compilation under gcc 2.
14880         
14881 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
14882
14883         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
14884         contains a call to the wrapped function.
14885
14886         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
14887         OP_<CALL>_IMM opcodes, and use them under X86.
14888         
14889         * mini.c (mono_jit_find_compiled_method): Fix warning.
14890
14891         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
14892
14893         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
14894
14895         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
14896         functionality to mini.c.
14897
14898         * mini.c (mono_create_jump_trampoline): New function to create a jump
14899         trampoline. Return a compiled method instead of a trampoline if it
14900         exists. Add a cache for jump trampolines.
14901
14902         * mini.c (mono_jit_find_compiled_method): New function to return a
14903         compiled method if it exists.
14904
14905         * mini-x86.c: Call mono_create_jump_trampoline instead of 
14906         mono_arch_create_jit_trampoline.
14907
14908         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
14909         a jump trampoline. Fixes #52092.
14910         
14911 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
14912
14913         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
14914         which is not up-to-date. Add check_corlib_version () instead.
14915
14916         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
14917         have to call it.
14918         
14919         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
14920         since newer valgrind versions do not need it.
14921
14922         * mini.c (mono_jit_compile_method_with_opt): New helper function to
14923         compile a method with a given set of optimizations.
14924
14925         * mini.c: Compile icall wrappers on-demand instead of at startup.
14926
14927         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
14928         wrapper for an icall.
14929
14930 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
14931
14932         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
14933         #54063.
14934
14935         * iltests.il: Add test for non-empty stack before switch instruction.
14936
14937 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
14938
14939         * mini.c: Add support for new stringbuilder marshalling conventions.
14940
14941         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
14942
14943 2004-02-01  Martin Baulig  <martin@ximian.com>
14944
14945         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
14946         in `ginst->mtype_argv'.
14947
14948 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
14949
14950         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
14951         facilitate grepping.
14952
14953 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
14954
14955         * mini.c: fixed buglet in initobj generic implementation for references.
14956
14957 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
14958
14959         * Makefile.am: make the version script conditional.
14960         * jit-icalls.c: handle missing truncl().
14961
14962 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
14963
14964         * exceptions.cs: Add more tests for double->int conversion.
14965
14966         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
14967         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
14968
14969 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
14970
14971         * driver.c: make --verbose --version emit an error
14972         if the loaded corlib doesn't match the runtime version.
14973
14974 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
14975
14976         * mini-ppc.h: export ppc_patch().
14977         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
14978         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
14979         on par or better than on MacOSX.
14980
14981 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
14982
14983         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
14984         mono_lookup_pinvoke_call.
14985
14986         * mini-x86.c: Under windows, the default pinvoke calling convention is
14987         stdcall. Fixes #52834.
14988
14989         * mini.c (optimize_branches): Add an upper bound to the number of
14990         iterations to prevent infinite loops on strange loops. Fixes #53003.
14991
14992 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
14993
14994         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
14995         and ISINST. Fixes #52093.
14996
14997         * objects.cs (test_0_vector_array_cast): New tests.
14998         
14999 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
15000
15001         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
15002         checking in Array.Set ().
15003
15004         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
15005         #52590.
15006
15007         * object.cs (test_0_multi_array_cast): New regression test.
15008
15009 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
15010
15011         * exceptions-ppc.c: fix build on Linux/PPC.
15012
15013 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
15014
15015         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
15016         running under valgrind.
15017         (x86_magic_trampoline): Fix build bustage.
15018
15019         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
15020         negative values as well. This is needed for the encoding of the line number
15021         info, since sometimes the line numbers are not in increasing order.
15022
15023 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
15024
15025         * cpu-pentium.md (localloc): Increase the size of the localloc 
15026         instruction since it is a loop under Win32.
15027
15028         * debug-mini.c (record_line_number): Get rid of unneccesary memory
15029         allocation.
15030
15031 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
15032
15033         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
15034         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
15035         Max Horn (max@quendi.de). Fix file names in comments.
15036
15037 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
15038
15039         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
15040         avoid stack overflow.
15041         (replace_usage): Avoid uninitialized variable warnings.
15042
15043         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
15044         and taking the address of valuetype variables.
15045
15046 2004-01-03  Patrik Torstensson
15047
15048         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
15049         for other purposes than FP later on.
15050
15051 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
15052
15053         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
15054         of tail calls.
15055
15056 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
15057
15058         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
15059
15060 2003-12-30  Patrik Torstensson <p@rxc.se>
15061
15062         * mini-x86.h: Decreased number of availiable fp regs.
15063         Solves corner cases with FP spilling.
15064
15065 2003-12-23  Patrik Torstensson <p@rxc.se>
15066
15067         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
15068         for floating point stack tracking / spilling on x86. 
15069         Fixes bug #49012.
15070         
15071         * basic-float.cs: added float mul overflow test.
15072
15073 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
15074
15075         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
15076
15077 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15078
15079         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
15080         supports for cond branches that overflow the immediate
15081         overflow offset. mcs can compile simple programs.
15082
15083 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15084
15085         * exceptions-ppc.c: exception handling support wip:
15086         finally handlers get run on exception.
15087
15088 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
15089
15090         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
15091         profiling.
15092
15093 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15094
15095         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
15096         initial support for stack walking and unwinding.
15097
15098 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
15099
15100         * driver.c (mono_main): Make corlib-out-of-sync message more 
15101         descriptive. Also remove verify_corlib call.
15102
15103 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15104
15105         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
15106         not overlap with other call's arguments, too.
15107
15108 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
15109
15110         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
15111         move to arch-specific code the choice of arch-specific
15112         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
15113         * mini.c: ensure emulation calls will not interleave
15114         with other calls.
15115
15116 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
15117
15118         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
15119         the magic trampoline stack frame is dropped before executing
15120         the new method.
15121
15122 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15123
15124         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
15125         and integer to fp conversions. Added support for overflowing
15126         arguments on the stack. Reserve a couple more registers as temps.
15127         Added support for aot compilation (as output still needs to be
15128         tweaked, though).
15129
15130 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15131
15132         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
15133         Don't overwrite return register in some corner cases.
15134
15135 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
15136
15137         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
15138         static constructors when AOT compiling.
15139
15140         * driver.c (mono_main): Call mono_check_corlib_version.
15141
15142 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15143
15144         * cpu-g4.md, basic.cs: fixed div target register.
15145
15146 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
15147
15148         * mini-ppc.c, basic.cs: shl_imm fix with test.
15149
15150 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15151
15152         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
15153         structures by value. Misc fixes.
15154         * objects.cs: more tests.
15155
15156 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
15157
15158         * mini-ppc.c: lconv.ovf.i implemented.
15159
15160 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15161
15162         * mini.c:
15163         (mini_init): don't error out if someone already called g_thread_init.
15164
15165 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15166
15167         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
15168         to be any type per the spec. Fix abnormal memory usage when
15169         the same object is repeatedly thrown.
15170
15171 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
15172
15173         * mini.c: check for overruns in IL code.
15174
15175 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
15176
15177         * TODO: Add/remove some todo entries.
15178
15179 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
15180
15181         * driver.c (mono_main): Call mono_verify_corlib.
15182
15183 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
15184
15185         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
15186         This has been moved to mini.c
15187         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
15188         type being casted is marshalbyref it could be a proxy, so instead of
15189         emitting the type check code, emit a call to a runtime method that will
15190         perform the check by calling CanCastTo if needed.
15191
15192 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
15193
15194         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
15195         methods with large stack frames under Win32.
15196
15197 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
15198
15199         * Makefile.am: Distribute regression tests.
15200
15201         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
15202         at the end instead of inserting each variable into the sorted list.
15203
15204         * linear-scan.c (mono_varlist_sort): New helper function.
15205         
15206 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15207
15208         * mini.c: ensure arguments and locals are within bounds.
15209
15210 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15211
15212         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
15213         related fixes.
15214
15215 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
15216
15217         * mini.c (mono_cprop_copy_values): Fix crash.
15218
15219         * aot.c: Set verbosity back to 0.
15220         
15221 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15222
15223         * regalloc.c: complete memory leak fix by Laurent Morichetti
15224         (l_m@pacbell.net).
15225
15226 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
15227
15228         * driver.c (main_thread_handler): Revert the previous patch.
15229
15230         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
15231         under valgrind.
15232
15233         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
15234         memory from the memory pool.
15235
15236         * driver.c (main_thread_handler): Turn on all optimizations when
15237         --aot is used.
15238
15239         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
15240         an array for better performance.
15241
15242         * regalloc.c (mono_regstate_assign): Fix memory leak.
15243
15244         * debug-mini.c (mono_debug_serialize_debug_info): New function to
15245         serialize the debug info.
15246
15247         * debug-mini.c (mono_debug_add_aot_method): New function to load the
15248         debug info from the serialized representation.
15249
15250         * aot.c: Save debug info into the generated file and load it when 
15251         loading a method.
15252
15253         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15254
15255 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15256
15257         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
15258         More FP-related fixes.
15259
15260 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15261
15262         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
15263         and register allocation buglet. Hello world now runs.
15264
15265 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15266
15267         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
15268         * tramp-ppc.c: fixed class init trampoline.
15269         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
15270
15271 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15272
15273         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
15274         mini.c: more ppc changes/fixes.
15275
15276 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15277
15278         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
15279         Also optimize the case when the arguments are the same in the caller 
15280         and in the callee.
15281
15282         * iltests.il: Add tests for tail calls with valuetype arguments.
15283
15284 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15285
15286         * mini-ppc.c: fixes for struct return type.
15287
15288 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
15289
15290         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
15291         mono_spillvar_offset() to arch-specific code.
15292
15293 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15294
15295         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
15296
15297 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15298
15299         * exceptions-x86.c: Fix stack space leaks.
15300         
15301         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
15302         registers from the lmf if the method has save_lmf set.
15303
15304 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
15305
15306         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
15307         of icall wrappers into InvokeInDomain, since these are now per-domain.
15308
15309 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
15310
15311         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
15312         make some opcode emulation and intrinsic ops enabled/disabled 
15313         according to the architecture. More fixes.
15314
15315 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15316
15317         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
15318
15319 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15320
15321         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
15322         arch-specific handling for 'this' and struct return type to
15323         arch-specific code.
15324
15325 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15326
15327         * aot.c: prevent divide by zero error when reporting (it happened with
15328         Accessibility.dll).
15329
15330 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
15331
15332         * mini.h (inst_switch): Remove unused macro.
15333
15334 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15335
15336         * aot.c:
15337         (load_aot_module): free 'info->methods' and 'info' properly. No more
15338         "free(): invalid pointer blah" messages when you have an old aot
15339         compiled assembly.
15340
15341 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
15342
15343         * jit-icalls.c, mini.c: Added support for context static fields.
15344
15345 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15346
15347         * mini.c (mono_method_blittable): Methods which set LastError are not 
15348         blittable either. Fixes #51108.
15349         
15350 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15351
15352         * mini.c: flush icache.
15353         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
15354
15355 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15356
15357         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
15358
15359 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
15360
15361         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
15362         safe on IA32.
15363
15364         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
15365         vararg calls.
15366
15367         * inssel.brg (CEE_MKREFANY): Fix AOT case.
15368
15369 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
15370
15371         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
15372         instruction when the result is discarded.
15373
15374         * iltests.il (test_0_div_regalloc): New regression test.
15375
15376         * arrays.cs: Fix compilation error.
15377
15378 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
15379
15380         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
15381         float rules to inssel-x86.brg: sane architectures with FP registers
15382         don't need to implement these rules.
15383
15384 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15385
15386         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
15387
15388 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15389
15390         * mini.h, inssel-long32.brg: fixed endianess issues in int64
15391         implementation of 32 bit systems.
15392
15393 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15394
15395         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
15396         (Jeroen Zwartepoorte).
15397
15398 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
15399
15400         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
15401         the caller and the callee matches.
15402         
15403         * mini.c (mono_method_to_ir): Add comment.
15404
15405         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
15406         signbit is missing on some platforms.
15407
15408 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
15409
15410         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
15411
15412         * mini.c (setup_jit_tls_data): Call the new function.
15413         
15414         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
15415
15416         * mini-x86.c: Add experimental support for fast access to the lmf
15417         structure under NPTL/Linux 2.6.x.
15418
15419 2003-11-06  Martin Baulig  <martin@ximian.com>
15420
15421         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
15422         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
15423         the debugger.
15424
15425 2003-11-02  Martin Baulig  <martin@ximian.com>
15426
15427         * mini.c (inflate_generic_field): New static method.
15428         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
15429         generic instance and the field is declared in a generic type, call
15430         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
15431
15432 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
15433
15434         * mini.h mini.c (mono_method_same_domain): New function to return
15435         whenever the caller and the callee are in the same domain.
15436
15437         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
15438
15439 2003-10-30  Martin Baulig  <martin@ximian.com>
15440
15441         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
15442         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
15443         method parameters.
15444         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
15445         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
15446
15447 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
15448
15449         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
15450         propagation.
15451
15452         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
15453         object here, so it is in the correct appdomain etc.
15454
15455 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
15456
15457         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
15458         already done.
15459         (mono_method_to_ir): Avoid freeing the type created returned from
15460         mono_type_create_from_typespec, since it is put into an internal cache
15461         by the function. Fixes pointer.exe.
15462
15463         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
15464         trampolines for icalls and pinvokes as well. Fixes #33569.
15465
15466 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
15467
15468         * mini.c: Update after appdomain changes.
15469
15470         * mini.c (mono_jit_compile_method_inner): Allways compile native
15471         method wrappers in the root domain, since there can only be one
15472         instance of them, whose address is stored in method->info.
15473
15474 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
15475
15476         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
15477         environment variable. Instead detect automatically whenever running
15478         under valgrind using the magic macro RUNNING_ON_VALGRIND from
15479         valgrind.h.
15480
15481 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
15482
15483         * trace.c, trace.h: New files that implement the new trace option
15484         parsing. 
15485
15486         * driver.c: Document new --trace options.
15487
15488         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
15489         mini-x86.c: Apply:
15490
15491         -       if (mono_jit_trace_calls)
15492         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
15493
15494         * mini.h: prototypes.
15495         
15496 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
15497
15498         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
15499
15500         * mini.c inssel.brg: Implement typedefbyref opcodes.
15501
15502         * mini.c (mono_jit_compile_method): Remove unused local variable.
15503
15504         * mini.c (mono_jit_compile_method_inner): Ditto.
15505         
15506 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
15507
15508         * tramp-x86.c (x86_class_init_trampoline): Fix build.
15509         
15510         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
15511
15512 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
15513
15514         * mini.c (mono_no_aot): Remove unused global variable.
15515
15516         * mini.c: Thread safety fixes.
15517
15518 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
15519
15520         * mini.c (mono_create_class_init_trampoline): Add a lock around
15521         class_init_hash_addr.
15522
15523         * arrays.cs (test_0_newarr_emulation): Add new regression test for
15524         #30073.
15525
15526         * mini.c: Decompose the NEWARR instruction before decomposing its
15527         arguments. Fixes #30073.
15528
15529 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
15530
15531         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
15532         convention.
15533
15534 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
15535
15536         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
15537
15538         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
15539
15540         * driver.c: Add support for compiling icall wrappers to --compile.
15541
15542 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
15543
15544         * inssel.brg: The empty value in class->interface_offsets is -1, not
15545         0. Fixes #49287.
15546
15547 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
15548
15549         * objects.cs: New test for 'is' operator on an array of interfaces.
15550
15551 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15552
15553         * tramp-ppc.c: update trampoline code to support jumps
15554         and class initialization.
15555
15556 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
15557
15558         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
15559
15560         * inssel.brg (OP_UNBOXCAST): Fix #46027.
15561
15562         * inssel.brg (OP_UNBOX): Remove unused rule.
15563
15564         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
15565         region instead of one for each method. Fixes #47813.
15566
15567 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
15568
15569         * exceptions.cs (test_0_nested_finally): New regression test for
15570         nested exception handlers.
15571
15572         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
15573
15574         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
15575
15576         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
15577         inlining.
15578
15579         * mini.c (mono_method_check_inlining): Make the inlining limit 
15580         configurable by an environment variable.
15581         
15582         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
15583
15584         * mini.h: Bump AOT file version.
15585
15586         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
15587         token, store the image along with the token, since the token might not 
15588         refer to the same image as the method containing the relocation, 
15589         because of inlining.
15590
15591 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
15592
15593         * mini.c (mono_precompile_assemblies): New function to compile
15594         all methods in all loaded assemblies.
15595
15596         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
15597
15598         * regalloc.h regalloc.c (MonoRegState): Change the type of 
15599         iassign and fassign to int*, since they can contain large negative
15600         values if the register is spilled. Also added some comments. Fixes
15601         #45817.
15602
15603         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
15604         under Win32. Fixes #42964.
15605
15606 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
15607
15608         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
15609
15610         * aot.c: Added support for AOT compiling methods which contain calls
15611         to wrappers. Currently, only remoting-invoke-with-check wrappers are
15612         handled.
15613         
15614         * driver.c (compile_all_methods): Run the compilation in a thread
15615         managed by mono. Fixes #44023.
15616
15617         * mini.c (mono_codegen): Print full method name in verbose output.
15618
15619         * mini-x86.c (mono_arch_patch_code): Fix warning.
15620         
15621         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
15622         jumps, since the method we are jumping to might be domain-specific.
15623
15624         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
15625
15626 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15627
15628         * inssel.brg: string chars are unsigned.
15629
15630 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
15631
15632         * TODO: New todo item.
15633
15634         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
15635         which calls mono_runtime_class_init and patches the call site to
15636         avoid further calls.
15637         (mono_arch_create_class_init_trampoline): New arch specific function 
15638         to create a class init trampoline.
15639         (create_trampoline_code): Generalized so it can create
15640         class init trampolines as well.
15641
15642         * mini.c (helper_sig_class_init_trampoline): New helper variable.
15643         (mono_create_class_init_trampoline): New function to create and cache
15644         class init trampolines.
15645         (mono_find_class_init_trampoline_by_addr): New function to lookup the
15646         vtable given the address of a class init trampoline. Used by the
15647         patching process.
15648         (mono_codegen): Generate a call to a trampoline instead of
15649         mono_runtime_class_init in LDSFLD[A].
15650         (mono_codegen): Add relocations for the new trampoline.
15651         
15652         * mini.h mini-x86.c aot.c: Added a new relocation type: 
15653         MONO_PATCH_INFO_CLASS_INIT.
15654
15655         * mini.h: Bump AOT version number.
15656
15657         * aot.c: Create a copy of the loaded code instead of using the original
15658         so methods which call each other will be close in memory, improving
15659         cache behaviour.
15660         
15661         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
15662         patch since it breaks the regression tests.
15663         
15664         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
15665         for the register saving instruction sequence since the 
15666         frame_state_for function in glibc 2.3.2 don't seem to detect it.
15667
15668 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
15669
15670         * TODO: Fix todo item && remove another.
15671
15672 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
15673
15674         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
15675         previous checkin.
15676
15677         * aot.c: Moved the check for MONO_LASTAOT into the initialization
15678         function of the module.
15679
15680         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
15681         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
15682         --no-aot command line option.
15683
15684 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
15685
15686         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
15687         by Bernie Solomon (bernard@ugsolutions.com).
15688
15689         * inssel.brg: Refactor the interface offset table related code into
15690         its separate functions and add support for the AOT case.
15691
15692 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
15693
15694         * aot.c (mono_aot_get_method_inner): Fix memory leak.
15695         
15696         * aot.c: Added mono_aot_verbose variable and made all debugging
15697         output depend on the value of this variable.
15698
15699         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
15700         method_label and info_label.
15701
15702         * mini.h mini-x86.c aot.c: Added a new relocation type 
15703         MONO_PATCH_INFO_IID for klass->interface_id.
15704
15705         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
15706         the MonoJitInfo structure.
15707
15708         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
15709         a non-root appdomain in shared mode.
15710
15711 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15712
15713         * aot.c: make aot loader less verbose. Remove free of unused variable.
15714
15715 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
15716
15717         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
15718
15719         * .cvsignore: Added *.dll.
15720
15721         * mini.c (mono_print_tree_nl): New function callable while debugging.
15722
15723         * mini.c (mono_print_code): Export this.
15724
15725         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
15726         patched code.
15727
15728 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
15729
15730         * mini.h (MonoCompile): Added 'jit_info' field.
15731
15732         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
15733         the cfg structure, since it is needed by the AOT compiler.
15734
15735         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15736
15737         * aot.c: A major rewrite. Changes include:
15738         - save exception tables for methods which have them.
15739         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
15740         to g_module_symbol.
15741         - reworked the file format so it is now much smaller and needs
15742         fewer relocation entries.
15743         
15744 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15745
15746         * aot.c (load_aot_module): Fix build bustage on platforms without
15747         Boehm GC.
15748
15749 2003-09-04  Martin Baulig  <martin@ximian.com>
15750
15751         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
15752
15753 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15754
15755         * TODO: Some new optimization ideas.
15756
15757         * aot.c: Move AOT module loading logic here from mono_assembly_open.
15758
15759         * aot.c: Save the optimization flags used to compile the code into
15760         the AOT module.
15761
15762         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
15763         support emitting domain specific code.
15764         
15765         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
15766         no longer domain neutral. It can be made domain neutral by compiling 
15767         with --optimize=shared.
15768
15769         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
15770         between appdomains.
15771
15772         * driver.c mini.h mini.c: New --no-aot debugging option which disables
15773         loading of AOT code.
15774
15775         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
15776         
15777         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
15778         if there is no domain neutrality information.
15779
15780 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
15781
15782         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
15783         format version into the generated library.
15784
15785         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
15786         callee method into the caller since one of them could be shared.
15787
15788         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
15789         system exceptions from AOT code now works.
15790
15791         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
15792         method if it is domain neutral and the callee is not.
15793
15794         * graph.c (cfg_emit_one_loop_level): Fix warning.
15795
15796 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
15797
15798         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
15799         last checkin.
15800
15801 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
15802
15803         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
15804         is needed  by code which is executed before mono_runtime_init ().
15805         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
15806         
15807         * mini.c (mono_thread_abort): Fix warning.
15808         (mono_jit_compile_method): Call static constructor in the AOT case too.
15809
15810         * aot.c (mono_compile_assembly): Fix warning.
15811
15812 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15813
15814         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
15815
15816 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
15817
15818         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
15819
15820         * cpu-pentium.md: Fix the length of call opcodes so they include the
15821         ESP restoring instruction. Fixes #47968.
15822
15823 2003-08-28  Martin Baulig  <martin@ximian.com>
15824
15825         * mini-x86.c (mono_arch_call_opcode): Added support for
15826         MONO_TYPE_GENERICINST.
15827
15828         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
15829
15830 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
15831
15832         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
15833         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
15834
15835         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
15836         metadata_section.
15837
15838 2003-08-26  Martin Baulig  <martin@ximian.com>
15839
15840         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
15841         when reporting an error, set this to the actual error location.
15842         (mono_method_to_ir): Report the correct error location if
15843         get_basic_blocks() returned an error.
15844
15845 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
15846
15847         * mini.c (mono_type_blittable): OBJECT is not blittable.
15848         (mono_method_blittable): Methods which have marshalling descriptors
15849         are not blittable either. Fixes #47842.
15850
15851 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
15852
15853         * driver.c mini.c: Use an environment variable instead of a global 
15854         variable. Also fix the build.
15855
15856         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
15857         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
15858         reporting this. 
15859
15860         * driver.c mini.c: Added --with-valgrind option to turn off some
15861         code which prevents mono from running under valgrind.
15862
15863         * mini.c (mono_emit_call_args): Fixed warning.
15864
15865         * mini.c (mono_emulate_opcode): Fixed warning.
15866
15867 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15868
15869         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
15870         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
15871         regalloc.c, regalloc.h: specify available registers in arch-specific
15872         code and support floats in the regallocator (patch by Laurent Morichetti 
15873         <l_m@pacbell.net>)
15874
15875 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15876
15877         * mini.c: mono_thread_current() can be called only after
15878         mono_runtime_init(): rearrange code to not call it early on.
15879
15880 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15881
15882         * mini.c: allocate jump tables in the code mempools.
15883
15884 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15885
15886         * mini.c, mini.h: make sure per-thread data allocated by the jit is
15887         freed.
15888
15889 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
15890
15891         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
15892         12 to 16.  This fixes bug #47453.
15893
15894
15895 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15896
15897         * mini-ppc.c: fixed indexed load and unsigned compares.
15898
15899 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
15900
15901         * mini.c: reenabled installation of handler for
15902           thread abort signal.
15903
15904 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15905
15906         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
15907         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
15908         until it's fixed and actually useful.
15909
15910 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15911
15912         * inssel-long32.brg: couple more opcodes implemented.
15913
15914 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15915         
15916         * mini-sparc.c: Even more opcodes implemeted.
15917
15918 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
15919
15920         * mini-sparc.c: More opcodes implemented.
15921
15922 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
15923
15924         * mini-sparc.c: More opcodes implemented.
15925
15926 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15927
15928         * inssel-sparc.brg: Add some needed rules.  Direct
15929         copy from PPC.
15930         * Makefile.am: Use inssel-sparc.brg
15931         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
15932         an assert happy for now.
15933
15934 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
15935
15936         * mini-sparc.c: Fixed compile errors.
15937         * exceptions-sparc.c: Same.  We now produce a mono binary 
15938         on sparc-linux.  Yea.
15939
15940 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
15941
15942         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
15943         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
15944         They compile, but do not work.
15945
15946 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15947
15948         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
15949         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
15950         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
15951         (ct@gentoo.org).
15952
15953 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15954
15955         * mini.c: more opcodes implemented and better support for generics.
15956
15957 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15958
15959         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
15960         * mini.c, mini.h: first cut at generics support: some new instructions 
15961         added and changed the behaviour of some of the existing ones.
15962
15963 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
15964
15965         * mini.c: Removed definition of metadata_shared mutex here.
15966
15967 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15968
15969         * mini-x86.c: make vararg calls work for instance methods.
15970
15971 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15972
15973         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
15974         returns the arguments in a separte list, now.
15975
15976 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15977
15978         * aot.c, mini.c: updates for array type representation changes.
15979
15980 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
15981
15982         * mini.c: register function to perform jit shutdown.
15983
15984 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15985
15986         * mini.c: use a faster allocator if possible.
15987
15988 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15989
15990         * aot.c: some cleanups and portability changes.
15991
15992 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15993
15994         * mini.c: use faster allocation for CEE_BOX if possible.
15995
15996 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15997
15998         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
15999         Moved inlined mempcy code to its own function so that is can be
16000         reused. Added an inline memset function as well (optimized initobj).
16001         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
16002
16003 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16004
16005         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
16006
16007 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16008
16009         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
16010         arch code can setup the cpu for CLR execution, if needed.
16011         We use it on x86 to set the precision of FP operations.
16012
16013 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16014
16015         * mini.c: disable some optimizations if we can guess they'll cost too
16016         much for a given method.
16017
16018 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16019
16020         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
16021         
16022 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16023         * mini.h mini.c mini-x86.c: Added instruction level coverage 
16024         info collection support.
16025
16026 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16027
16028         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
16029         is now implemented in the profiling API. Get rid of a couple of
16030         unnecessary global variables.
16031
16032 2003-06-15  Nick Drochak <ndrochak@gol.com>
16033
16034         * basic-long.cs: tests for negative values for bigmul, and unsigned.
16035         * cpu-g4.md: add op_bigmul and op_bigmul_un
16036         * cpu_pentium.md: add op_bigmul_un
16037         * inssel-long32.brg: add rule for unsigned bigmul
16038         * mini-ops.h: define OP_BIGMUL_UN
16039         * mini-x86.c: THE BUG: handle (un)signed properly
16040         * mini.c: choose unsigned opcode if needed.
16041         This set of patches fixes bug #44291
16042
16043 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
16044
16045         * mini.c (optimize_branches): improved to handle all kinds of
16046         conditional branches.
16047
16048 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16049
16050         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
16051         don't raise exceptions.
16052
16053 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16054
16055         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
16056         to arch-specific files.
16057
16058 2003-06-09  Martin Baulig  <martin@ximian.com>
16059
16060         * Makefile.am (libs): Added $(LIBGC_LIBS).
16061
16062 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
16063
16064         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
16065         and OP_ATAN (fixes bug#44293).
16066
16067 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
16068
16069         * Makefile.am, mini-x86.c: rename cpu description array to
16070         pentium_desc, since some compilers define the 'pentium' preprocessor
16071         symbol.
16072
16073 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
16074
16075         * mini.c (mini_select_instructions): add explicit branch if the
16076         following block is not the false target of a conditional branch -
16077         we need this with any optimization that reorder or remove bblocks
16078
16079         * mini.c (optimize_branches): bug fixes
16080
16081 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
16082
16083         * mini.c (mono_method_to_ir): inline static readonly fields
16084
16085         * ssa.c (fold_tree): start cfold support for long (very simple
16086         cases only)
16087
16088         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
16089
16090 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16091
16092         * inssel.brg: fixed memcpy (bug #44219).
16093
16094 2003-06-05  Dick Porter  <dick@ximian.com>
16095
16096         * driver.c: Set the glib log levels to not abort if g_message
16097         recurses.
16098
16099         g_set_prgname() has to happen before mini_init() so that the
16100         process handle gets the info.
16101         
16102 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16103
16104         * driver.c: add intrins to the default optimizations to get wider
16105         exposure.
16106
16107 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16108
16109         * mini.h: some large basic blocks will overflow a 16-bit
16110         integers for symbolic registers.
16111
16112 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
16113
16114         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
16115         (mono_arch_output_basic_block): fix bug 43499 
16116
16117 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16118
16119         * mini.c: kill duplicated definition of mono_debug_format.
16120
16121 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
16122
16123         * mini-x86.c, arrays.cs: fixed register allocation bug.
16124
16125 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
16126
16127         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
16128
16129         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
16130
16131 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16132
16133         * mini.c:
16134         (print_method_from_ip): also print source location information if
16135         available.
16136
16137 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
16138
16139         * mini.c (mono_find_block_region): bug fix in region code
16140         (mini_method_compile): enable removing unreachable code again, but
16141         only in methods without exception clauses.
16142
16143 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16144
16145         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
16146         Implemented arglist opcode and handling of TypedReference type.
16147         Fixed x86 call convention when a structure is returned.
16148         Minimal support for calling static vararg methods.
16149
16150 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
16151
16152         * mini.c (mini_method_compile):  always remove unreachable code,
16153         because the code in them may be inconsistent  (access to dead
16154         variables for example).
16155
16156 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16157
16158         * driver.c, debug-mini.c: warning fixes.
16159
16160 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
16161
16162         * Makefile.am, jit.h, mini.h: install header for embedding mono.
16163
16164 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
16165
16166         * mini.c: thread-static fields are registered in mono_class_vtable(),
16167         so ensure the function is called before checking for them.
16168
16169 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
16170
16171         * mini.c (optimize_branches): fix for bug 43586
16172
16173         * jit-icalls.c (mono_llmult_ovf): added an additional check for
16174         overflow (fixes Bug #43639)
16175
16176 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16177
16178         * mini.c, objects.cs: allow the use of stobj for primitive types.
16179
16180 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16181
16182         * mini.c: be less strict about argument checking until we support
16183         running the verifier.
16184
16185 2003-05-27  Nick Drochak <ndrochak@gol.com>
16186
16187         * basic-long.cs: tests for (ulong)int * (ulong)int also
16188         * mini.c: use the same trick for (ulong)int * (ulong)int
16189
16190 2003-05-27  Nick Drochak <ndrochak@gol.com>
16191
16192         * basic-long.cs: add regression test for (long)int * (long)int
16193         * cpu-pentium.md: add op_bigmul specification
16194         * inssel-long32.brg: add OP_BIGMUL rule
16195         * mini-ops.h: add OP_BIGMUL
16196         * mini-x86.c: register allocator: handle case where src1 needs to be
16197         in EAX.
16198         * mini.c: substitute special BIGMUL opcode in the tree for 
16199         (long)int * (long)int
16200
16201 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16202
16203         * jit-icalls.c: call the type ctor on field access if needed.
16204
16205 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16206
16207         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
16208         to a method (including results of ldelema, bug#43207).
16209
16210 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
16211
16212         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
16213         colors to show exception handler blocks.
16214
16215         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
16216         (fix for pinvoke7.cs).
16217
16218 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16219
16220         * mini.h, mini.c: ensure correct initialization order for types that
16221         require it. Prepare for lazy compilation of jit icall wrappers.
16222         Provide a name for opcode emulation to reduce unneeded mallocing.
16223
16224 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
16225
16226         * mini-x86.c: better register restoring code and profiling
16227         support for tail calls.
16228
16229 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16230
16231         * mini.h, driver.c: prepare for leaf methods optimization.
16232
16233 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16234
16235         * mini.c: get targets of branches before converting a method.
16236
16237 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
16238
16239         * mini.c (optimize_branches): added some experimental code (disbaled) 
16240
16241 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
16242
16243         * mini.c (optimize_branches): fix branch to branch optimization 
16244
16245         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
16246
16247         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
16248
16249         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
16250
16251         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
16252         if needed.
16253
16254 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
16255
16256         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
16257         enable use of interface variables again.
16258
16259         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
16260         I1 to registers because there is no simply way to sign extend 8bit
16261         quantities in caller saved registers on x86.
16262
16263         * inssel-float.brg: set costs of some rules to 2 so
16264         that monobure always select the arch. specific ones if supplied,
16265         regardless of the order we pass the files to monoburg.
16266
16267 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16268
16269         * mini.c, mini-x86.c: since the magic trampoline for jumps
16270         can't patch the code directly, we do it as soon as the
16271         method gets compiled.
16272
16273 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16274
16275         * mini-x86.c, mini.h: introduce a new patching method
16276         to support CEE_JMP and tail calls.
16277         * mini.c: obey tail.call. Don't precompile methods target
16278         of CEE_JMP.
16279         * tramp-x86.c: new trampoline code to handle methods
16280         reached through a jump.
16281
16282 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
16283
16284         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
16285         bit values to registers
16286
16287 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
16288
16289         * mini.c (mono_compile_get_interface_var): share interface
16290         variables if possible.
16291
16292 2003-05-16  Martin Baulig  <martin@ximian.com>
16293
16294         * debug-mini.c (mono_init_debugger): New function to initialize
16295         the debugger.  This is not in the debugger since it needs to
16296         access some of mini's internals.
16297
16298 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16299
16300         * mini.c (mono_method_to_ir): inlining fixes/cleanups
16301
16302 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
16303
16304         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
16305         for value type handling.
16306
16307 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16308
16309         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
16310         (mono_method_check_inlining): enable inlining of all kinds of wrappers
16311
16312 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
16313
16314         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
16315           the constructor through a proxy.
16316
16317 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16318
16319         * jit-icalls.c, inssel.brg: fixes to array element address
16320         calculations.
16321
16322 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
16323
16324         * mini-x86.c (is_regsize_var): allocate pointer to registers
16325
16326 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16327
16328         * driver.c: fixed typo, added intrins to the set of optimizations
16329         tested with regressions.
16330
16331 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16332
16333         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
16334         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
16335         test case.
16336
16337 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
16338
16339         * inssel.brg: remove some common pop instructions without side effects
16340
16341 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16342
16343         * inssel-x86.brg: fixed thinko in int to double conversions.
16344
16345 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
16346
16347         * mini.c, jit-icalls.c: added runtime thread-static variable support.
16348
16349 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16350
16351         * inssel-long32.brg: two more missing instructions.
16352
16353 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
16354
16355         * mini.c (mono_emit_call_args): set the cil_code for all arguments
16356         if not already set.
16357
16358 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
16359
16360         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
16361         correctly.
16362
16363         * basic-float.cs: Added tests for negative zero.
16364
16365 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16366
16367         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
16368         a couple of missing operations for long casts, with test cases.
16369
16370 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16371
16372         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
16373
16374 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
16375
16376         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
16377         code size estimation.
16378
16379 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
16380
16381         * mini.c (mono_jit_create_remoting_trampoline): make it work with
16382         abstract methods (fix bug 42542)
16383
16384         * aot.c: add ability to handle array types
16385         
16386 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
16387
16388         * mini.c: Call the _specific versions of the object allocation
16389         functions if possible.
16390
16391 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16392
16393         * driver.c: call setlocale ().
16394
16395 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16396
16397         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
16398         windows build.
16399
16400 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
16401
16402         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
16403
16404         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
16405         wrappers (fix bug 42122)
16406
16407 2003-05-04  Martin Baulig  <martin@ximian.com>
16408
16409         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
16410
16411         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
16412         s/mini_set_defaults/mono_set_defaults/g.
16413
16414 2003-05-04  Martin Baulig  <martin@ximian.com>
16415
16416         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
16417
16418 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16419
16420         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
16421         (reported by Don Roberts).
16422
16423 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16424
16425         * mini.c: temporarily work around two bugs for this release.
16426
16427 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16428
16429         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
16430         that contains -export-dynamic and it makes using the ld script
16431         useless.
16432         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
16433
16434 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16435
16436         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
16437         specific cpu.
16438
16439 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16440
16441         * mini.c: make sure leave calls all the needed finally blocks,
16442         even when the target jumps out of multiple exception clauses.
16443
16444 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16445
16446         * ldscript, Makefile.am: add linker script to reduce the number of
16447         exported symbols (should also fix the issues with libwine defining
16448         some of the same symbols in io-layer).
16449
16450 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
16451
16452         * driver.c (mini_main): Avoid assertion when no file name is given on 
16453         the command line.
16454
16455 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
16456
16457         * driver.c: added --version/-V command line option.
16458         Added the inline optimization in the regression tests.
16459
16460 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16461
16462         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
16463         to the type in the method signature (fixes bug#42134).
16464
16465 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
16466
16467         * mini.c: when inlining, check this is not null only when needed (bug #42135).
16468
16469 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
16470
16471         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
16472
16473 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16474
16475         * driver.c: fixed bug #42100.
16476
16477 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
16478
16479         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
16480
16481 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16482
16483         * mini.c: moved most of the code required to do inlining to its own
16484         function so it can be reused. Inline also ctors if appropriate.
16485
16486 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
16487
16488         * Makefile.am: Link with -export-dynamic so shared libs loaded by
16489         the runtime can call mono API functions.
16490
16491 2003-04-27  Martin Baulig  <martin@ximian.com>
16492
16493         * debug-mini.c (mono_debug_init_method): Added
16494         `guint32 breakpoint_id' argument; if the method has a breakpoint,
16495         send a notification to the debugger.
16496
16497         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
16498         running in the Mono Debugger, just pass the breakpoint number to
16499         mono_debug_init_method().
16500
16501         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
16502
16503 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
16504
16505         * mini.c: allow some more unsafe compares.
16506
16507 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16508
16509         * mini-x86.c, Makefile.am: make distcheck works (partially from
16510         a patch by Richard Lee <r.h.lee@attbi.com>).
16511         * regset.c, regset.h: removed, they are unused.
16512
16513 2003-04-25  Dick Porter  <dick@ximian.com>
16514
16515         * driver.c: Usage reports the name as 'mono' not 'mini'
16516         * exceptions-x86.c: Build and run on freebsd
16517
16518 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
16519
16520         * Makefile.am: install the program with the 'mono' name and
16521         the library as libmono instead of mini and libmini.
16522
16523 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16524
16525         * driver.c: provide the APIs for the embedding interface of the old jit.
16526
16527 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
16528
16529         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
16530
16531 2003-04-23  Martin Baulig  <martin@ximian.com>
16532
16533         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
16534
16535         * driver.c: Added `--debug' command line argument to enable
16536         debugging support.
16537
16538 2003-04-23  Martin Baulig  <martin@ximian.com>
16539
16540         * debug.[ch]: Removed.  The code is now in
16541         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
16542
16543         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
16544         last six months.
16545
16546 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
16547
16548         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
16549
16550 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16551
16552         * mini.c:
16553         (mini_cleanup): moved mono_runtime_cleanup call after the call to
16554         mono_domain_finalize.
16555         (mini_method_compile): use mono_method_profile* if the the option is
16556         enabled.
16557
16558 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
16559
16560         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16561         methods with their wrapper.
16562
16563         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16564         methods with their wrapper.
16565
16566         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
16567         their wrapper.
16568
16569         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
16570         wrapper.
16571
16572         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
16573         methods.
16574
16575 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
16576
16577         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
16578
16579 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
16580
16581         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
16582         of the mempool. This is slightly faster and uses less memory
16583
16584 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16585
16586         * mini.c: avoid O(n) allocation for variables.
16587
16588 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16589
16590         * mini.c: handle items on the stack after inlining methods.
16591
16592 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16593
16594         * mini.c: make the method->opcode optimization dependent
16595         on MONO_OPT_INSTRINS and do it lazily.
16596
16597 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16598
16599         * driver.c: print overall results at the end of regression run.
16600
16601 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
16602
16603         * inssel.brg: don't overwrite symbolic registers.
16604
16605 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16606
16607         * inssel-x86.brg: fix conversion from long to float.
16608
16609 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
16610
16611         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
16612
16613 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
16614
16615         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
16616
16617         * driver.c: Added --print-vtable option as in the old JIT.
16618
16619 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16620
16621         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
16622
16623 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
16624
16625         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
16626
16627 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
16628
16629         * mini.c regalloc.c regalloc.h: Fix memory leak.
16630
16631 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
16632
16633         * aot.c (mono_aot_get_method): register all used strings
16634
16635 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16636
16637         * mini.c: always intern strings references with ldstr at compile time.
16638
16639 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16640
16641         * Makefile.am: add BUILT_SOURCES.
16642
16643 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16644
16645         * driver.c: give a better error message when the assembly to execute
16646         doesn't have an entry point.
16647
16648 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
16649
16650         * Makefile.am: added hack for automake
16651
16652         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
16653         correct sematics.
16654
16655         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
16656
16657 22003-04-07  Martin Baulig  <martin@ximian.com>
16658
16659         * Makefile.am: Added Makefile.am.
16660
16661         * debugger-main.c: Removed, this is now in the debugger where it
16662         belongs.
16663
16664         * mini.pc.in: Call this package `mini' for the moment.
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678