2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / mini / ChangeLog
1 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
2
3         * basic-simd.cs: Tests for new methods in Vector8us.
4
5 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
6
7         * mini-ops.h: Add multiply and store high.
8         
9         * cpu-x86.md: Same.
10
11         * mini-x86.c (mono_arch_output_basic_block): Same.
12
13         * simd-methods.h: Same.
14
15         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
16         and CompareEqual.
17
18 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
19
20         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
21         mono_class_setup_vtable ().
22
23         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
24         mono_class_get_vtable_entry () for accessing klass->vtable.
25
26         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
27
28         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
29         found.
30
31         * method-to-ir.c (mono_save_token_info): Don't save references made from
32         wrappers.
33
34         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
35         of generic instances.
36
37         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
38
39 2008-10-19  Mark Probst  <mark.probst@gmail.com>
40
41         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
42         OP_JMP depends on the method signature.  Calculate it properly.
43
44 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
45         
46         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
47         called directly.
48
49         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
50         instances.
51         (emit_extra_methods): Add another table mapping method indexes to 
52         offsets in the extra_method_info table.
53
54         * mini.h: Bump AOT file format version.
55         
56         * aot-runtime.c: Merge most of the code from mono_aot_get_method
57         and mono_aot_get_method_from_token () into one function.
58
59 2008-10-19  Mark Probst  <mark.probst@gmail.com>
60
61         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
62         separate counter.
63
64 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
65
66         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
67         methods.
68
69         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
70         disable_aot.
71
72         * mini.c (mono_patch_info_equal): Compare the generic context as well.
73
74         * mini.h: Bump aot file format version.
75
76         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
77         AOT file can contain native code for methods which are not in the METHOD
78         table. Generate code for non-sharable generic instances of generic methods
79         found in the METHODSPEC table.
80         
81         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
82         encoding generic type handles.
83
84         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
85         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
86
87         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
88         macros + MONO_ADD_INS.
89
90         * mini.c (mono_jump_info_token_new2): New function which takes a generic
91         context as well.
92
93         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
94
95         * mini.h: Bump aot file format version.
96
97         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
98
99 2008-10-17  Mark Probst  <mark.probst@gmail.com>
100
101         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
102         platforms, with definable stack alignment value.  Set to 16 now
103         for all platforms.
104
105         * mini.c, mini.h, driver.c: Command line option for disabling
106         stack alignment.
107
108 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
109
110         * basic-simd.cs: Tests for new methods in Vector4ui.
111
112 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
113
114         * mini-ops.h: Add packed int shuffle.
115         
116         * cpu-x86.md: Same.
117
118         * mini-x86.c (mono_arch_output_basic_block): Same.
119
120         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
121         extract mask, max, min, shuffle.
122
123         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
124
125 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
126
127         * basic-simd.cs: Tests for new methods in Vector8us.
128
129 2008-10-17  Mark Probst  <mark.probst@gmail.com>
130
131         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
132         RuntimeTypeHandle, not a TypedReference.
133
134 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
135
136         * simd-intrinsics.c: remove relocations.
137
138 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
139
140         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
141         optimizations from the x86 backend.
142
143 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
144
145         * simd-methods.h, simd-intrinsics.c: debloat method names and
146         prepare for no relocations.
147
148 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
149
150         * mini-ops.h: Add packed min/equal and sum of absolute differences.
151         
152         * cpu-x86.md: Same.
153
154         * mini-x86.c (mono_arch_output_basic_block): Same.
155
156         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
157         extract mask, max, min and sum of absolute differences.
158
159         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
160         method name.
161
162 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
163
164         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
165         Renamed one test for consistency.
166
167 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
168
169         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
170         fix to the code that deal with other blocks.
171
172 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
173
174         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
175
176 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
177
178         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
179         that deals with vreg interference. Explicitly check for OP_LDADDR to be
180         able to process the source reg.
181
182 2008-10-16  Martin Baulig  <martin@ximian.com>
183
184         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
185
186         * inssel.brg: Add `OP_HARD_NOP'.
187
188         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
189
190         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
191         `OP_HARD_NOP' instruction when running inside the debugger.
192
193         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
194         `OP_HARD_NOP' instruction when running inside the debugger.
195
196 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
197
198         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
199         now works. The issue with the regalloc tripping up no longer
200         happens.
201
202         * simd-intrinsics.c (load_simd_vreg): Same.
203
204 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
205         
206         * basic-simd.cs: Tests for new Vector8ui methods.
207
208 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
209
210         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
211         only for type. This fixes crashes where MonoInst::klass is checked
212         for ops of type != VTYPE or OBJ.
213
214         * simd-intrinsics.c (load_simd_vreg): Same.
215
216 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
217
218         * mini-ops.h: Add ops for packed shuffle/max/avg and
219         extract mask.
220         
221         * cpu-x86.md: Same.
222
223         * mini-x86.c (mono_arch_output_basic_block): Same.
224
225         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
226         extract mask.
227
228         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
229         to emit extract mask op.
230
231         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
232         to emit word shuffles.
233
234 2008-10-15  Mark Probst  <mark.probst@gmail.com>
235
236         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
237         the largest alignment needed by a variable, but at least
238         sizeof(gpointer).
239
240 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
241
242         * basic-simd.cs: Tests for the fixes in the last commit.
243
244 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
245
246         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
247         no longer handles STACK_PTR input.
248
249         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
250
251         * simd-intrinsics.c (load_simd_vreg): New function that works like 
252         get_simd_vreg   but handles STACK_PTR input.
253
254         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
255         as the input can be an arbitrary pointer.
256
257         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
258         LDADDR local optimization directly otherwise use a store op.
259
260 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
261
262         * basic-simd.cs: Tests for dup low and dup high.
263
264 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
265
266         * mini-ops.h: Add dup low and dup high ops.
267         
268         * cpu-x86.md: Same.
269
270         * mini-x86.c (mono_arch_output_basic_block): Same.
271
272         * simd-intrinsics.c (vector4f_intrinsics): Same.
273
274 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
275
276         * basic-simd.cs: Tests for recently added functionality.
277
278 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
279
280         * mini-ops.h: Add remaining sse1 fp ops.
281         
282         * cpu-x86.md: Add remaining sse1 fp ops.
283
284         * mini-x86.c (mono_arch_output_basic_block): Same.
285
286         * mini.h: Add enum for simd FP compare conditions.
287
288         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
289
290         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
291         so the backed can generate the appropriate op.
292
293 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
294         This patch squeese one more byte from the SimdIntrinsc struct.
295
296         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
297         a a shift amount intead of simply or'ing it.
298
299         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
300
301         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
302         byte so we can have an aditional flags field without increasing struct size.
303
304         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
305         against the simd_supported_versions bitmask.
306
307         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
308
309 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
310
311         * mini.c: remove rawbuffer code (the only use here is unsafe because
312         it takes locks during signal handling and the kernel now provides much
313         better info in proc/pid/smaps these days).
314
315 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
316
317         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
318         OP_X86_PUSH_OBJ. Fixes #434620.
319
320         * objects.cs: Add a test.
321         
322 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
323
324         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
325         that the packuswb/packusdw don't work with unsigned numbers for what
326         would be negative numbers in signed format.
327
328         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
329         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
330
331         * mini-ops.h: Add doubleword forms of many ops and packing ones.
332
333         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
334
335         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
336
337         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
338
339         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
340         add more ops.
341
342         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
343         version as the enum in mini.h.
344
345         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
346         for sse3 ops, check the simd_version field if present. This way the code
347         works with all versions of sse.
348
349 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
350
351         * simd-intrinsics.c: Fixed intrinsic name typo.
352
353         * mini.h: Added missing simd exported function.
354
355         * basic-simd.cs: Added tests for Vector4ui.
356         Fixed broken test for Vector16b.
357
358 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
359
360         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
361         the max length to 64.
362
363 2008-10-10  Mark Probst  <mark.probst@gmail.com>
364
365         * method-to-ir.c: Only do the fast virtual generic method call for
366         non-wrapper methods.
367
368         * mini.h, mini-trampolines.c: The new generic virtual remoting
369         trampoline handles virtual method calls via the vtable (as done by
370         the fast virtual generic method calls) to remoting proxies.
371
372         * mini.c (mono_jit_create_remoting_trampoline): For generic
373         methods reate a generic virtual remoting trampoline.
374
375         * mini-amd64.h: Enable fast virtual generic method calls again.
376
377 2008-10-10  Mark Probst  <mark.probst@gmail.com>
378
379         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
380         restore registers when doing tail calls.
381
382 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
383
384         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
385         Vector4ui.
386
387 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
388
389         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
390
391 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
392
393         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
394
395 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
396
397         * basic-simd.cs: Retrofit for API changes.
398
399 2008-10-10  Mark Probst  <mark.probst@gmail.com>
400
401         * mini-ppc.c: Handle integer stack arguments for tail calls.
402
403 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
404
405         * optflags-def.h: Removed sse3 optimization.
406
407         * driver.c: Same.
408
409         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
410         sse3.
411
412         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
413
414         * mini.h: Added enumeration with simd versions.
415
416         * simd-intrinsics.c (emit_intrinsics): Use the new static var
417         for detecting SSE3.
418
419         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
420
421         * mini.c (mini_init): Call mono_simd_intrinsics_init.
422
423 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
424
425         * basic-simd.cs: Added tests for Vector8u and Vector16u.
426
427         * basic-simd.cs: Fixed test naming.
428
429 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
430
431         * mini-ops.h: Added ops for packed and saturated math, shifts
432         and packing/unpacking.
433
434         * cpu-x86.md: Added descriptors for the above ops.
435
436         * mini-x86.c: Added code to emmit the above ops.
437
438         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
439
440 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
441
442         * aot-compiler.c (compile_method): Enable AOT for generic code.
443
444         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
445
446 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
447
448         * mini.c: add a workaround for a common screwup that ends up blamed
449         to mono (other processes blocking signal delivery).
450
451 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
452
453         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
454         in the LDFLD/STFLD opcodes. Fixes #432673.
455
456         * iltests.il.in: Add a new test.
457
458 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
459
460         * mini-arm.c: attach the thread in unmanaged->managed transitions
461         using delegates (bug #433148).
462
463 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
464
465        * basic-simd.cs: Use new ShuffleSel constants.
466
467 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
468
469         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
470
471         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
472         only disable simd intrinsics if no sse2 is detected.
473
474         * optflags-def.h: Added sse3.
475
476         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
477         is disabled.
478
479 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
480
481         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
482         when adding delegate-invoke wrappers.
483
484 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
485
486         * Makefile.am: Reenable the simd tests.
487
488 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
489
490         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
491           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
492           other vreg is allocated to that hreg.
493
494         Contributed under MIT/X11 license.
495
496 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
497
498         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
499         yet checked in.
500
501 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
502
503         * basic-simd.cs: New test suite for SIMD intrinsics.
504
505         * Makefile.am: Added new tests.
506
507 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
508
509         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
510
511         * mini-ops.h: Same.
512
513         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
514
515         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
516         using SSE2 aware opcodes.
517
518         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
519         is enabled, this code path is only reachable if conversion ops are emmited after
520         mono_method_to_ir.
521
522         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
523
524         This optimization saves 6 bytes per conversion against the old version.
525
526 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
527
528         * aot-compiler.c (compile_method): Don't skip methods referencing 
529         generic methods without a corresponding entry in token_info_hash, since
530         encode_method_ref () can handle all generic methods now.
531
532         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
533         generic context is set.
534         
535         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
536         generic sharing of LDTOKEN.
537
538 2008-10-06  Mark Probst  <mark.probst@gmail.com>
539
540         * mini-amd64.h: Temporarily disabled fast virtual generic method
541         calls because it breaks the System.Runtime.Remoting tests.
542
543 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
544
545         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
546
547         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
548         so inlining actually works.
549         (check_inline_caller_method_name_limit): Ditto.
550
551 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
552
553         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
554         64 bit safety (from Olaf Hering and Andreas Färber).
555
556 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
557         
558         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
559         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
560         unused virtual call support code.
561
562         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
563         
564         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
565         which can't use aot trampolines.
566         (decode_patch): Don't create aot trampolines for methods which can't use
567         them.
568
569         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
570         use aot trampolines.
571
572         * mini.h: Bump AOT image format version.
573         
574 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
575
576         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
577         to save_token_info () since cmethod is inflated for constrained calls.
578
579         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
580
581 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
582
583         * Makefile.am: Add build rules for ppc64.
584         This avoids the build failing at pedump with unresolved symbols
585         due to lack of arch_sources. Instead it will now fail earlier
586         due to lack of cpu-ppc64.md.
587
588         Contributed under MIT/X11 license.
589
590 2008-10-04  Mark Probst  <mark.probst@gmail.com>
591
592         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
593         tail calls.
594
595         * iltests.il.in: Add test case for tail call with many arguments.
596
597 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
598
599         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
600         to the fast virtual generic method code until the aot case is fixed.
601
602 2008-10-03  Mark Probst  <mark.probst@gmail.com>
603
604         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
605
606 2008-10-03  Mark Probst  <mark.probst@gmail.com>
607
608         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
609         thunks.
610
611 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
612         
613         * simd-intrinsics.c: Forgot to add this one.
614
615         * mini-codegen.c: Fix macro in case SIMD is not supported.
616
617 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
618         
619         This patch land initial JIT support for simd intrinsics.
620
621         * mini-x86.h: Added new define to make --enable_minimal work on x86.
622
623         * Makefile.am: Added simd-intrinsics.c
624
625         * simd-intrinsics.c: New file with simd instrinsic related
626         code.
627
628         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
629
630         * cpu-x86.md: Add simd related instructions.
631
632         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
633
634         * driver.c: Added two new --regression variants.
635
636         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
637
638         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
639
640         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
641         extract some complicated logic to helper functions.
642
643         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
644
645         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
646
647         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
648         the specialized simplification pass.
649
650         * method-to-ir.c (mono_spill_global_vars): Use new macro.
651
652         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
653
654         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
655         table.
656
657         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
658         if MONO_ARCH_NEED_SIMD_BANK is defined.
659
660         * mini-ops.h: Added the new simd ops.
661
662         * mini-x86.c: Added mono_arch_xregname.
663
664         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
665
666         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
667
668         * mini-x86.h: Define simd related MONO_ARCH macros.
669
670         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
671
672         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
673
674         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
675         MONO_CLASS_IS_SIMD to deal with simd related IR.
676
677         * mini.h (MonoInst): Added spill_var to the backend union.
678
679         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
680
681         * mini.h: Added forward declarations of the new simd fuctions.
682
683         * optflags-def.h: Added new optimization names SIMD.
684
685         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
686
687         * regalloc.h: Added support for working with 3 register banks.
688
689         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
690
691         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
692
693 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
694
695         * mini-exceptions.c: remove 64 bit related ifdef clutter.
696
697 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
698
699         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
700         instead of one on 64 bit systems.
701
702         * method-to-ir.c: Remove unused includes.
703
704 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
705
706         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
707         cfg->used_int_regs, since the two are different on arm.
708
709 2008-10-02  Mark Probst  <mark.probst@gmail.com>
710
711         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
712         mono_method_get_vtable_index() to get the vtable index.
713
714 2008-10-02  Mark Probst  <mark.probst@gmail.com>
715
716         * method-to-ir.c (mono_method_to_ir2): Don't create native
717         wrappers for array methods, because they're never called (and if
718         they were called they wouldn't work).
719
720 2008-10-02  Mark Probst  <mark.probst@gmail.com>
721
722         * method-to-ir.c (mono_method_to_ir2): Array methods are
723         special-cased and must not be invoked indirectly via the (M)RGCTX
724         when generic sharing is turned on.  Fixes #431413.
725
726 2008-10-01  Mark Probst  <mark.probst@gmail.com>
727
728         * method-to-ir.c: When generic sharing is active, call
729         non-interface virtual generic methods via the standard trampoline.
730
731         * mini-trampolines.c: Handle virtual generic shared methods.
732
733         * mini.h, mini-x86.c, mini-x86.h: New argument for
734         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
735         method thunks and which is the trampoline to call if the lookup
736         fails.  Enable the virtual generic method thunk for x86.
737
738         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
739         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
740         argument but assert that it's NULL, because these archs don't yet
741         implement the virtual generic method thunk.  Changes in the IMT
742         thunk data structures.
743
744 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
745
746         * aot-compiler.c (emit_globals): Avoid invalid characters in
747         the static linking symbol.
748
749         * objects.cs: Add a test for the range check optimization. Fix warnings.
750
751         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
752         optimization from the current JIT.
753
754         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
755         later in decompose_array_access_opts () to allow more optimizations.
756
757         * method-to-ir.c (mono_handle_soft_float): Rename this to 
758         mono_decompose_soft_float () for consistency.
759
760         * mini-ops.h: Fix arguments of OP_STRLEN.
761
762         * method-to-ir.c (save_cast_details): Extract the cast details saving code
763         into a separate function.
764         (reset_cast_details): Ditto.
765         (handle_unbox): Save cast details. Fixes #431254.
766
767         * method-to-ir.c: Remove some obsolete FIXMEs.
768
769 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
770
771         * ir-emit.h (alloc_dreg): Write a warning before crashing.
772
773 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
774
775         * mini-codegen.c: More work on macros to make them
776         ready for multiple regbanks.
777
778 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
779
780         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
781
782         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
783
784 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
785
786         * mini-codegen.c (mono_spillvar_offset): Proper support for
787         multiple regbanks.
788
789 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
790
791         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
792         the stack overflow changes.
793
794 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
795
796         * mini-codegen.c: Make all bank macros depend on reg_bank.
797
798         * mini-codegen.c (mono_local_regalloc): Make free mask
799         initialization regbank aware.
800
801 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
802
803         * mini-codegen.c (mono_local_regalloc): Extract callee
804         mask selection to a function and make it regbank aware.
805
806 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
807
808         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
809         code to deal with many regbanks.
810
811 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
812
813         * mini-codegen.c: More fp->regbank changes.
814
815 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
816
817         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
818         of a hardcoded constant.
819
820 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
821
822         * method-to-ir.c (type_from_stack_type): Fix typo.
823
824 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
825
826         * mini-ia64.c (emit_move_return_value): Convert float return values to
827         double.
828
829         * objects.cs: Add a new test.
830         
831         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
832         VARARG methods to fix an assert later.
833
834         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
835         end so it at least compiles.
836
837 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
838
839         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
840
841 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
842
843         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
844         optimization to a new function (emit_optimized_ldloca_ir) and enable
845         it for both ldloca and ldloca_s.
846
847 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
848
849         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
850         gshared CASTCLASS code.
851
852         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
853         amd64, where the libc stack unwinder encounters stack frames referring to
854         native code in unmapped memory.
855
856         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
857         sharing.
858
859         * generics.cs: Add new test.
860
861 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
862
863         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
864         add a check that one of the ARM_FPU_ constants is defined.
865
866         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
867         
868         * mini-exceptions.c: Fix build on non-altstack platforms.
869
870         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
871         sharing of vtypes.
872
873         * ir-emit.h: Add a comment to NEW_PCONST.
874
875         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
876
877         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
878
879         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
880         after the changes to MonoJitDomainInfo.
881
882 2008-09-27  Mark Probst  <mark.probst@gmail.com>
883
884         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
885
886 2008-09-27  Mark Probst  <mark.probst@gmail.com>
887
888         * mini-ppc.c: Compiler warning fixes.
889
890 2008-09-27  Mark Probst  <mark.probst@gmail.com>
891
892         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
893         for pinvokes.
894
895 2008-09-27  Mark Probst  <mark.probst@gmail.com>
896
897         * exceptions-ppc.c, mini-ppc.h: Compile
898         mono_arch_handle_altstack_exception() on Darwin, too.
899
900 2008-09-27  Mark Probst  <mark.probst@gmail.com>
901
902         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
903         work on archs which don't have generic sharing implemented, only
904         without the vtable_arg.
905
906 2008-09-26  Mark Probst  <mark.probst@gmail.com>
907
908         * mini.c: Added comment explaining why delegate ctor icall
909         wrappers are compiled.
910
911 2008-09-26  Mark Probst  <mark.probst@gmail.com>
912
913         * mini.c: Don't produce trampolines to delegate ctor icall
914         wrappers but compile them upfront.
915
916 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
917
918         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
919         runtime-set function when going back to managed code. Currently this
920         is used to set back the protection on the soft ovf pages and/or to
921         throw the stack overflow exception that happened in unmanaged code.
922
923 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
924
925         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
926         runtime-set function when going back to managed code. Currently this
927         is used to set back the protection on the soft ovf pages and/or to
928         throw the stack overflow exception that happened in unmanaged code.
929
930 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
931
932         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
933         the support code for restoring stack protection after stack overflows
934         that happen in unmanaged code. Don't set the exec permission on the
935         soft overflow area.
936
937 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
938
939         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
940         delegate->method_ptr is set. Fixes #428054.
941
942 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
943
944         * tests.cs: Rename to ratests.cs.
945
946         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
947         emit_get_rgctx_... functions.
948
949 2008-09-25  Mark Probst  <mark.probst@gmail.com>
950
951         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
952
953 2008-09-25  Mark Probst  <mark.probst@gmail.com>
954
955         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
956         before asserting that method is sharable.
957
958 2008-09-25  Mark Probst  <mark.probst@gmail.com>
959
960         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
961         whether method needs a static RGCTX wrapper used instead of
962         complex conditions.
963
964         * generic-sharing.c, mini.h: A few functions moved to
965         metadata/generic-sharing.c.
966
967 2008-09-25  Mark Probst  <mark.probst@gmail.com>
968
969         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
970         Generic code sharing for value types, which essentially means
971         treating value type methods like static methods.  The RGCTX is
972         passed in the same way.
973
974 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
975
976         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
977         opcode when creating multi-dimensional arrays of open types.
978
979         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
980         open generic types.
981
982         * generics.cs: Add a test.
983
984         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
985
986 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
987
988         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
989
990         * mini.c (mini_method_compile): Set it when running under the debugger. 
991
992         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
993         vreg optimization if the flag is set.
994
995         * driver.c (mono_main): Add --attach= option to pass options to
996         the attach agent.
997
998         * mini.c (sigquit_signal_handler): Start the attach agent.
999
1000         * ssapre.c: Disable this to save space since it is not yet ported to
1001         linear IR.
1002
1003         * regalloc2.c: Disable this to save space.
1004
1005         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
1006
1007 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
1008
1009         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
1010         the -v option useful again.
1011
1012 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1013
1014         * mini-amd64.c (mono_arch_output_basic_block): Add support for
1015         --break-at-bb.
1016
1017         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
1018         arrays of arrays. Fixes #428406.
1019
1020         * method-to-ir.c (mini_emit_castclass): Ditto.
1021
1022         * objects.cs: Add new test.
1023         
1024 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
1025
1026         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
1027         was wrong at it choked against target_type_is_incompatible for byref types.
1028
1029 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1030
1031         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
1032         places.
1033
1034 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
1035
1036         * mini-exceptions.c: update a few more exceptions-related counters.
1037
1038 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
1039
1040         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
1041         new functions to allocate from persistent mempools.
1042
1043 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1044
1045         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
1046         multiple register banks in the future.
1047
1048         * mini-codegen.c (mono_local_regalloc): Fix a warning.
1049
1050 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
1051
1052         * mini.c (type_to_eval_stack_type): Remove duplicated function.
1053
1054         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
1055
1056         * mini.h: Export type_to_eval_stack_type.
1057
1058         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
1059         is only ins->klass of byref types.
1060
1061 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
1062
1063         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
1064         (mini_emit_memcpy2): Ditto.
1065
1066         * mini-amd64.c: Fix a warning.
1067
1068 2008-09-21  Mark Probst  <mark.probst@gmail.com>
1069
1070         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
1071         linking.
1072
1073 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
1074
1075         * method-to-ir.c: Extract stloc micro-optimization to a
1076         function and apply it to all cases.
1077
1078 2008-09-19  Mark Probst  <mark.probst@gmail.com>
1079
1080         * method-to-ir.c: Don't fail generic code sharing in cases we
1081         already support.
1082
1083 2008-09-18  Mark Probst  <mark.probst@gmail.com>
1084
1085         * mini-ppc.c: Handle structs in tailcalls on Darwin.
1086
1087 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
1088
1089         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
1090         implementation.
1091
1092 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
1093
1094         * trace.c: make tracing more useful and correct, with per-thread
1095         id and indent info.
1096
1097 2008-09-15  Mark Probst  <mark.probst@gmail.com>
1098
1099         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
1100         doing a method call and the argument is an R4.
1101
1102 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
1103
1104         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
1105         generic methods.
1106
1107 2008-09-13  Mark Probst  <mark.probst@gmail.com>
1108
1109         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
1110
1111 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
1112
1113         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
1114         (MONO_JUMP_TABLE_FROM_INS): Ditto.
1115
1116 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
1117
1118         * driver.c: Add a --agent argument (not supported yet) to load managed
1119         agent assemblies before loading the main assembly, similarly to how the
1120         Java VM handles agents.
1121
1122 2008-09-11  Mark Probst  <mark.probst@gmail.com>
1123
1124         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
1125         function to do stack layout of local variables.
1126
1127 2008-09-11  Mark Probst  <mark.probst@gmail.com>
1128
1129         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
1130         calculation.
1131
1132 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
1133
1134         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
1135         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
1136         JIT if DISABLE_JIT is defined.
1137
1138         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
1139         defined.
1140
1141 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1142
1143         * iltests.il.in: Disable the fconv test on PPC (the result is
1144         undefined according to ECMA).
1145
1146 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1147
1148         * iltests.il.in: Enable tail call tests for PPC.
1149
1150         * mini.h: Add variable for storing incoming valuetype argument
1151         addresses for tail calls.
1152
1153         * mini-ppc.c: Implement valuetype arguments and return values for
1154         tailcalls on Linux.
1155
1156 2008-09-09  Mark Probst  <mark.probst@gmail.com>
1157
1158         * mini-ppc.c: Partially implement tail calls (struct arguments and
1159         return values not supported).
1160
1161         * method-to-ir.c: Enable tail calls on PPC.
1162
1163 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
1164
1165         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
1166         runtime-invoke wrappers to work around the problem of them getting
1167         assigned to a random class.
1168
1169         * aot-runtime.c (mono_aot_get_method): Ditto.
1170         
1171 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
1172
1173         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
1174         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
1175
1176 2008-09-07  Mark Probst  <mark.probst@gmail.com>
1177
1178         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
1179         until they're implemented properly.
1180
1181         * exceptions-ppc.c: Use arch-independent exception-handling code
1182         instead of custom one.
1183
1184         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
1185         for Linear IR.
1186
1187         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
1188
1189         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
1190         applies when __powerpc__ is defined.
1191
1192 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
1193
1194         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
1195         methods to their code to avoid computing the full name of wrappers and
1196         doing a lookup in a string hash table.
1197
1198 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1199
1200         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
1201         we identify bblocks before method_to_ir () is ran.
1202
1203         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
1204         Also avoid optimizing branches pointing to themselves.
1205
1206         * mini.c (mini_method_compile): Ditto. Fixes #422947.
1207
1208 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
1209
1210         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
1211
1212 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1213
1214         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
1215         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
1216         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
1217         'buf'.
1218
1219         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
1220         jumped to the same entry in plt_jump_table.
1221
1222 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
1223
1224         * method-to-ir.c (initialize_array_data): Handle field with RVA from
1225         dynamic images.
1226
1227 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
1228
1229         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
1230         other assignment can be if converted. Saves 1.5% on corlib size and fixes
1231         #421807.
1232
1233 2008-08-29  Geoff Norton  <gnorton@novell.com>
1234
1235         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
1236         segment, and doesn't properly handle .space as .text.  Fixes
1237         AOT Mach/ARM
1238
1239 2008-08-29  Geoff Norton  <gnorton@novell.com>
1240
1241         * mini.c: Disable the mach exception handler when running on 
1242         ARM
1243
1244 2008-08-29  Geoff Norton  <gnorton@novell.com>
1245
1246         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
1247         globals on Darwin/ARM
1248
1249 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
1250
1251         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
1252         since too many things depend on it. Instead, call 
1253         mono_runtime_set_no_exec ().
1254         
1255         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
1256         the new JIT.
1257
1258         * aot-compiler.c: Add an 'asm-only' AOT option.
1259
1260         * mini.c: Avoid initializing the runtime when doing AOT compilation.
1261                 
1262         * aot-compiler.c (compile_method): Disable gshared support for now as it
1263         doesn't yet work.
1264
1265 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1266
1267         * mini-amd64.h : Fix a compiler warning.
1268
1269         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
1270           Changed to use a callback function to retrieve the unwind info.
1271           This avoids problems observed when code blocks were removed by
1272           unloading an app domain.
1273
1274         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
1275           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
1276           to work properly.
1277
1278         Contributed under MIT/X11 license.
1279
1280 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1281
1282         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
1283           case to keep the stack aligned to 8.
1284
1285         Contributed under MIT/X11 license.
1286
1287 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
1288
1289         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
1290         avoid repeated linear searches.
1291
1292 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
1293
1294         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
1295         methods it can't handle.
1296         
1297         * aot-compiler.c (add_method): Avoid adding a method twice.
1298         (add_wrappers): Add runtime invoke wrappers for all methods.
1299
1300         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
1301         function to create an aot-compatible version of this trampoline.
1302
1303         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
1304
1305 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
1306
1307         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
1308
1309         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
1310         with a generic sharing failure.
1311
1312         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
1313
1314         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
1315         CEE_RETHROW. Fixes #419634.
1316
1317         * mini.c (mono_method_to_ir): Ditto.
1318
1319         * exceptions.cs: Add a new test.
1320         
1321         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
1322         to mono_type_stack_size_internal () since some callers might not pass in
1323         an rgctx.
1324
1325         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
1326         instrument_prolog. Fixes #419878.
1327
1328         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
1329         doubles in soft float mode volatile.
1330
1331 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
1332
1333         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
1334
1335         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
1336         to handle soft float correctly.
1337
1338         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
1339         the fast path.
1340
1341         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
1342
1343         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
1344         to sp, since the generics catch code requires it.
1345
1346         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
1347         copying.
1348
1349         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
1350         mono_arch_emit_imt_argument ().
1351
1352         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
1353
1354         * mini-arm.c tramp-arm.c: Generic sharing updates.
1355
1356 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
1357
1358         * mini-arm.c: Fix the arm build.
1359
1360         * generic-sharing.c (mini_type_get_underlying_type): New helper function
1361         handling enums, generic instances and generic sharing.
1362         (mini_type_stack_size_full): Ditto.
1363
1364         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
1365         
1366         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
1367
1368         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
1369
1370         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
1371         trampolines.
1372
1373         * mini-arm.c: Various small generic sharing changes.
1374
1375         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
1376         this for x86.
1377         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
1378         custom code.
1379
1380         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
1381         helper function to return a generic class init trampoline.
1382
1383         * method-to-ir.c mini.c: Use it.
1384         
1385         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
1386         arch-specfic function to return a generic class init trampoline.
1387
1388         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
1389         the GENERIC_CLASS_INIT custom code.
1390
1391         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
1392         a fatal error, not a sharing failure.
1393
1394         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
1395         needed.
1396
1397         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
1398         trampoline argument from MONO_ARCH_VTABLE_REG.
1399
1400         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1401         order of the arguments to the C trampoline: pass 'slot' as the trampoline
1402         argument, and pass the vtable in VTABLE_REG.
1403
1404         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1405         order of the arguments to the C trampoline: pass 'slot' as the trampoline
1406         argument, and pass the vtable in VTABLE_REG.
1407         (mono_arch_create_trampoline_code_full): Remove some special casing for
1408         the rgctx fetch trampoline.
1409
1410         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
1411         Fixes #419273.
1412
1413         * iltests.il: Add a test for it.
1414
1415 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
1416
1417         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
1418
1419         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
1420         no longer needed.
1421
1422         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
1423         use mono_jit_info_table_find () to avoid recursion.
1424         (mono_delegate_trampoline): Add a sync wrapper here.
1425
1426         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
1427         here.
1428
1429         * mini.c (mono_method_to_ir): Ditto.
1430         
1431         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
1432         add_sync_wrapper argument. Don't add a sync wrapper here.
1433         (mono_create_jump_trampoline): Don't add a sync wrapper here.
1434
1435         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
1436         
1437 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1438
1439         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
1440           of nonvolatile registers back from MonoContext to CONTEXT.
1441
1442         Contributed under MIT/X11 license.
1443
1444 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1445
1446         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
1447           arguments on Winx64 there are only 4 argument registers.  For this
1448           logic to work the last argument must be pulled from the stack.  
1449
1450         Contributed under MIT/X11 license.
1451
1452 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
1453
1454         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1455
1456         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
1457         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
1458         encode/decode_method_ref ().
1459
1460         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
1461
1462         * aot-runtime.c (decode_patch): Ditto.  
1463
1464         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
1465         MONO_PATCH_INFO_METHOD.
1466
1467         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
1468         MonoGenericJitInfo.
1469
1470         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
1471         MonoGenericJitInfo.
1472
1473         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
1474
1475         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
1476         one from the caller.
1477
1478         * aot-runtime.c (decode_generic_inst): New function to decode and
1479         return a interned generic inst.
1480         (decode_klass_ref): Use it.
1481         (decode_method_ref): Ditto.
1482
1483         * aot-compiler.c (emit_exception_debug_info): Save 
1484         jinfo->has_generic_jit_info too.
1485
1486 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
1487
1488         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
1489
1490         * iltests.il.in: Add a test for fconv_to_i.
1491
1492         * liveness.c: Disable the liveness2 pass for now to save space.
1493
1494         * regalloc2.c: Include mempool-internals.h to fix warnings.
1495
1496         * aot-compiler.c (encode_method_ref): Encode the context of generic
1497         instance methods.
1498
1499         * aot-runtime.c (decode_method_ref): Inflate generic methods using
1500         the context saved in the aot file.
1501
1502         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1503
1504         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
1505
1506         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
1507         volatile so they won't be optimized away.
1508
1509 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
1510
1511         * ssa.c:
1512         * ssa2.c:
1513         * mini.c:
1514         * regalloc2.c:
1515         * dominators.c: Remove duplicated functions that now are in
1516         mempool-internals.h.
1517
1518 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
1519
1520         * aot-compiler.c: Fix warnings.
1521
1522         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
1523
1524         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
1525
1526         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
1527         as the patch type.
1528
1529         * mini.c (mono_resolve_patch_target): Ditto.
1530         
1531         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
1532         (encode_klass_ref): Add support for encoding VARs/MVARs.
1533
1534         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
1535
1536         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
1537         the handling of the got entries into a separate 'decode_got_entry' function.
1538         Add support for RGCTX_FETCH.
1539
1540         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
1541         clobbered by the trampoline code.
1542
1543         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
1544         not clobbered by the indirect calling code.
1545
1546 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1547
1548         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
1549         to fix the build.
1550
1551 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
1552
1553         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
1554         signature using the compilation mempool otherwise we would leak it.
1555
1556 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
1557
1558         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
1559         mono_emit_abs_call ().
1560
1561         * patch-info.h: Add GENERIC_CLASS_INIT.
1562
1563         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
1564
1565         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
1566         as their target as a near call.
1567
1568         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
1569         ABS handling code.
1570         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
1571
1572         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
1573         call to a runtime function described by a patch.
1574
1575         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
1576         mono_emit_abs_call, this has the advantage that the ABS handling code in
1577         mono_codegen () can handle them both, and can handle other stuff in the
1578         future without additional code.
1579
1580         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
1581         entry.
1582         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
1583         abs addresses.
1584
1585         * mini.h: Add missing bblock related prototypes.
1586
1587         * mini.h (MonoCompile): Remove unused reverse_inst_list and
1588         reverse_inst_list_len fields.
1589
1590         * mini.c: Refactor this file a bit by moving branch optimizations to 
1591         branch-opts.c.
1592
1593         * method-to-ir.c: Merge generic sharing changes missed earlier.
1594
1595         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
1596
1597         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
1598         shared patches. Process METHODCONST as a shared patch.
1599
1600         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
1601         as it crashes on the 2.0 mscorlib.
1602
1603         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
1604         to cause crashes.
1605         
1606         * aot-compiler.c: Use is_plt_patch () in a few additional places.
1607         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
1608         by IMT.
1609
1610         * aot-compiler.c: Reorganize the got handling code to be a bit more
1611         understandable.
1612
1613 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1614
1615         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
1616         mono_patch_info_equals/hash, and use it to massively simplify
1617         get_plt_index ().
1618
1619         * mini.c (mono_patch_info_hash): Simplify this and add support for
1620         more patch types.
1621
1622         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
1623
1624         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
1625         handling code, since an offset is not enough to identify a trampoline.
1626
1627         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
1628
1629 2008-08-17  Mark Probst  <mark.probst@gmail.com>
1630
1631         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
1632
1633         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
1634
1635         * mini-ops.h: Argument and result types for OVF_CARRY ops.
1636
1637         * decompose.c: PPC decompositions for various ops.
1638
1639         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
1640
1641 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1642
1643         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
1644         call the generic trampoline code using a call, instead of a jump, to
1645         remove some special casing from the generic trampoline code.
1646
1647         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
1648         (mono_codegen): Ditto.
1649
1650         * aot-compiler.c aot-runtime.c: Ditto.
1651
1652         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
1653
1654         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
1655         helper function to find the offset corresponding to a lazy fetch trampoline.
1656
1657         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
1658         when doing generic sharing.
1659
1660         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
1661         places.
1662         
1663         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
1664         mini-trampolines.c to be with the other trampoline creation functions.
1665
1666         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
1667         as it is equal to method->signature in most cases, add a 
1668         mono_emit_method_call_full variant which takes a signature and an imt
1669         argument as well.
1670
1671 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
1672
1673         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
1674         to this function, since it could be computed easily from the method 
1675         argument.
1676         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
1677         more.
1678
1679         * method-to-ir.c mini.c: Remove references to 
1680         compile_generic_method_wo_context.
1681
1682         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
1683         generic method calls.
1684         
1685         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
1686         dimensional non-szarrays.
1687
1688         * mini.c (mini_init): Register mono_array_new_1.
1689
1690         * jit-icalls.c (mono_array_new_1): New jit icall.
1691
1692         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
1693         pointing to the method.
1694
1695         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
1696         method addresses belonging to METHOD_JUMP patches in the 
1697         jump_target_got_slot_hash.
1698         (mono_aot_load_method): Ditto.
1699
1700         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
1701         METHOD_JUMP patches.
1702
1703         * mini.c (mini_create_jit_domain_info): New helper function which 
1704         initializes/frees domain->runtime_info.
1705         (mini_free_jit_domain_info): Ditto.
1706         (mini_init): Install the domain hook functions with the runtime.
1707
1708         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
1709         information maintained by the JIT.
1710
1711         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
1712         insertion into jump_table_hash into mono_codegen (), also implement proper
1713         locking.
1714
1715         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
1716         tail calls, it is already done by the aot code.
1717         
1718         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
1719         mechanism on amd64.
1720
1721         * iltests.il.in: Make the jmp test a bit more complex.
1722
1723         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
1724         generic instances which doesn't have a token.
1725
1726         * aot-runtime.c (decode_method_ref): Ditto.
1727         
1728         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
1729         can handle this case now.
1730         (handle_box): Ditto.
1731
1732 2008-08-15  Geoff Norton  <gnorton@novell.com>
1733
1734         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
1735         debugging check.
1736
1737 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
1738
1739         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
1740         calling generic methods.
1741
1742         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
1743
1744         * aot-runtime.c (decode_patch_info): Ditto.
1745
1746         * mini.c (mono_resolve_patch_target): Ditto.
1747         
1748         * patch-info.h: Add METHOD_RGCTX.
1749
1750         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
1751
1752 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
1753
1754         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
1755         arguments in registers.
1756
1757         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
1758         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
1759
1760         * mini.c (mini_method_compile): Abort aot compilation for generic
1761         methods if generic sharing is disabled.
1762         
1763         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
1764         an mrgctx.
1765
1766         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
1767         requiring an mrgctx.
1768
1769         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
1770         store instructions when converting a vcall to a normal call.
1771
1772         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
1773         mono_arch_find_jit_info.
1774
1775 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
1776
1777         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
1778         avoid calling mono_method_full_name () for every method even if the
1779         env var is not set.
1780         (check_inline_caller_method_name_limit): Ditto.
1781
1782 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1783
1784         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
1785         assemblies in one run.
1786
1787         * aot-compiler.c (mono_compile_assembly): Only print out a count of
1788         skipped methods if it is not 0.
1789
1790         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
1791
1792 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1793
1794         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
1795           MONO_ARCH_HAVE_UNWIND_TABLE.
1796
1797         Contributed under MIT/X11 license.
1798
1799 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1800
1801         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
1802           from default optimizaton list on Winx64.
1803
1804         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
1805
1806         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
1807           the LMF from the MonoJitTlsData structure.
1808
1809         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
1810
1811         Contributed under MIT/X11 license.
1812
1813 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1814
1815         * mini.c (sigsegv_signal_handler): Fix the build.
1816
1817         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
1818         assembly->aot_module.
1819
1820         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
1821         hash table. This simplifies and speeds up a lot of code, and fixes support
1822         for .netmodules.
1823
1824         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
1825         with the runtime.
1826
1827         * mini-exceptions.c: Ditto.
1828         
1829         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
1830         'native_offset' argument, since these are computed in the 
1831         mono_find_jit_info () function.
1832
1833         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
1834         is used by exceptions-ppc.c.
1835
1836         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
1837         mono_arch_find_jit_info ().
1838         
1839         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
1840         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
1841         generic code in mini-exceptions.c.
1842
1843 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
1844
1845         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
1846
1847         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
1848         
1849         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
1850         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
1851         called while holding the loader lock. Fixes #415608.
1852         (mono_aot_get_method_from_token_inner): Ditto.
1853
1854 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1855
1856         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
1857         to reduce differences between this and the generic implementation in
1858         mini-exceptions.c.
1859         (ves_icall_get_frame_info): Ditto.
1860
1861         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
1862
1863         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
1864         longer neccesarry.
1865
1866         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
1867         mono_arch_get_call_filter () and make it non-static, for consistency with the
1868         other architectures.
1869
1870 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
1871
1872         * mini.c:
1873         * local-propagation.c:
1874         * mini-x86.c: Correct the name of arch defines.
1875
1876 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1877
1878         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
1879         NO_EMULATE_LONG_SHIFT_OPS define.
1880
1881 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
1882
1883         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
1884         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
1885
1886         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
1887         MACH fixes. Merged from the 2.0 branch.
1888
1889         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
1890
1891         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
1892         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
1893
1894         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
1895
1896         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
1897         mono_marshal_get_native_wrapper () signature changes.
1898
1899 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
1900
1901         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
1902         conversion bug under arm.
1903
1904 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
1905
1906         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
1907
1908         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
1909         with overflow checking.
1910
1911 2008-08-05  Marek Habersack  <mhabersack@novell.com>
1912
1913         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
1914         to the genmdesc.pl file
1915
1916 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
1917
1918         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
1919         arg_array in the soft-float versions of the LOAD/STORE macros.
1920
1921         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
1922         implementation.
1923
1924         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
1925
1926 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1927
1928         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
1929         a float HFA. Fixes #413621.
1930
1931 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
1932
1933         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
1934         frame_size to args_size. Fixes build.
1935
1936 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1937
1938         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
1939         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
1940
1941         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
1942         the stack are not unaligned. Fixes #413247.
1943         
1944 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
1945
1946         * mini.c: update jitted methods performance counters.
1947
1948 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1949
1950         * mini-exceptions.c: increase the exceptions thrown performance
1951         counter in mono_handle_exception ().
1952
1953 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
1954
1955         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
1956         can work with netmodules.
1957
1958 2008-07-28  Geoff Norton  <gnorton@novell.com>
1959
1960         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
1961         regression tests.
1962
1963 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1964
1965         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
1966         correct place.
1967
1968 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
1969
1970         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1971           The float param registers and other param registers must be the 
1972           same index on Windows x64.
1973
1974         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
1975           ArgValuetypeAddrInIReg argument case.  Setting the argument
1976           op to OP_VTARG_ADDR (OP_REGOFFSET)).
1977
1978         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
1979           variable computed above as the copy length for arguments of storage
1980           type ArgValuetypeAddrInIReg.
1981
1982         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
1983           ArgValuetypeAddrInIReg argument case.  This case will rely on
1984           mono_arch_emit_outarg_vt to emit the correct code later in the process.
1985
1986         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
1987           a 32 byte stack allocation for all calls.  We will omit the adjustment for
1988           jump and tail call instructoins as they do not follow the typical call behavior.
1989
1990         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
1991           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
1992           local variable and pass the local variable by reference to the called method.
1993
1994         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
1995           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
1996           of a struct is passed in a register it must be saved with the other
1997           volatile argument on the stack.
1998
1999         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
2000           frame pointer the stack adjustment value must be saved to the unwind 
2001           info structure.
2002
2003         Contributed under MIT/X11 license.
2004
2005 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2006
2007         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
2008         which got lost in the merge.
2009
2010 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2011
2012         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
2013         build.
2014
2015         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
2016         
2017         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
2018         icalls, since they won't be patched.
2019
2020         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
2021         different code sequence when running under valgrind to prevent some valgrind
2022         errors.
2023
2024         * iltests.il.in: Add new regression test.
2025
2026         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
2027         end with a throw.
2028
2029         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
2030         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
2031
2032         * iltests.il.in: Add new test.
2033
2034         * aot-compiler.c: Fix some warnings.
2035
2036         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
2037         Fixes #412494.
2038
2039 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2040
2041         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
2042         (mini_usage_jitdeveloper): Add a missing --wapi option.
2043
2044 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2045
2046         * mini-codegen.c: Simplify the is_fp macros.
2047         (free_up_ireg): Remove, use free_up_reg instead.
2048         (free_up_reg): Fix the fp case.
2049
2050 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2051
2052         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
2053         lowered earlier.
2054
2055         * exceptions-x86.c: Merge some changes which seemed to have got lost
2056         in the linear-ir merge.
2057
2058         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
2059
2060         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
2061         long vreg volatile even if the variable was already created.
2062
2063         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
2064         volatile variables.
2065
2066 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2067
2068         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
2069
2070         * mini.c (mono_jit_compile_method_inner): Add support for 
2071         MONO_EXCEPTION_BAD_IMAGE.
2072
2073         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
2074         mini_method_get_context () returns NULL. Fixes #356531.
2075
2076         * mini.c (mono_method_to_ir): Ditto.
2077         
2078         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
2079         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
2080
2081 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2082
2083         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
2084         in the LDFTN implementation.
2085
2086 2008-07-25  Mark Probst  <mark.probst@gmail.com>
2087
2088         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
2089         code, patch calls to icalls, too, even if they're not in the
2090         shared generic code hash.  Fixes #411962.
2091
2092 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2093
2094         * cpu-x86.md: Increase the length of the fcall opcodes.
2095
2096         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
2097         calls returning floats.
2098
2099         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
2100         on NEWARR.
2101         
2102         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
2103         missed earlier.
2104
2105         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
2106         into the domain->method_code_hash.
2107
2108         * aot-compiler.c: Fix win32 build.
2109
2110         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
2111         
2112         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
2113         gshared NEWARR implementation.
2114
2115         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
2116
2117         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
2118         can be used outside of method_to_ir.
2119
2120         * mini.h (MonoCompile): Add arg_types field.
2121
2122         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
2123         
2124         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
2125         the values of the local arg_array and param_types array.
2126
2127 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2128
2129         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
2130         got accesses might only get generated later when NEWOBJ is decomposed.
2131         
2132         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
2133         looking up the native code of the target method when a delegate is called
2134         for the first time.
2135
2136         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
2137         optimization.
2138
2139         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
2140
2141         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
2142         AOT work on platforms without a working dlsym implementation.
2143
2144         * mini.h: Bump AOT image format version.
2145         
2146 2008-07-24  Mark Probst  <mark.probst@gmail.com>
2147
2148         * mini-exceptions.c: Free a MonoType with
2149         mono_metadata_free_type() instead of g_free().
2150
2151         * aot-runtime.c: Free a MonoType.
2152
2153 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2154
2155         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
2156         optimization.
2157
2158         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
2159         fp stack on x86.
2160
2161 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
2162         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
2163         profiler hook.
2164
2165 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2166
2167         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
2168         NEWOBJ calls on valuetypes.
2169
2170         * iltests.il.in: Add new test.
2171
2172         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
2173
2174 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2175
2176         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
2177         is no longer needed.
2178
2179         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
2180         non register sized integer arguments.
2181         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
2182         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
2183         emit_memcpy2 ().
2184
2185         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
2186         CEE_MONO_RETOBJ.
2187         
2188         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
2189         two a binop with different sized arguments is emitted.
2190
2191         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
2192         instruction in the ins==NULL case.
2193
2194 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2195
2196         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
2197
2198         * mini-x86.c: Fix osx build.
2199
2200         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
2201         opcodes as well.
2202
2203         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
2204         instruction for non int sized variables.
2205
2206         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
2207         implementation.
2208
2209 2008-07-23  Robert Jordan  <robertj@gmx.net>
2210
2211         * method-to-ir.c: Fix MSVC build.
2212
2213 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2214
2215         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
2216         a non int sized type, widen it to an int since newer versions of gcc seem to
2217         generate code which needs this.
2218
2219         * ssa2.c abcremoval2.c: Fix warnings.
2220
2221         * *: Merge the Linear IR branch.
2222
2223         The original branch is at trunk/branches/vargaz/mini-linear-il, and
2224         the ChangeLog file there describes all the changes done over the years. 
2225         Further documentation can be found at www.mono-project.com/Linear_IL.
2226
2227 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2228
2229         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2230           The float param registers and other param registers must be the 
2231           same index on Windows x64.
2232
2233         Contributed under MIT/X11 license.
2234
2235 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
2236
2237         * mini.c: Make the previous fix GC safe.
2238
2239 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
2240
2241         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
2242
2243 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2244
2245         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
2246           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
2247           ArgValuetypeAddrInIReg instead.
2248
2249         Contributed under MIT/X11 license.
2250
2251 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
2252
2253         * mini-codegen.c (get_register_spilling): Fix a warning.
2254
2255 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
2256
2257         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
2258         for types which the initialization fails. Raises the provided exception
2259         at the right stop after cleanup.
2260
2261 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
2262
2263         * aot-compiler.c: Free most of the memory allocated during compilation.
2264
2265         * mini.c (mini_parse_debug_options): Fix a leak.
2266         
2267         * mini.c (mini_method_compile): Don't add the method to the jit info tables
2268         during aot compilation.
2269
2270 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
2271
2272         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
2273         it has too much register pressure.
2274
2275 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
2276
2277         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
2278
2279 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
2280
2281         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2282         on x86.
2283
2284         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2285         on amd64 similar to the way it is done on arm.
2286
2287         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2288
2289         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
2290         consistency, normalize error messages, avoid loading aot-only modules in
2291         normal mode.
2292
2293         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
2294         for consistency.
2295
2296         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
2297
2298 2008-07-11  Martin Baulig  <martin@ximian.com>
2299
2300         * debug-debugger.h
2301         (MonoDebuggerInfo): Add `interruption_request'.
2302
2303 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
2304
2305         * aot-compiler.c (emit_plt): Remove some dead code.
2306
2307         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
2308
2309         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
2310         return the plt info offset belonging to a given plt entry.
2311
2312         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
2313         mono_aot_get_plt_info_offset.
2314         
2315         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
2316         similar to the amd64 code by makeing jumps through a separate jump table 
2317         instead of embedding the jump addresses into the code.
2318
2319 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
2320
2321         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
2322         method.
2323
2324 2008-07-10  Martin Baulig  <martin@ximian.com>
2325
2326         * mini.c (mini_method_compile): Disable generics sharing when
2327         running in the debugger.
2328
2329 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
2330
2331         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
2332
2333         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
2334         the local register allocator from running out of registers on x86 when 
2335         using aot.
2336
2337 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
2338
2339         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
2340         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
2341         C4146.
2342
2343         Contributed under MIT/X11 license.
2344
2345 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
2346
2347         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
2348         speed up the assembler.
2349
2350 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
2351
2352         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
2353         support.
2354
2355         * mini.c: Move the soft float handling macros a bit earlier, add 
2356         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
2357         place.
2358
2359         * mini.h: Add prototype for mono_arch_fixup_jinfo.
2360
2361         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
2362         read-only to help catch code allocation requests.
2363         
2364         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
2365         and turn it off when using --aot-only or when compiling with --aot=full.
2366
2367         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
2368         jump table for switches from the normal domain mempool, not the code
2369         manager.
2370
2371         * mini-trampolines.c (get_unbox_trampoline): New function to return an
2372         unbox trampoline which handles aot-only mode too.
2373
2374         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
2375         an AOTed unbox trampoline.
2376
2377         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
2378
2379 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
2380
2381         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
2382         ""
2383
2384         Contributed under MIT/X11 license.
2385
2386 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
2387
2388         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
2389           the unwind information for the method at the end of the allocated block.
2390           
2391         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
2392           MonoCompileArch to hold the unwind info for SEH on Winx64
2393         
2394         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
2395           frame pointer info for the method being compiled.
2396           
2397         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
2398           the call to mono_exception_from_token.
2399           
2400         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
2401           storing the method prolog information in a format that the Winx64 SEH can understand.  This
2402           information is stored a the end of the method block because it is all 32-bit offset based.
2403
2404         Contributed under MIT/X11 license.
2405
2406 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
2407
2408         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
2409
2410         * wapihandles.c: Fix warnings.
2411
2412         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
2413         mode.
2414
2415         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
2416         mono_jit_compile_method in aot-only mode since that calls the type 
2417         initializer.
2418         
2419         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
2420         get_delegate_invoke_impl in aot-only mode.
2421
2422         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
2423
2424 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
2425
2426         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
2427
2428         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
2429         is on by default.
2430
2431         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
2432
2433         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
2434         init trampoline from the AOT file as well.
2435
2436         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
2437         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
2438         code.
2439
2440         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
2441         mono_init.
2442
2443         * exceptions-amd64.c: Add _full variants for the remaining exception code
2444         creation functions as well, allow emission of relocatable code, remove
2445         caching since that is now done by the caller.
2446
2447         * mini-exceptions.c: Add _full variants for the remaining exception code
2448         creation functions as well, add aot-only support.
2449
2450         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
2451         if we can determine a proper token for them.
2452         (add_wrappers): Add a few more wrappers.
2453         (emit_method_code): Remove some dead code.
2454         (emit_trampolines): Emit exception code too.
2455
2456         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
2457
2458         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
2459         mono_array_new_va which avoids varargs.
2460
2461         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
2462
2463         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
2464         mono_arch_create_specific_trampoline () in all places.
2465
2466         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
2467         a bit so it can be used for other things as well.
2468         
2469         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
2470         on demand as well.
2471
2472         * exceptions-amd64.c: Rename the caching from the exception code creation
2473         functions, it is done by the caller instead.
2474         
2475         * exceptions-amd64.c: Change the signature of the exception code creation 
2476         functions to allow the creation of relocatable code later.
2477
2478         * mini-exceptions.c: Add a set of functions to query the various 
2479         runtime-generated exception functions.
2480
2481         * mini.c mini-exceptions.c: Use the newly added functions instead of the
2482         mono_arch_.. () functions.
2483         
2484 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
2485
2486         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
2487
2488         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
2489
2490         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
2491         (mini_get_vtable_trampoline): Ditto.
2492
2493         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
2494         code in the AOT case by returning the code size and a list of relocations to
2495         the caller.
2496
2497         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
2498
2499 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
2500
2501         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
2502           clean the stack.
2503
2504         Contributed under MIT/X11 license.
2505
2506 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
2507
2508         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
2509         so the buffer size can be computed correctly. Fixes #404735.
2510
2511         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
2512         normally as cfg->debug_info is already freed.
2513
2514 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
2515
2516         * mini-amd64.c: For calls returning vtypes in registers, don't store
2517         the return address on the stack, instead allocate a separate local for
2518         it. Fixes #404729.
2519
2520 2008-07-05  Mark Probst  <mark.probst@gmail.com>
2521
2522         * mini-trampolines.c, mini.h: Add an argument to
2523         mono_create_jit_trampoline_in_domain() for turning off the adding
2524         of the sync wrapper.
2525
2526         * mini.c: Use the JIT trampoline without sync instead of
2527         ldftn_nosync in static RGCTX invoke wrappers so that the call can
2528         be patched.
2529
2530 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2531
2532         * driver.c: Turn on GSHARED optimization by default.
2533
2534 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
2535
2536         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
2537         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
2538
2539         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
2540         create a variant of the generic trampoline code callable from AOTed trampolines.
2541
2542         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
2543         trampoline code callable from AOTed trampolines.
2544
2545         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
2546
2547 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2548
2549         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
2550         pass-through manner.
2551
2552         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
2553         and don't fail sharing for them anymore.
2554
2555         * mini-exceptions.c: Handle exceptions in shared generic methods.
2556
2557         * generic-sharing.c: When checking the context of a generic
2558         method, also check its class's context.  Don't treat wrappers as
2559         sharable.
2560
2561         * mini-trampolines.c: Some code factored out to
2562         metadata/generic-sharing.c.  Handle the MRGCTX case.
2563
2564         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
2565         we must deal with the method being of another instantiation of the
2566         class.  Add static rgctx invoke wrappers to generic methods.
2567
2568 2008-07-04  Mark Probst  <mark.probst@gmail.com>
2569
2570         * mini.c: Provide all jit infos of generic shared methods with a
2571         generic jit info.
2572
2573         * mini-exceptions.c: Handle the new situation that a generic info
2574         might be available, but not info about the this/vtable/mrgctx
2575         variable.
2576
2577 2008-07-03  Mark Probst  <mark.probst@gmail.com>
2578
2579         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
2580         generic methods.
2581
2582 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
2583
2584         * dominators.c (check_dominance_frontier): Fix a warning.
2585
2586         * mini.h: Add some missing prototypes.
2587
2588         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
2589
2590         * driver.c (mono_jit_init_version): Correct the comments since the first
2591         argument should be the name of the root domain, not a filename.
2592
2593         * aot-runtime.c (make_writable): Error out if this is called while running
2594         with --aot-only.
2595         (load_aot_module): Ditto.
2596
2597         * aot-compiler.c: Really fix the computation of method indexes.
2598
2599         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
2600         optimizations as this is no longer called frequently.
2601
2602         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
2603         method and the invoke impl code and pass it to the delegate trampoline instead of
2604         just the delegate class.
2605
2606 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
2607
2608         * aot-compiler.c: Fixup the computation of method indexes.
2609         (add_wrappers): Create the base methods of the runtime invoke wrappers using
2610         the method builder infrastructure.
2611
2612         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
2613         has no header.
2614
2615         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
2616         mode, load the method right away instead of creating a trampoline.
2617
2618         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
2619
2620         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
2621         some checks a bit.
2622
2623 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
2624
2625         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
2626         (mono_aot_load_method): Use method_index instead of method->token.
2627
2628         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
2629         can handle icalls etc. properly.
2630
2631         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2632
2633         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
2634
2635         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
2636         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
2637         JIT_ICALL_ADDR patch type.
2638
2639         * patch-info.h: Add JIT_ICALL_ADDR patch type.
2640
2641         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
2642         request flag.
2643         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
2644
2645         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
2646
2647 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
2648
2649         * mini.c: Use domain->jit_code_hash_lock for controlling access to
2650         domain->jit_code_hash.
2651
2652 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
2653
2654         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
2655
2656 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
2657
2658         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
2659         get_this_arg_from_call, let it compute it when needed.
2660
2661         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
2662         gsctx from code only when needed.
2663
2664         * mini-trampolines.c (get_generic_context): Rename this to 
2665         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
2666         it can be called by the arch backends.
2667
2668         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
2669
2670 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
2671
2672         * driver.c (mono_main): Add experimental --aot-only command line option.
2673
2674         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
2675         set.
2676
2677 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
2678
2679         * driver.c (DllMain): Remove mono_module_handle.
2680
2681         Contributed under MIT/X11 license.
2682
2683 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
2684
2685         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
2686         for emitting methods which are not in the source assembly. Detect and report
2687         failure of assembling+linking.
2688         
2689         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
2690
2691         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
2692
2693 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
2694
2695         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
2696
2697 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
2698
2699         * mini.h: Remove some obsolete prototypes.
2700
2701         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
2702
2703 2008-06-24  Mark Probst  <mark.probst@gmail.com>
2704
2705         * mini.c (get_object_generic_inst): Variable-sized arrays are not
2706         supported by Visual Studio, so use alloca().
2707
2708 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
2709
2710         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
2711         Fixes #402585.
2712
2713 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2714
2715         * mini.c: Fail sharing of a generic method if it contains an open
2716         catch clause (because we don't pass MRGCTXs yet).
2717
2718 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2719
2720         * mini.c: When compiling a method with generic sharing, insert the
2721         method instantiated with an all-Object generic context into the
2722         jit info table, instead of the context of the first instantiation
2723         of the method we happen to compile.
2724
2725 2008-06-18  Martin Baulig  <martin@ximian.com>
2726
2727         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
2728         `major_version' and `minor_version'.
2729
2730 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2731
2732         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
2733         mono_method_is_generic_sharable_impl() takes an additional
2734         argument specifying whether to treat type variables as reference
2735         types.
2736
2737 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2738
2739         * mini.h: Removed obsolete prototypes.
2740
2741 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2742
2743         * mini.c: Don't fail generic sharing for initobj and sizeof - we
2744         already handle them.
2745
2746 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2747
2748         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
2749         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
2750         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
2751         tramp-x86.c: Added a MonoGenericContext* argument to
2752         mono_arch_get_unbox_trampoline() so that it can call other
2753         functions which require it.
2754
2755 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2756
2757         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
2758         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
2759         mono_arch_get_this_arg_from_call() takes a
2760         MonoGenericSharingContext* as well.
2761
2762 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2763
2764         * mini.c: Factor out code for emitting unbox into emit_unbox() and
2765         implement generic sharing of unbox.
2766
2767 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2768
2769         * mini.c: Don't compute the vtable to determine whether a field is
2770         special static, because it might not work for open types.
2771
2772 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2773
2774         * mini.c: Removed the unused token_type and token_source arguments
2775         from get_runtime_generic_context_ptr().
2776
2777 2008-06-17  Marek Habersack  <mhabersack@novell.com>
2778
2779         * mini.c (ADD_BINOP): fix the build
2780
2781 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
2782
2783         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
2784         a widening op.
2785
2786 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2787
2788         * mini.h: Removed class relations enum that's not used anymore.
2789
2790 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2791
2792         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
2793
2794         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
2795         the lazy fetch trampoline access code.
2796
2797 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
2798
2799         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
2800
2801 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
2802
2803         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
2804
2805         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
2806
2807         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
2808
2809 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2810
2811         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
2812         intrinsics.
2813
2814         * mini-ops.h: Add MIN/MAX_UN opcodes.
2815
2816         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
2817         intrinsics.
2818
2819         * basic-math.cs: Add more min/max tests.
2820
2821         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2822
2823 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2824
2825         * mini.c: Small fix in the prologue of emit_castclass.
2826
2827 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2828
2829         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2830
2831         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
2832         do not work even for unsigned types. Fixes #400014.
2833
2834         * basic-math.cs: Add regression tests for unsigned Min/Max.
2835
2836 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2837
2838         * mini.c: Added additional context_used argument to several
2839         functions, which will be needed for sharing generic methods.  Use
2840         GET_RGCTX macro wherever appropriate.  Declare only one
2841         context_used in mono_method_to_ir().
2842
2843 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2844
2845         * mini.c, generic-sharing.c: Removed generic class relations.
2846
2847         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
2848         functions due to MRGCTX changes.
2849
2850 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2851
2852         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
2853         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
2854         with calculated IMT.
2855
2856         * mini.c: Generic sharing of calls via generic interfaces.
2857
2858         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
2859         generic method with non-constant MonoGenericContext*.  Instead,
2860         the context is taken out of the method itself.
2861
2862 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2863
2864         * mini.c: Generic sharing of ldvirtftn.
2865
2866 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2867
2868         * mini.c: Generic sharing of ldftn.
2869
2870 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2871
2872         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
2873
2874 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2875
2876         * mini.c: Generic sharing of the special case of ldtoken followed
2877         by a call to GetTypeFromHandle.
2878
2879 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2880
2881         * mini.c: Generic sharing of box for nullable types.
2882
2883 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2884
2885         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
2886         are passed on the stack. Fixes #324807.
2887
2888 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
2889
2890         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
2891         for the ArgValuetypeAddrInIReg case.
2892
2893         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
2894         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
2895
2896         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
2897         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2898         local variable and pass the local variable by reference to the called method.
2899           
2900         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
2901         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
2902
2903         Contributed under MIT/X11 license.
2904
2905 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
2906
2907         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
2908
2909         * debug-mini.c (mono_debug_print_vars): Release memory after printing
2910         everything.
2911
2912 2008-06-10  Martin Baulig  <martin@ximian.com>
2913
2914         * debug-mini.c
2915         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
2916
2917 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
2918
2919         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
2920         possible error when no arguments are passed.
2921
2922         Contributed under MIT/X11 license.
2923
2924 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
2925
2926         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
2927         where the file name is NULL.
2928
2929 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
2930
2931         * mini.c: Fix s390 build.
2932
2933 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
2934
2935         * trace.c (mono_trace_parse_options): Fix warnings.
2936
2937         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
2938
2939 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
2940
2941         * mini.c (remove_block_if_useless): Avoid printing the method name.
2942         
2943         * mini.c: Remove needless setting of ins->cil_code which is now done by 
2944         MONO_INST_NEW.
2945
2946         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
2947         LMF. Not yet used.
2948
2949         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
2950         translated code after it has been patched.
2951
2952 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
2953
2954         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
2955         avoid problems during code patching on SMP systems.
2956         (emit_call): Avoid adding a patch info which is already added by 
2957         emit_call_body.
2958         (mono_arch_emit_exceptions): Ditto.
2959
2960 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
2961
2962         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
2963         MONO_TYPE_ISSTRUCT already checks for it.
2964
2965 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
2966
2967         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
2968           structs with floats on Winx64 the float registers are not used.  
2969           The integer registers are always used..
2970         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
2971           only one register will be used and only if the size of the struct 
2972           is 1,2,4, or 8 bytes.
2973
2974         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
2975           to work for Winx64.
2976
2977         Contributed under MIT/X11 license.
2978
2979 2008-06-05  Martin Baulig  <martin@ximian.com>
2980
2981         * debug-debugger.c (debugger_lookup_class): Also call
2982         mono_class_setup_methods() here; we're only called from RTI.
2983
2984 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
2985
2986         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
2987         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
2988         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
2989         Post-process object files and add dtrace-generated object, if necessary.
2990
2991         Contributed under MIT/X11 license.
2992
2993 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2994
2995         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
2996         element class.
2997
2998         * mini.c: Generic sharing for unbox.any and castclass.
2999
3000 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3001
3002         * mini.c: Ignore tailcall prefix in shared generic code and when
3003         doing calls which require a vtable/rgctx argument.
3004
3005 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3006
3007         * mini.c: Don't free the JIT info.
3008
3009         * driver.c: Changes in the JIT info table testing code.
3010
3011 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
3012
3013         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
3014         interruption. Fix some warnings.
3015
3016         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
3017         interruption_checkpoint.
3018
3019 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
3020
3021         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
3022         from embedding applications.
3023
3024 2008-06-02  William Holmes  <billholmes54@gmail.com>
3025
3026         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
3027           reserving 32 bytes on the stack when making calls. 
3028
3029         Contributed under MIT/X11 license.
3030
3031 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
3032
3033         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
3034         the linear IL branch.
3035
3036         * driver.c: Print out more information for --version on arm.
3037
3038 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
3039
3040         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
3041         bb_exit instead, since out of line bblocks might not actually be emitted
3042         out-of-line.
3043         
3044         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
3045         maximum epilog size for out of line bblocks if tracing is enabled.
3046
3047         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
3048
3049 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
3050
3051         * arrays.cs: Regression tests for allocating arrays with negative sizes.
3052
3053 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
3054
3055         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
3056         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
3057         opcodes.
3058
3059 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
3060
3061         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
3062         the 'value' to store is a constant.
3063
3064         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
3065
3066         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
3067         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
3068
3069 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
3070
3071         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
3072         for accessing method->generic_container.
3073
3074 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
3075
3076         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
3077         
3078         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
3079
3080         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
3081
3082         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
3083         fails.
3084
3085 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
3086
3087         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
3088
3089         * mini.c: Handle the case when mono_class_vtable () fails.
3090
3091 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
3092         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
3093         the stat profiler.
3094
3095 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3096
3097         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
3098         together with domain sharing.
3099
3100 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3101
3102         * mini.c: Treat callvirts to final methods like non-virtual calls
3103         when doing generic sharing, i.e. look them up in the runtime
3104         generic context.
3105
3106 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3107
3108         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
3109         with computed types (for generic sharing).
3110
3111         * mini.c: Generic sharing for mkrefany and refanyval.
3112
3113 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
3114
3115         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
3116         possible.
3117
3118         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
3119         the generic sharing code.
3120         
3121         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
3122         when needed.
3123
3124 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3125
3126         * mini.h: Remove the declaration of mono_aot_init_vtable ().
3127
3128 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
3129
3130         * driver.c: updated copyright date
3131
3132 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3133
3134         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
3135         needed.
3136
3137 2008-05-19  Martin Baulig  <martin@ximian.com>
3138
3139         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
3140         pointing to the new `_mono_debug_using_mono_debugger' variable.
3141
3142         * driver.c
3143         (mono_main): Check mono_debug_using_mono_debugger() rather than
3144         the `MONO_INSIDE_MDB' environment variable to check whether we're
3145         inside the debugger.
3146
3147 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
3148
3149         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
3150         argument.
3151
3152 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
3153
3154         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
3155
3156         * mini.c: Added mini_assembly_can_skip_verification. This
3157         function checks if the assembly requested to skip verification. 
3158         Fixes part of #387274.
3159
3160 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
3161
3162         * mini.c (mini_get_method): Disable the check for open generic classes when
3163         using generic sharing.
3164
3165         * generics.cs: Add a test for #387034.
3166
3167         * mini.c (mini_get_method): Check whenever the method class is an open generic
3168         type, and return NULL in that case, causing a verification error. Fixes
3169         #384123.
3170
3171 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3172
3173         * driver.c (mono_main): Revert r102623. The right
3174         thing to do is to enable the verifier under verifiable
3175         unless a --security flag was passed.
3176
3177         We need this non-trivial behavior for --verify-all otherwise
3178         mcs-compileall won't be able to use it. As it needs everything to
3179         be verified under validil.
3180
3181 2008-05-06  Martin Baulig  <martin@ximian.com>
3182
3183         Fix #383749.
3184
3185         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
3186         (mono_debugger_thread_cleanup): Likewise.
3187         (mono_debugger_extended_notification): Likewise.
3188
3189 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3190
3191         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
3192         against both inflated and non-inflated methods. We need to check against the
3193         generic definition for cases where the instantiated method is not visible.
3194         We need to check against the inflated types for cases where the instantiation
3195         changes any super type. This fixes #382986.
3196
3197         Note that this doesn't need to be applied to other parts of mono_method_to_ir
3198         that check for visibiliy as generic params only appears as the type subject
3199         of tokens on call opcodes. Field manipulation and ldftn must always
3200         target an exact type.
3201
3202 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3203
3204         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
3205         if no related --security flag is passed.
3206
3207 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3208
3209         * mini-arch.h: Prepare support for ppc64.
3210
3211         Contributed under MIT/X11 license.
3212
3213 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3214
3215         * aot-runtime.c: Prepare support for ppc64.
3216
3217         Contributed under MIT/X11 license.
3218
3219 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3220
3221         * mini-ops.h: Prepare support for ppc64.
3222
3223         Contributed under MIT/X11 license.
3224
3225 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
3226
3227         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
3228
3229         Contributed under MIT/X11 license.
3230
3231 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
3232
3233         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
3234         assemblies, since aot_name is not a full path, causing us to load MS.NET 
3235         assemblies on windows.
3236
3237 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
3238
3239         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
3240         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
3241         * main.c: Use UTF-8 encoded command line instead of Windows default code
3242         page on Windows to support Unicode.
3243         * driver.c (DllMain): New function for mixed-mode assembly support.
3244         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
3245         export __stdcall functions without decoration.
3246
3247         Contributed under MIT/X11 license.
3248
3249 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3250
3251         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
3252         saving it very early.
3253
3254 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3255
3256         * mini.h, mini.c: Lots of code for accessing the old RGCTX
3257         deleted.  The only way to access the new RGCTX is via the
3258         trampline.
3259
3260         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
3261         vtable instead of the RGCTX to static methods.
3262
3263         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
3264         accessing the new RGCTX.
3265
3266         * generic-sharing.c: There is no separation between self, type
3267         arguments and other types in the RGCTX anymore.
3268
3269 2008-04-25  Jonathan Chambers <joncham@gmail.com>
3270
3271         * mini-amd64.c (add_general): Remove previous stack adjustment.
3272         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
3273         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
3274         for 32 bytes of stack space reserved for all calls.
3275         
3276         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
3277         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
3278         adjustment.
3279         
3280         Code contributed under MIT/X11 license.
3281
3282 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
3283
3284         * mini.c (mini_method_verify): Only verify non-inflated methods, check
3285         against the root definition, peeling out method and type instantiations.
3286         Cache verify success results, code that fails verification is still
3287         checked multiple times.
3288
3289 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
3290
3291         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
3292
3293 2008-04-23  Jonathan Chambers <joncham@gmail.com>
3294
3295         * mini-amd64.c (add_general): Always increment stack on Win64.
3296         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
3297         on Win64.
3298         
3299         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
3300         stack based argument handling on Win64.
3301         
3302         Code contributed under MIT/X11 license.
3303
3304 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
3305
3306         * Makefile.am (version.h): Add support for git-svn.
3307
3308 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
3309
3310         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
3311         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
3312         avoiding allocations and libc functions which might deadlock.
3313         
3314         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
3315         'no-gdb-backtrace' option is set.
3316
3317         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
3318
3319         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
3320
3321 2008-04-21  Martin Baulig  <martin@ximian.com>
3322
3323         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
3324         and `get_lmf_addr'; `notification_address' is no longer a pointer.
3325
3326 2008-04-21  Martin Baulig  <martin@ximian.com>
3327
3328         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
3329         `thread_vtable', `event_handler_ptr' and `event_handler'.
3330
3331 2008-04-21  Martin Baulig  <martin@ximian.com>
3332
3333         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
3334         allows delayed initialization of the `executable_code_buffer' when
3335         attaching.
3336
3337 2008-04-21  Martin Baulig  <martin@ximian.com>
3338
3339         * mini.h (mono_debugger_create_notification_function): Removed.
3340         * tramp-*.c (mono_debugger_create_notification_function): Removed.
3341
3342         * mdb-debug-info64.s
3343         (MONO_DEBUGGER__notification_function): Added this in the .text section.
3344
3345         * mdb-debug-info32.s
3346         (MONO_DEBUGGER__notification_function): Added this in the .text section.
3347
3348         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
3349         currently only works on x86 and x86_64, so don't create it on ppc.
3350
3351 2008-04-21  Martin Baulig  <martin@ximian.com>
3352
3353         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
3354
3355         * mini.c
3356         (mini_method_compile): In the fp elimination check, check
3357         `debug_options.mdb_optimizations' in addition to
3358         mono_debug_using_mono_debugger().       
3359
3360         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
3361         disable some JIT optimizations which are only disabled when
3362         running inside the debugger.
3363         Added `--help-debug' option to describe the debugging options.
3364         (parse_debug_options): New static function to parse the `--debug'
3365         options, so we can easily add more stuff in future.
3366
3367 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
3368
3369         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
3370         the method has no body.
3371
3372 2008-04-19  Jonathan Chambers <joncham@gmail.com>
3373
3374         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
3375         assembly is not allowed in MSVC 64-bit compiler. 
3376         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
3377         as we get floating point exceptions everywhere.
3378         
3379         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
3380         correctly align arguments for call to throw_exception.
3381         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
3382         
3383         Code contributed under MIT/X11 license.
3384
3385 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
3386
3387         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
3388
3389 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
3390
3391         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
3392
3393         * mini-amd64.c (NEW_INS): Set cil_code.
3394
3395         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
3396         from mini-amd64.c so all debugger related logic is in one place.
3397
3398         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
3399         later won't have a random ip assigned to them.
3400
3401 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
3402
3403         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
3404         the arch specific function initializes code_size.
3405         (mono_create_delegate_trampoline): Ditto.
3406
3407         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
3408         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
3409         platforms.
3410
3411         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
3412         running under the debugger.
3413
3414         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
3415         debugger.
3416
3417         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
3418         debugger. Also move the disabling of optimizations here from driver.c.
3419         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
3420         debugger.
3421
3422         * mini.h (MonoCompile): Add a few new flags.
3423
3424 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
3425
3426         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
3427         so the cil_code field of created MonoInst's is properly set.
3428         (mini_select_instructions): Ditto.
3429
3430         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
3431         (MONO_INST_NEW_CALL): Ditto.
3432
3433         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
3434         in many places so the ins->cil_code field is properly initialized.
3435
3436         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
3437         place.
3438
3439 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
3440
3441         * mini.c (mini_method_compile): Print a different message when compiling a 
3442         shared method.
3443         
3444         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
3445         > 1.
3446
3447 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3448
3449         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
3450         SSE2 instructions.
3451
3452         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
3453         
3454 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3455
3456         * mini.c (handle_stack_args): Make this return void since its return value was
3457         never used. Also set cfg->unverifiable for invalid IL instead of calling
3458         G_BREAKPOINT ().
3459
3460 2008-04-10  Mark Probst  <mark.probst@gmail.com>
3461
3462         * mini.c: Make sure "this" is live in catch clauses with type
3463         variables in shared generic code.
3464
3465 2008-04-08  Mark Probst  <mark.probst@gmail.com>
3466
3467         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
3468         generic_class_is_reference_type() to ensure the proper behaviour
3469         when sharing generic code and the type in question is a type
3470         argument.
3471
3472 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
3473
3474         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
3475         race conditions when printing thread dumps. Fixes #377738.
3476
3477 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
3478         
3479         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
3480         shows up when both MonoInst arguments can cause aliasig.
3481         There is likely no way in the current JIT to trigger this problem, but
3482         it showed up in the development of generics sharing, when in a new
3483         opcode both args of an OP_GROUP can be aliases (addresses of a local).
3484         When the generics sharing code will be committed, its tests will be
3485         valid also for this bug.
3486
3487 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
3488
3489         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
3490         PATCH_INFO_METHOD.
3491
3492         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
3493         NULL.
3494
3495 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
3496
3497         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
3498         use a more detailed exception message for InvalidCastException.
3499
3500         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
3501
3502         * driver.c (mono_main): Add --debug=casts option to turn on better 
3503         InvalidCastException message details.
3504
3505         * mini.c (mini_get_debug_options): New helper function to return the address of
3506         the debug_options variable.
3507
3508         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
3509         the jit_tls TLS variable.
3510
3511         * mini.c (mono_jit_tls): New TLS variable.
3512
3513         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
3514         option is used.
3515
3516 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
3517
3518         * mini.h: Removed verifer related stuff. This code was moved to verify.c
3519
3520         * mini.c: Removed verifer related stuff, code moved to verify.c.
3521
3522         * driver.c: Using code from verify.c instead of mini.c.
3523
3524 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
3525
3526         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
3527         longer valid.
3528
3529 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
3530
3531         * mini.c (check_for_method_verify): Enabling verification of
3532         corlib if mono_verify_all is set. Bugs in the verifier preventing that
3533         have been fixed.
3534
3535 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
3536
3537         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
3538         caller saved registers as well.
3539         
3540         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
3541         saved registers as well.
3542
3543 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
3544
3545         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
3546
3547         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
3548         code.
3549
3550 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
3551
3552         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
3553         to get_call_info.
3554         (get_call_info): Take a gsctx argument instead of 'cfg'.
3555
3556 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
3557
3558         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
3559         mono_verify_all is set.
3560
3561         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
3562
3563         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
3564
3565 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
3566
3567         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
3568         an exception.
3569
3570         * driver.c mini.c mini.h: Add a --verify-all development option to test the
3571         verifier and the code generated by the compiler.
3572
3573 2008-03-25  Mark Probst  <mark.probst@gmail.com>
3574
3575         * mini.c: Generic sharing of the non-nullable case of the box
3576         instruction.
3577
3578 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
3579
3580         * inssel.brg: Fix the build.
3581
3582         * iltests.il.in: Add a test for lconv.ovf.u8.un.
3583
3584 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
3585
3586         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
3587         Array:Address. Fixes #372410.
3588
3589         * iltests.il.in: New tests for readonly prefix.
3590
3591 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
3592
3593         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
3594         mini-trampolines.c.
3595
3596         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
3597         mini-exceptions.c.
3598
3599         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
3600         
3601         * mini.c (mono_decompose_op_imm): New helper function.
3602
3603         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
3604         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3605         return value.
3606
3607         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3608         mono_arch_output_basic_block. Fix warnings.
3609
3610         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
3611         for now.
3612
3613 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
3614
3615         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
3616         since the extra frame is now detected automatically inside the loop.
3617
3618         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
3619         opts which are now in mono_peephole_ins ().
3620         
3621         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
3622
3623         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
3624         frames and skip duplicate managed-to-native frames. Fixes #367665.
3625
3626         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3627         opts which are now in mono_peephole_ins ().
3628         (mono_arch_peephole_pass_2): Ditto.
3629
3630         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
3631
3632         * mini-codegen.c (mono_peephole_ins): New helper function containing the
3633         arch independent peephole optimizations.
3634
3635         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3636         opts which are now in mono_peephole_ins ().
3637
3638         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
3639         
3640         * mini-s390.c (mono_arch_output_basic_block): Fix build.
3641
3642         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
3643         pattern.
3644
3645         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
3646         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
3647         opcode. 
3648
3649 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
3650
3651         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
3652         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3653         return value.
3654
3655         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3656         mono_arch_output_basic_block. Fix warnings.
3657
3658 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3659
3660         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3661         conv.ovf.u.un.
3662
3663 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3664
3665         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3666         conv.ovf.u.un.
3667
3668         * iltests.il: Add new tests.
3669
3670 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
3671
3672         * mini.c: Removed Windows version macros.
3673
3674 2008-03-20  Mark Probst  <mark.probst@gmail.com>
3675
3676         * generic-sharing.c: Put reflection types in the extensible part
3677         of the runtime generic context.
3678
3679         * mini.c: Generic sharing of the GetTypeHandle special case of the
3680         ldtoken instruction.
3681
3682 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3683
3684         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
3685
3686         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
3687         
3688         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
3689         consistency with the other version on the linear IR branch.
3690
3691         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
3692
3693         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
3694
3695         * iltests.il.in: Add new tests.
3696
3697 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
3698
3699         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
3700
3701         * iltests.il.in: Add new tests.
3702
3703 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3704
3705         * mini.c: Two variables with the same name were declared in
3706         nesting contexts and one wasn't initialized.  Fixed.
3707
3708 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3709
3710         * mini.c: Generic sharing of the initobj instruction.
3711
3712 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
3713
3714         * mini.c: make the test to optimize ldtoken from typeof() more
3715         precise.
3716
3717 2008-03-18  Mark Probst  <mark.probst@gmail.com>
3718
3719         * mini.c: Generic sharing of the initobj instruction for reference
3720         types.
3721
3722 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
3723
3724         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
3725         the mono_breakpoint_clean_code() code to perform bound checks.
3726
3727 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
3728
3729         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
3730         mono_arch_patch_callsite() to include the start of the managed method
3731         to be able to perform bound checks.
3732
3733 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3734
3735         * mini.c: Generic sharing for the isinst instruction.
3736
3737 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3738
3739         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3740         inssel-long32-mips.brg: Added opcodes for doing indirect calls
3741         with the runtime generic context argument.
3742
3743         * mini.c: Share calls to several types of unsharable methods by
3744         putting the address of the method code in the runtime generic
3745         context and doing an indirect call.
3746
3747         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3748         to switches.
3749
3750 2008-03-16  Mark Probst  <mark.probst@gmail.com>
3751
3752         * generic-sharing.c: Change due to a change in the runtime genric
3753         context API.
3754
3755 2008-03-15  Martin Baulig  <martin@ximian.com>
3756
3757         * tramp-x86.c
3758         (mono_arch_nullify_class_init_trampoline): Add call to
3759         mono_breakpoint_clean_code() to make things work when running
3760         inside the debugger.
3761
3762         * tramp-amd64.c
3763         (mono_arch_nullify_class_init_trampoline): Add call to
3764         mono_breakpoint_clean_code() to make things work when running
3765         inside the debugger.
3766
3767 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3768
3769         * inssel-long.brg (reg): Fix 64 bit build.
3770
3771 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3772
3773         * mini.c, mini.h: Share static generic code by passing it an
3774         implicit argument pointing to the runtime generic context.
3775
3776         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3777         inssel-long32-mips.brg: New opcodes for calling shared static,
3778         which need to be passed the runtime generic context.
3779
3780         * mini-amd64.c, mini-x86.c: Save the runtime generic context
3781         argument on the stack in the prologue if needed.  New function for
3782         finding the runtime generic context argument from the registers
3783         saved by the trampoline.
3784
3785         * mini-amd64.h, mini-x86.h: Specify which register to use for the
3786         runtime generic context argument.
3787
3788         * tramp-amd64.c: Also restore the register used for the runtime
3789         generic context argument.
3790
3791         * mini-trampoline.c: Resolve shared static calls by consulting the
3792         runtime generic context via the new argument.
3793
3794         * generic-sharing.c: Add an argument to sharability-checking
3795         functions that specifies whether type variables should be treated
3796         as sharable type arguments.
3797
3798         * inssel-x86.brg: Removed a superfluous, buggy rule.
3799
3800         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3801         to switches.
3802
3803 2008-03-14  Martin Baulig  <martin@ximian.com>
3804
3805         * debug-debugger.c (main_thread_handler): Call
3806         mono_runtime_run_main() without sending any notifications.
3807
3808         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
3809
3810 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3811
3812         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
3813
3814 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3815
3816         * tramp-x86.c: Fixed register restore offsets in the trampoline
3817         code for ECX and EDX.
3818
3819 2008-03-12  Geoff Norton  <gnorton@novell.com>
3820
3821         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
3822         different ucontext_t implementations.
3823         * exceptions-arm.c: Use the above defines to get exceptions working on 
3824         iPhone (based on a patch by Luke Howard lukeh@padl.com)
3825         * mini-arm.c: Implement iPhone icache support (based on a patch by
3826         Luke Howard lukeh@padl.com)
3827
3828 2008-03-12  Mark Probst  <mark.probst@gmail.com>
3829
3830         * mini.c: Enable generic sharing of calls to non-static
3831         non-interface non-generic non-value-type methods.
3832
3833         * mini-trampolines.c: Resolve calls from shared generic code.
3834
3835 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
3836
3837         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
3838
3839         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
3840
3841 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
3842
3843         * mini.c: some fixes for the AOT compiler.
3844
3845 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3846
3847         * cpu-amd64.md: Add clob:1 to some float opcodes.
3848
3849 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
3850
3851         * mini.h: Added MiniVerifierMode enumeration.
3852
3853         * mini.c: Added mini_verifier_set_mode to control
3854         the usage of the new verifier.
3855
3856         * mini.c (mono_method): Integrated the new verifier.
3857
3858         * driver.c: Extended --security option with validil and
3859         verifiable options to activate the new verifier.
3860
3861 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3862
3863         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
3864         optimization to ctors taking 0 or 2 arguments too.
3865
3866         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
3867         a bit.
3868
3869         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
3870
3871         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
3872
3873 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
3874
3875         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
3876         non-aot case as well.
3877
3878         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
3879
3880         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
3881         changes.
3882
3883         * aot-compiler.c (encode_patch): Ditto.
3884
3885         * mini.h (G_MININT32): Fix the definition of this.
3886
3887 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
3888
3889         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
3890
3891         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
3892
3893 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3894
3895         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
3896         methods returning vtypes in registers.
3897         (mono_arch_allocate_vars): Ditto.
3898
3899         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
3900
3901         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
3902
3903         * generics.cs: Add a test from the linear IR branch.
3904
3905         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
3906
3907         * mini.c (inline_method): Cache failed inline attempts.
3908
3909 2008-03-04  Mark Probst  <mark.probst@gmail.com>
3910
3911         * mini.c: For shared methods of generic classes put the location
3912         of "this" into the MonoGenericJitInfo.
3913
3914         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
3915         register out of a MonoContext by register number.  Add the generic
3916         sharing context as an argument to mono_arch_find_this_argument().
3917
3918         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
3919         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
3920         for new arch function.
3921
3922         * mini-exception.c: Handle open exception clauses in shared
3923         generic code.
3924
3925         * mini-trampolines.c: Supply additional argument to
3926         mono_arch_find_this_argument().
3927
3928 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3929
3930         * Makefile.am (regtests): Run the bench.exe tests last.
3931
3932 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
3933
3934         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
3935         a bit.
3936
3937 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
3938
3939         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
3940         with MS.
3941
3942         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
3943         
3944         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
3945
3946         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
3947         whose class has no cctor.
3948
3949         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
3950
3951 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
3952
3953         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
3954         unverified.
3955
3956 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
3957
3958         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
3959         to be in sync with the code on the linear IR branch.
3960
3961         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
3962
3963         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
3964
3965 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
3966
3967         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
3968
3969         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
3970
3971         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
3972
3973         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
3974
3975         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
3976         
3977         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
3978         body.
3979
3980 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
3981
3982         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
3983         OP_LOADR4_MEMBASE emission.
3984
3985         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
3986         (mono_spillvar_offset_float): Ditto.
3987
3988         * mini-mips.c (mono_arch_emit_prolog): Ditto.
3989
3990         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
3991         emission.
3992
3993         * basic-long.cs: Add regression tests for them.
3994
3995         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
3996         use.
3997         (mono_arch_allocate_vars): Fix representation of single-precision float
3998         argument.
3999         (mono_arch_output_basic_block): Ditto.
4000
4001         * inssel-mips.brg: Ditto, remove duplicate items.
4002
4003         * mini-mips.c (emit_load_volatile_arguments): New function to handle
4004         arguments of tail calls as on other platforms.
4005         (mono_arch_output_basic_block): Handle tail calls.
4006
4007         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
4008         register.
4009
4010         * objects.cs (test_5_pass_static_struct): Add test for it.
4011
4012         Contributed under MIT/X11 license.
4013
4014 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
4015
4016         * Makefile.am: Use gmcs for compiling the regression tests.
4017
4018         * *.2.cs *.2.il: Rename to *.cs and *.il.
4019
4020 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
4021
4022         * regalloc.h: Make the vassign array smaller.
4023
4024         * mini.c (mini_method_compile): Remove an unused field in cfg.
4025
4026         * mini-codegen.c: Add a bunch of micro optimizations.
4027
4028 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
4029
4030         * regalloc.h: Remove some unused fields.
4031
4032 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
4033
4034         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
4035
4036         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
4037
4038 2008-02-22  Mark Probst  <mark.probst@gmail.com>
4039
4040         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
4041
4042         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
4043         trampoline: Fetch an entry from the runtime generic context.  If
4044         it's NULL, jump to the actual trampoline to fill the runtime
4045         generic context.  Otherwise, return it.
4046
4047         * mini.c: Call the lazy fetch trampoline to get entries out of the
4048         runtime generic context.
4049
4050         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
4051         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
4052         tramp-sparc.c: Stubs for the lazy fetch trampoline.
4053
4054 2008-02-21  Mark Probst  <mark.probst@gmail.com>
4055
4056         * mini.c: Fetch data out of the extensible part of the runtime
4057         generic context instead of calling a helper function.
4058
4059         * generic-sharing.c: Some functions moved into
4060         metadata/generic-sharing.c.  Helper function for fetching other
4061         types now checks and asserts against extensible rgctx (just for
4062         debugging purposes - the helper function isn't called anymore
4063         unless for debugging).
4064
4065 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
4066
4067         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
4068         for tail calls up to the point that the tests in iltests.exe run. Also add a
4069         dummy CKFINITE implementation.
4070         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
4071         needed for trampoline LMF frames.
4072
4073         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
4074         trampoline LMF frames.
4075
4076 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
4077
4078         * mini.c (inline_method): clean any pending loader error when inlining fail.
4079         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
4080
4081 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
4082
4083         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
4084
4085         * aot-runtime.c (decode_patch_info): Ditto.
4086
4087         * mini.c (mono_resolve_patch_target): Ditto.
4088         
4089         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
4090         icall wrappers.
4091
4092         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
4093         
4094         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
4095         if it references an icall address.
4096
4097 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
4098
4099         * cpu-s390x.md: Remove some more unused opcodes.
4100         
4101         * cpu-s390x.md: Remove some unused opcodes.
4102
4103         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
4104         mono_op_imm_to_op ().
4105
4106         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
4107         instead of a switch statement.
4108         
4109         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
4110         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
4111
4112         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
4113         
4114         * mini-codegen.c: Remove unused mono_regstate2_... functions.
4115
4116         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
4117         -1.
4118
4119 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
4120
4121         * driver.c (mono_main): Improve error reporting when an assembly cannot be
4122         opened. Fixes #362607.
4123
4124         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
4125
4126         * iltests.il.in: Add a test for static methods in interfaces.
4127
4128 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
4129
4130         * genmdesc.c (build_table): Fix a crash on older glib versions.
4131
4132         * cpu-sparc.md: Remove some unused opcodes.
4133         
4134         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
4135         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
4136
4137         * cpu-amd64.md: Remove some unused opcodes.
4138
4139         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
4140         like the other opcodes.
4141
4142 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
4143
4144         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
4145
4146         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
4147
4148         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
4149         variables 'cfg' instead of 'm' for consistency.
4150
4151         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
4152
4153         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
4154         argument holding the vtype return address, to avoid the ambigious use of
4155         cfg->ret for this purpose.
4156
4157         * mini.c (NEW_RETLOADA): Use vret_addr if set.
4158
4159         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
4160         
4161         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
4162         new mono_print_ins () function which only takes one argument.
4163
4164 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
4165
4166         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
4167         macro arguments.
4168
4169 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
4170
4171         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
4172
4173         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
4174
4175         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
4176         opcodes and other small changes.
4177
4178         * mini-ops.h: Add some new opcodes from the linear IR branch.
4179
4180         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
4181
4182         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
4183         opcodes, use the REG_MEMBASE opcodes instead.
4184         
4185         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
4186         opcodes, use the REG_MEMBASE opcodes instead.
4187         
4188         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
4189         linear IR branch.
4190
4191         * mini.c (mono_op_imm_to_op): New helper function.
4192
4193         * mini-ops.h: Add some opcodes from linear IR branch.
4194
4195 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
4196
4197         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
4198         <tsv@solvo.ru>.
4199
4200 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
4201
4202         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
4203         OP_ICONV_TO_R4/R8.
4204
4205         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
4206
4207 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
4208
4209         * aot-compiler.c (emit_method_code): Add an assert.
4210
4211         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
4212         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
4213         methods.
4214
4215 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
4216
4217         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
4218         some load/store opcodes so they are consistent. 
4219         (mono_arch_emit_prolog): Simplify some code.
4220
4221         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
4222
4223         * objects.cs: Add tests for large argument offsets on ARM.
4224
4225         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
4226         stack offsets. Fixes #359651.
4227
4228         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
4229
4230         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
4231
4232         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
4233
4234         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
4235
4236         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
4237
4238         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
4239         rid of CEE_CONV_R_UN.
4240
4241         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
4242
4243 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
4244
4245         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
4246
4247         * mini.c (mono_normalize_opcodes): Add some more opcodes.
4248
4249         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
4250
4251         * cpu-amd64.md: Remove some unused opcodes.
4252
4253         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
4254
4255         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
4256
4257         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
4258         arch specific functions for its parts. Call the peephole pass after local
4259         regalloc so the prolog can compute a more accurate max_offset.
4260         
4261         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
4262         the corresponding OP_I/OP_L opcodes.
4263
4264         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
4265
4266         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
4267
4268 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4269
4270         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
4271         as they are handled in mini.c.
4272
4273         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
4274         
4275         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
4276         case since it is handled in mini.c.
4277
4278         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
4279
4280         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
4281
4282         * *.c: Use the new opcodes in the IR and back end code.
4283
4284         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
4285
4286         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
4287
4288 2008-02-06  Mark Probst  <mark.probst@gmail.com>
4289
4290         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
4291         an assert because it has a race condition.
4292
4293 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4294
4295         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
4296
4297         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
4298
4299         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
4300
4301         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
4302         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
4303
4304 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
4305
4306         * cpu-amd64.md (move): Correct the maximum size of move.
4307
4308 2008-02-05  Mark Probst  <mark.probst@gmail.com>
4309
4310         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
4311         the generic class init trampoline to return quickly if the class
4312         is already inited.
4313
4314 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
4315
4316         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
4317         issues where an 32 bit callsite cannot be patched by a 64 bit address.
4318
4319 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
4320
4321         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
4322         branch.
4323
4324 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
4325
4326         * objects.cs: Add some soft-float tests.
4327
4328         * mini.c: Fix a couple more soft-float issues.
4329
4330         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
4331
4332         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
4333         avoid a REX prefix.
4334
4335 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
4336
4337         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
4338         exception happens while compiling a virtual method.
4339
4340 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
4341
4342         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
4343         
4344         * mini-sparc.c: Fix build.
4345
4346         * mini-sparc.c (get_call_info): Add support for generic sharing.
4347
4348         * mini-exceptions.c: Add a FIXME.
4349
4350 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
4351
4352         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
4353         altstack handling code.
4354
4355         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
4356         
4357         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
4358
4359         * mini-s390.c: Add support for generic sharing.
4360
4361         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
4362         Fix CAS on s390.
4363         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4364
4365         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
4366
4367         * mini-s390x.c: Add support for generic sharing.
4368         
4369         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
4370         Fix CAS on ia64.
4371         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4372
4373         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
4374         can be used since it takes a 16 bit signed immediate.
4375
4376         * inssel-s390x.brg: Fix OP_SETRET.
4377
4378         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
4379
4380         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
4381
4382         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
4383
4384         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
4385
4386         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
4387         in one place.
4388
4389         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
4390         stuff.
4391
4392         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
4393         of the unused mono_arch_patch_delegate_trampoline stuff.
4394
4395 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
4396
4397         * basic-long.cs: Move the fp related tests to basic-float.cs.
4398
4399         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
4400
4401         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
4402
4403         * basic-calls.cs: Add a test for proper float argument passing.
4404
4405         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
4406         if the context corresponds to an exception received through a signal.
4407
4408         * exceptions.cs: Add a test for nullref handling at the start of a try
4409         clause.
4410
4411         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
4412
4413         * jit-icalls.c (mono_break): New JIT icall.
4414
4415         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
4416
4417         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
4418
4419 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
4420
4421         * cpu-*.md: Get rid of unused opcodes.
4422
4423         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
4424
4425         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
4426         by all platforms.
4427
4428         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
4429         define.
4430
4431         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
4432         the arch independent trampoline code in mini-trampolines.c.
4433
4434         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
4435
4436         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
4437
4438         * mini-s390.h: Remove an unused define.
4439         
4440         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
4441         the arch independent trampoline code in mini-trampolines.c.
4442
4443         * mini-arm.c (mono_arch_emit_prolog): Fix build.
4444
4445 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
4446
4447         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
4448
4449         * mini-s390.c (mono_arch_emit_prolog): Fix build.
4450
4451         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
4452
4453         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
4454
4455         * cpu-amd64.md: Use smaller sizes for int opcodes.
4456
4457         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
4458
4459         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
4460         objects.cs.
4461
4462         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
4463         debugging.
4464
4465         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
4466         instead of though a pointer to save an indirection when accessing elements of
4467         the array.
4468
4469         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
4470         some typos.
4471         (NOT_IMPLEMENTED): New helper macro.
4472         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
4473         of a bb.
4474
4475         * *.c: Use the new helper macro.
4476
4477 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
4478
4479         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
4480
4481 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
4482
4483         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
4484         stack slots.
4485
4486 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
4487
4488         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
4489         profiling is enabled.
4490         
4491         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
4492         the end.
4493         (mono_arch_emit_prolog): Add more first bblock optimizations.
4494
4495         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
4496         in order if possible.
4497         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
4498         bblock, since the arguments are still in their original registers.
4499
4500         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
4501
4502 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
4503
4504         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
4505         as well.
4506
4507         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
4508         offset 0.
4509
4510         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
4511
4512         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
4513         process async exceptions received while in unmanaged code.
4514
4515         * mini.c (mini_init): Install a callback with the runtime which will be called
4516         when a thread receives an async exception while in unmanaged code.
4517
4518         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
4519
4520         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
4521
4522 2008-01-16  Wade Berrier  <wberrier@novell.com>
4523
4524         * cpu-g4.md:
4525         * cpu-arm.md:
4526         * cpu-s390x.md:
4527         fix build
4528
4529 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
4530
4531         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
4532         compilation with sun cc.
4533
4534         * cpu-*.md: Fix the build.
4535
4536         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
4537
4538         * mini-amd64.h: Add some comments to the MonoLMF structure.
4539
4540         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
4541         
4542         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
4543         in the LMF structure if possible. This saves two instructions in the
4544         managed->native wrappers.
4545
4546         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
4547
4548 2008-01-16  Mark Probst  <mark.probst@gmail.com>
4549
4550         * generic-sharing.c: New type argument lookup code which uses the
4551         runtime generic context template.
4552
4553 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
4554
4555         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
4556
4557         * mini-arm.c (add_general): Fix arm eabi parameter passing.
4558         (mono_arch_output_basic_block): Fix localloc implementation.
4559
4560         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
4561
4562         * mini-ia64.c (peephole_pass): Fix ia64 build.
4563
4564         * mini-amd64.c (peephole_pass): Fix a warning.
4565         
4566         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
4567         at a constant offset from sp/fp.
4568
4569         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
4570         instead of obtaining it from *lmf in the managed method case.
4571
4572 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
4573
4574         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
4575
4576 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
4577
4578         * mini.h (MonoInstList): New type.
4579         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
4580         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
4581         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
4582         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
4583         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
4584         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
4585         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
4586         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
4587         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
4588         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
4589         MONO_INST_LIST_FOR_EACH_ENTRY,
4590         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
4591         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
4592         mono_inst_list_first, mono_inst_list_last,
4593         mono_inst_list_next, mono_inst_list_prev): New instruction
4594         list handling interfaces.
4595         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
4596         list head 'ins_list'.
4597         (MonoInst): Replace next pointer with list head 'node'.
4598         (MonoCallInst): Make 'out_args' a MonoInstList.
4599         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
4600         (MonoCompile): Delete reverse_inst_list and
4601         reverse_inst_list_len.
4602         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
4603         mono_arch_lowering_pass, mono_arch_local_regalloc,
4604         mono_arch_output_basic_block, mono_arch_emit_prolog):
4605         Convert to new instruction lists.
4606         (insert_after_ins): Delete.
4607         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
4608         instruction lists.
4609         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
4610         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
4611         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
4612         mono_emulate_opcode, mono_emit_load_got_addr,
4613         inline_method, mono_method_to_ir, mono_print_bb_code,
4614         print_dfn, decompose_pass, nullify_basic_block,
4615         replace_out_block_in_code, remove_block_if_useless,
4616         merge_basic_blocks, move_basic_block_to_end,
4617         try_unsigned_compare, optimize_branches, mono_print_code,
4618         mini_select_instructions, remove_critical_edges): Likewise.
4619         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
4620         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
4621         mono_arch_output_basic_block, mono_arch_emit_prolog):
4622         Likewise.
4623         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
4624         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4625         mono_arch_output_basic_block): Likewise.
4626         (inst_list_prepend, insert_after_ins): Delete.
4627         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
4628         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
4629         instruction lists.
4630         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
4631         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
4632         mono_arch_emit_prolog): Likewise.
4633         * cfold.c (mono_constant_fold): Likewise.
4634         * liveness.c (visit_bb, mono_analyze_liveness,
4635         optimize_initlocals): Likewise.
4636         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
4637         * graph.c (mono_draw_code_cfg): Likewise.
4638         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
4639         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
4640         mono_ssa_cprop): Likewise.
4641         * abcremoval (get_relations_from_previous_bb, process_block):
4642         Likewise.
4643         * local-propagation (mono_cprop_invalidate_values,
4644         mono_local_cprop_bb): Likewise.
4645         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
4646         peephole_pass, mono_arch_output_basic_block,
4647         mono_arch_emit_prolog): Likewise.
4648         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
4649         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4650         mono_arch_emit_prolog): Likewise.
4651         (insert_after_ins): Delete.
4652         * aliasing.c (print_code_with_aliasing_information,
4653         mono_build_aliasing_information, mono_aliasing_deadce):
4654         Convert to new instruction lists.
4655         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
4656         peephole_pass, NEW_INS, mono_arch_lowering_pass,
4657         mono_arch_local_regalloc, mono_arch_output_basic_block):
4658         Likewise.
4659         (insert_after_ins): Delete.
4660         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
4661         peephole_pass, mono_arch_output_basic_block): Convert to
4662         new instruction lists.
4663         * mini-codegen (InstList, inst_list_prepend,
4664         insert_after_ins): Delete.
4665         (insert_before_ins, get_register_force_spilling,
4666         get_register_spilling, free_up_ireg, free_up_reg,
4667         create_copy_ins, create_spilled_store, alloc_int_reg,
4668         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
4669         to new instruction lists.
4670         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
4671         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4672         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
4673         (insert_after_ins): Delete.
4674         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
4675         mono_arch_local_regalloc, mono_arch_output_basic_block,
4676         mono_arch_call_opcode): Convert to new instruction lists.
4677         (insert_after_ins): Delete.
4678         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
4679         peephole_pass, mono_arch_output_basic_block,
4680         mono_arch_emit_prolog): Convert to new instruction lists.
4681
4682 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
4683
4684         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
4685
4686         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
4687         Fixes #353182.
4688
4689         * Makefile.am (version.h): Make this work with non-bash shells.
4690
4691 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
4692
4693         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
4694
4695 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
4696
4697         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
4698         the InitializeArray optimization.
4699
4700 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
4701
4702         * mini.c driver.c: Don't include os/gc_wrapper.h.
4703
4704 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
4705
4706         * mini.c (print_jit_stats): Print GC statistics if available.
4707
4708 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
4709
4710         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
4711
4712 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
4713
4714         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
4715
4716 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
4717
4718         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
4719         
4720         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
4721
4722         * driver.c (mono_main): Ditto.
4723
4724 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
4725
4726         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
4727
4728         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
4729         in the vtable can't be encoded.
4730         (compile_method): Ditto.
4731
4732 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
4733
4734         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
4735         defined.
4736
4737         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
4738         lmf->rbp.
4739
4740         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
4741         the top LMF entry belongs to the current method.
4742
4743         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
4744
4745 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
4746
4747         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
4748         
4749         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
4750
4751         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
4752
4753         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
4754
4755         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
4756
4757         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
4758         implementation.
4759
4760         * basic-float.cs: Add an ulong->double cast test.
4761
4762 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
4763
4764         * mini.c (mono_method_to_ir): Fix a warning.
4765
4766 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
4767
4768         * mini-ops.h: Add OP_SWITCH.
4769
4770         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
4771         CEE_SWITCH in back-end code, use OP_SWITCH instead.
4772
4773 2007-12-11  Geoff Norton  <gnorton@novell.com>
4774
4775         * mini-s390x.c: Minor change to the MAX() define to allow
4776         it to compile with other gcc versions.
4777
4778 2007-12-11  Geoff Norton  <gnorton@novell.com>
4779
4780         * cpu-s390x.md:
4781         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
4782
4783 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4784
4785         exceptions-arm.c (mono_arch_get_restore_context): Restore
4786         the frame pointer.
4787
4788         exceptions-arm.c (throw_exception): Save the frame pointer.
4789         This is a partial fix for #323747. Only the client side is
4790         fixed.
4791
4792 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4793
4794         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
4795         was using an unrelated variable to log the class which
4796         needed the cctor to be called. This was crashing on arm.
4797
4798 2007-12-09  Robert Jordan  <robertj@gmx.net>
4799
4800         * mini-x86.c (mono_arch_emit_epilog):
4801         Consider all kinds of 64-bit types. Fixes #323114.
4802
4803 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
4804
4805         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
4806
4807 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4808
4809         * mini-amd64.c (peephole_pass): Add a missing instruction check.
4810
4811 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4812
4813         * mini.c: run type ctor before allocating an object, not only
4814         when running it's constructor method (fixes at least part of bug #342507).
4815
4816 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4817         
4818         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
4819         
4820         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
4821         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
4822         function.
4823
4824         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
4825         mono_generic_class_init_trampoline () the same as it is done with the other
4826         trampolines.
4827
4828         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
4829         aot-runtime.c aot-compiler.c: Implement AOT support.    
4830
4831 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4832
4833         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
4834         build for archs which don't have the vtable trampoline defined
4835         yet.
4836
4837 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4838
4839         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
4840
4841         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
4842
4843         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
4844
4845         * tramp-<ARCH>.c: Use the new helper function.
4846
4847 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4848
4849         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
4850         trampoline call, which takes a vtable argument.
4851
4852         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
4853         OP_TRAMPCALL_VTABLEs like other calls.
4854
4855         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
4856         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
4857         call.  Implemented a support function which fetches the vtable
4858         from a register set.
4859
4860         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
4861         Implemented a generic class init trampoline, using the
4862         OP_TRAMPCALL_VTABLE opcode.
4863
4864         * mini.c: Implemented static field access when sharing generic
4865         code.  This implies initing the class using the new
4866         OP_TRAMPCALL_VTABLE call.
4867
4868 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4869
4870         * mini.c: Don't compile methods with sharing enabled if their
4871         classes are disabled for sharing.
4872
4873 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4874
4875         * inssel.brg: Add a missing sign extension to the GETCHR and array access
4876         opcodes. Fixes #346563.
4877
4878         * objects.cs: Add a new test.
4879
4880         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
4881
4882         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
4883         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
4884
4885 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4886
4887         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
4888
4889 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
4890
4891         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
4892         code stream.
4893
4894 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
4895
4896         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
4897
4898         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
4899         optimization in the AOT case.
4900         
4901 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
4902
4903         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
4904         
4905         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
4906
4907         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
4908
4909         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
4910
4911         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
4912         is created by the inlined delegate ctor.
4913
4914         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
4915
4916         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
4917
4918 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
4919
4920         * cpu-x86.md: Fix the length of ckfinite.
4921
4922 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
4923
4924         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
4925         
4926         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
4927         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
4928
4929         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
4930
4931         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
4932         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
4933
4934 2007-11-28  Martin Baulig  <martin@ximian.com>
4935
4936         * mini-x86.c
4937         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
4938         after creating the trampoline.
4939
4940 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
4941
4942         * aot-runtime.c (load_aot_module): Check runtime version if needed.
4943
4944         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
4945         the same version.
4946
4947         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
4948         instead of the calling method to help AOT.
4949
4950         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
4951
4952 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
4953
4954         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
4955         is defined.
4956
4957 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
4958
4959         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
4960         
4961         * aot-compiler.c (compile_method): Correct check for generic method definitions.
4962         (encode_method_ref): No need to handle generic method definitions specially.
4963
4964         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4965
4966         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
4967         decode_klass_info.
4968
4969         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
4970         encode_klass_info.
4971         (compile_method): Enable generic sharing.
4972
4973 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
4974
4975         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
4976         (mini_method_compile): Add preliminary support for AOTing shared generic code.
4977
4978         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
4979         generic code.
4980
4981         * mini-trampolines.c: Fix a warning.
4982
4983         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
4984         NEW_PCONST.
4985         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
4986         (generic_class_is_reference_type): Remove unused function.
4987
4988         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
4989         in the generic vtable trampoline case.
4990
4991         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
4992         
4993         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
4994         return an AOT method based on a vtable slot.
4995
4996         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
4997
4998         * mini.c (mini_get_vtable_trampoline): Export this.
4999
5000 2007-11-22  Martin Baulig  <martin@ximian.com>
5001
5002         * debug-debugger.h
5003         (MonoDebuggerInfo): Move `debugger_version' up.
5004
5005 2007-11-22  Martin Baulig  <martin@ximian.com>
5006
5007         * mini-amd64.c
5008         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
5009
5010         * mini-trampolines.c
5011         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
5012         after compiling the method.
5013
5014 2007-11-20  Martin Baulig  <martin@ximian.com>
5015
5016         * debug-mini.c
5017         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
5018         (mono_debugger_remove_breakpoint): Likewise.
5019         (mono_debugger_check_breakpoints): Likewise.
5020
5021         * debug-debugger.c: Implement the new breakpoint interface here.
5022
5023 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
5024
5025         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
5026         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
5027
5028         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
5029
5030 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
5031
5032         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
5033
5034         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
5035         mini.c.
5036
5037         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
5038         mini.c.
5039
5040         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
5041         returning a vtype in a register.
5042
5043         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
5044         here from the arch specific code.
5045
5046         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
5047         mini.c.
5048
5049         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
5050         (mono_arch_emit_prolog): Increment maximum prolog size.
5051
5052         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
5053         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
5054
5055         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
5056         MonoGenericSharingContext.
5057
5058         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
5059         MonoGenericSharingContext. Allocate memory from the cfg mempool.
5060
5061 2007-11-15  Mark Probst  <mark.probst@gmail.com>
5062
5063         * mini.c, mini.h, generic-sharing.c: Functions for producing code
5064         which extract fields out of the runtime generic context.  Full
5065         sharing of the NEWARR opcode.
5066
5067 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
5068
5069         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
5070         --enable-minimal=ssa.
5071
5072 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
5073
5074         * mini-trampolines.c (mono_delegate_trampoline): Update after 
5075         mono_marshal_get_delegate_invoke () signature change.
5076
5077 2007-11-13  Mark Probst  <mark.probst@gmail.com>
5078
5079         * mini.c: Removed the shared context in favor of the generic
5080         sharing context.  Allocate the MonoJitInfo structure with room for
5081         the generic sharing context if it's needed.
5082
5083         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
5084         domain-internals.h now.
5085
5086         * mini-x86.c: Pass the generic sharing context to get_call_info ().
5087
5088         * generic-sharing.c: Several changes for working without a shared
5089         context and instead operating on open types instead.
5090
5091 2007-11-12  David S. Miller  <davem@davemloft.net>
5092
5093        * inssel-sparc.brg: Fix double instruction emit.
5094
5095 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
5096
5097         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
5098         Get/Set/Address methods.
5099         
5100         * mini.c debug-debugger.c mini-trampolines.c: Update after 
5101         mono_marshal_get_delegate_invoke signature change.
5102
5103 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5104
5105         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
5106         This can happens with dynamic methods. Fixes the other bug in #322722.
5107
5108 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5109
5110         * tramp-arm.c (mono_arch_patch_callsite): Support patching
5111         BX call sequence.
5112
5113         * mini-arm.c (arm_patch): Implement patching of BX call
5114         sequence. Fixes one of the bugs in #322722.
5115
5116 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
5117
5118        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
5119        under Linux.  We only need to flush every 32-byte cache line.    
5120
5121 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
5122
5123         * mini.c:
5124         move_basic_block_to_end: Add branches when needed, eventually creating
5125         a new BB.
5126         optimize_branches: added a parameter that tells if it's ok to create
5127         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
5128         and avoid calling move_basic_block_to_end when it's not ok.
5129         Fixes bug 318677.
5130
5131 2007-11-07  Mark Probst  <mark.probst@gmail.com>
5132
5133         * mini.c: Abort inlining call to InitializeArray if something
5134         looks wrong.  Let the icall handle it, which now has proper safety
5135         checks.
5136
5137 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5138
5139         * mini.c (mono_spill_call): add support for soft-float.
5140
5141         * mini.c (mono_method_to_ir): add support for soft-float
5142         to inlined functions that return float.
5143
5144         * mini.c (mono_method_to_ir): add support for soft-float
5145         to cee_stsfld opcode on float fields.
5146
5147 2007-11-05  Geoff Norton  <gnorton@novell.com>
5148
5149         * mini-x86.h: Fix the structure access for X86 Leopard.
5150
5151
5152 2007-11-05  Martin Baulig  <martin@ximian.com>
5153
5154         * mini-trampolines.c
5155         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
5156         after compiling the method to notify the debugger.
5157
5158 2007-11-05  Martin Baulig  <martin@ximian.com>
5159
5160         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
5161
5162 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
5163
5164         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
5165         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
5166
5167 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
5168
5169         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
5170         native-to-managed wrappers.
5171         
5172 2007-11-01  Geoff Norton  <gnorton@novell.com>
5173
5174         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
5175         members.
5176
5177 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5178
5179         * mini.c, mini-x86.c: when getting back from unmanaged code
5180         to managed via a marshaled delegate we also need to set the
5181         right domain.
5182
5183 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5184
5185         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
5186         for amd64.
5187
5188 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
5189
5190         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
5191         let the debugger or other external agents to tell the JIT when
5192         a sw breakpoint has been inserted in the code that the JIT needs
5193         to be able to inspect.
5194
5195 2007-10-31  Martin Baulig  <martin@ximian.com>
5196
5197         * debug-debugger.h
5198         (MonoDebuggerInfo): Remove `runtime_class_init'.
5199
5200 2007-10-30  Martin Baulig  <martin@ximian.com>
5201
5202         * debug-mini.h
5203         (mono_debugger_thread_created): Added `MonoThread *' argument.
5204         (mono_debugger_extended_notification): New public method.
5205         (mono_debugger_trampoline_compiled): New public method.
5206
5207         * debug-mini.c
5208         (MonoDebuggerThreadInfo): Added `thread' and
5209         `extended_notifications' fields.
5210
5211         * debug-debugger.c
5212         (debugger_executable_code_buffer): New static variable.
5213
5214         * debug-debugger.h
5215         (MonoDebuggerInfo): Added `executable_code_buffer',
5216         `executable_code_buffer_size', `breakpoint_info_area',
5217         `breakpoint_table' and `breakpoint_table_size'.
5218
5219 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
5220
5221         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
5222         that IP  either is an unused value or the vtable pointer. IMT 
5223         calls use vtable + offset now. Reduced by almost half the size
5224         of IMT entries.
5225
5226 2007-10-26  Jonathan Chambers <joncham@gmail.com>
5227
5228         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
5229         defines to access param registers. Replace long usage with
5230         gsize as sizeof(long) != sizeof(void*) on Win64.
5231
5232         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
5233         on Win64. Fix intrinsic, use _AddressOfReturnAddress
5234         instead of non-existant _GetAddressOfReturnAddress.
5235
5236         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
5237         param registers. Save/restore %rdi and %rsi in MonoLMF.
5238
5239         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
5240         param registers. Modify (throw_exception) signature to take 
5241         %rdi and %rsi on Win64. 
5242
5243         Code is contributed under MIT/X11 license.
5244
5245 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5246
5247         * helpers.c: unlink debugging output files.
5248
5249 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
5250
5251         * mini.c: Move mono_create_ftnptr () to object.c.
5252
5253 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5254
5255         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
5256         optional. This function can now be used to disassemble code generated
5257         outside the JIT such as trampolines and IMT thunks.
5258
5259         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
5260
5261         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
5262         vtable pointer from a ldr instruction.
5263
5264         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
5265         new IMT call sequence.
5266
5267         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
5268         call sequence for interface invocations.
5269
5270         * mini-arm.c (mono_arch_emit_imt_argument): added, required
5271         for imt support. This function is empty since IMT on ARM requires no
5272         special handling on the IR side.
5273
5274         * mini-arm.c (mono_arch_find_imt_method): added, required for
5275         imt support.
5276
5277         * mini-arm.c (mono_arch_find_this_argument): added, required
5278         for imt support.
5279
5280         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
5281         a ldr instruction to load a value stored in the code stream.
5282
5283         * mini-arm.c (mono_arch_build_imt_thunk):added, required
5284         for imt support.
5285
5286
5287 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
5288
5289         * mini.c (mini_init): Install the jump trampoline callback.
5290
5291 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5292
5293         * mini-trampolines.c: handle synchronized methods with the common
5294         vtable trampoline (bug #335601).
5295
5296 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
5297
5298         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
5299
5300         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
5301         64 bit platforms.
5302
5303         * mini-ia64.h mini-ia64.c: Add support for IMT.
5304
5305         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
5306         prolog. Fixes #331958.
5307
5308 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
5309
5310         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
5311
5312 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5313
5314         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
5315         trampoline.
5316
5317 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5318
5319         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
5320         trampoline.
5321
5322 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
5323
5324         * mini-x86.c, mini-x86.h: x86 support for the common vtable
5325         trampoline.
5326
5327 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
5328
5329         * mini-trampolines.c: changed the magic rampoline to understand
5330         the common vtable trampoline method: the method to invoke is
5331         determined by the vtable displacement of the call.
5332
5333 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5334
5335         * mini.c, mini.h: register the common vtable trampoline if the
5336         architecture supports it.
5337
5338 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5339
5340         * cpu-amd64.md: use the correct max length for tls_get.
5341
5342 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
5343
5344         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
5345         CEE_STELEM_ANY. Fixes #333696.
5346
5347 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5348
5349         * exceptions-x86.c: provide more graceful handling of the case where
5350         we followed a bogus function pointer from managed code (bug #332866).
5351
5352 2007-10-11  Mark Probst  <mark.probst@gmail.com>
5353
5354         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
5355         replaces the generic_shared flag and will carry more information
5356         in the future.
5357
5358         * generic-sharing.c: Added mini_type_stack_size() which allows
5359         allows open types if given a generic sharing context.
5360         mini_get_basic_type_from_generic() takes a
5361         MonoGenericSharingContext* instead of a MonoCompile* now.
5362
5363         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
5364         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
5365         mini-sparc.c, mini-x86.c: Trivial changes required by the two
5366         changes above.  Just passing arguments through to the right
5367         places.
5368
5369 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5370
5371         * mini-arm.c: unify the call emission to emit_code_seq().
5372
5373 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
5374
5375         * tramp-arm.c: reduced the trampoline size.
5376
5377 2007-10-10  Mark Probst  <mark.probst@gmail.com>
5378
5379         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
5380         variable handling out of arch-specific code.
5381
5382 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
5383
5384         * mini-arm.c: implemented fast delegate dispatch.
5385
5386 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
5387
5388         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
5389         that fp elimination is turned off if the space required by locals is too
5390         big. Fixes #331958.
5391
5392 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5393
5394         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
5395         ARM to the new style trampoline.
5396
5397 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
5398
5399         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
5400
5401         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
5402
5403 2007-10-09  Martin Baulig  <martin@ximian.com>
5404
5405         * debug-debugger.h
5406         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
5407         `field_info_offset_offset'.     
5408
5409 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
5410
5411         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
5412         removed more internal usage of the r11 register and made it available
5413         to the register allocator.
5414
5415 2007-10-08  Mark Probst  <mark.probst@gmail.com>
5416
5417         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
5418         when sharing generics and treat type variables as references.
5419
5420 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5421
5422         * mini-ppc.c: started removing the internal uses of register r11
5423         to eventually allow the register allocator to manage it as an
5424         additional available register.
5425
5426 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5427
5428         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
5429
5430 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
5431
5432         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
5433         specific trampolines as they are not performance critical as a jump
5434         target (maybe align as before only for AOT code?). This saves about
5435         200 KB of native code on x86 for monodevelop startup.
5436
5437 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
5438
5439         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
5440         monodevelop startup.
5441
5442 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
5443
5444         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
5445
5446         * mini-sparc.h mini-sparc.c: Implement IMT support.
5447
5448         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
5449         its smaller and doesn't clobber sparc_g1.
5450
5451         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
5452
5453 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
5454
5455         * mini-ppc.c: optimized the size of the IMT thunks a bit.
5456
5457 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5458
5459         * mini-ppc.c: implemented fast delegate invocation.
5460
5461 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
5462
5463         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
5464
5465 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5466
5467         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
5468         code to the new style trampoline in preparation for IMT support.
5469
5470 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
5471
5472         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
5473         systems already. This also reduces the specific trampiline sizes and
5474         prepares for the use of r12 as the IMT identifier register.
5475
5476 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5477
5478         * mini-mips.h: endianess fix (simplified from a patch by
5479         Thomas Kunze <thommy@tabao.de>, bug #323737).
5480
5481 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5482
5483         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
5484         to access ucontext fields and enable netbsd support
5485         (partially from Magnus Henoch <mange@freemail.hu>).
5486
5487 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5488
5489         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
5490         use the preprocessor from the CPP env var if it is set.
5491
5492 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5493
5494         * mini-trampolines.c: fixed an assertion and moved it earlier in the
5495         code, before interface_offset gets used.
5496
5497 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
5498
5499         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
5500         mono_class_setup_vtable () before accessing klass->vtable.
5501
5502 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
5503
5504         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
5505         hackish.
5506
5507 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5508
5509         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
5510         IMT slots (this saves hundreds of KB of memory in programs like
5511         IronPython and Monodevelop).
5512
5513 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5514
5515         * mini.c: print the delegate counter.
5516
5517 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
5518
5519         * mini-x86.c: make it easier to enable the debugging code for IMT
5520         slots.
5521
5522 2007-09-28  Martin Baulig  <martin@ximian.com>
5523
5524         * debug-debugger.h
5525         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
5526         `mono_method_klass_offset' and `mono_method_token_offset'.
5527
5528 2007-09-20  Mark Probst  <mark.probst@gmail.com>
5529
5530         * mini.c: First generics sharing implementation.  Can only share
5531         in very simple cases.  If sharing doesn't work it falls back to
5532         dedicated compilation.
5533
5534         * mini.h: Flag in MonoCompile to specify whether generic
5535         compilation is shared.  Flags enum for marking which generic inst
5536         of a context is used.  Prototypes for helper functions.
5537
5538         * generic-sharing.c: Helper functions for generic method sharing.
5539
5540         * optflags-def.h: Optimization flag (gshared) for enabling generic
5541         method sharing added.
5542
5543         * Makefile.am: generic-sharing.c added.
5544
5545 2007-09-19 Daniel Nauck <dna@mono-project.de>
5546
5547         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
5548
5549 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
5550         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
5551         fixes bug 325507.
5552
5553 2007-09-19  Martin Baulig  <martin@ximian.com>
5554
5555         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
5556         mono_debug_cleanup() is now part of mono_cleanup().
5557
5558 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
5559
5560         * driver.c (mono_main): Fix a warning.
5561
5562 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
5563
5564         * aot-compiler.c: Optimize various parts when processing large assemblies.
5565         Fixes ##325568.
5566
5567         * mini.c (mono_patch_info_hash): Improve hash function.
5568
5569 2007-09-14  Jonathan Chambers <joncham@gmail.com>
5570
5571         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
5572         
5573         Code is contributed under MIT/X11 license.
5574
5575 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5576
5577         * mini.c (mini_init): Fix a leak.
5578
5579         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
5580
5581 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5582
5583         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
5584
5585 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
5586
5587         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
5588
5589 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
5590
5591         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
5592         variance tests.
5593
5594         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
5595
5596         * mini.c (handle_alloc): Enable managed allocators in AOT code.
5597
5598         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
5599
5600         * aot-runtime.c (decode_patch_info): Ditto.
5601
5602 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5603
5604         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
5605         static case. Cache delegates in architecture specific code, 
5606         based on number of parameters.
5607         
5608         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
5609         in architecture specific code, based on number of parameters.
5610         
5611         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
5612         caching happen in architecture specific code now.
5613         
5614         Code is contributed under MIT/X11 license.
5615
5616 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5617
5618         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
5619         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
5620         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
5621
5622         Code is contributed under MIT/X11 license.
5623
5624 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5625         * mini.c: (mono_thread_abort) Fixed bug #82416.
5626
5627 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5628
5629         * mini.: hook the new managed GC allocation feature into the JIT.
5630
5631 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5632
5633         * mini.c: implementation for the new runtime tls opcode.
5634
5635 2007-09-11  Martin Baulig  <martin@ximian.com>
5636
5637         * debug-debugger.h
5638         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
5639         `mono_method_inflated_offset'.
5640
5641 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
5642
5643         * driver.c mini.h mini.c: Add a new devel command line option for injecting
5644         async exceptions into a method.
5645
5646         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
5647         purpose of testing whenever the unwinder works at every instruction.
5648
5649 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
5650
5651         * mini.c: check accessibility of method used in ldftn (fixes
5652         bug #82635).
5653
5654 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
5655
5656         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
5657
5658         * inssel.brg: Fix a warning.
5659
5660 2007-09-03  Martin Baulig  <martin@ximian.com>
5661
5662         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
5663         now takes the `main_method' as argument.
5664
5665 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
5666
5667         * cpu-sparc.md (endfilter): Add missing src1:i argument.
5668
5669 2007-08-30  Jonathan Chambers <joncham@gmail.com>
5670
5671         * driver.c: include the cil-coff.h header on Windows.
5672         
5673         Code is contributed under MIT/X11 license.
5674
5675 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5676
5677         * mini.c, driver.c: don't include the cil-coff.h header.
5678
5679 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5680
5681         * mini.c: flag places that needs fixes fo soft-float support.
5682
5683 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
5684
5685         * mini.h, inssel-float.brg: fix soft-float constant loads on big
5686         endian systems (partially from Dean Jenkins, bug #81924).
5687
5688 2007-08-28  Mark Probst  <mark.probst@gmail.com>
5689
5690         * mini.c (check_linkdemand): Remove embedded reference object in
5691         call to LinkDemandSecurityException.
5692         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
5693         with an IntPtr instead of a reference object.
5694
5695 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
5696
5697         * mini.c (handle_initobj): Handle alignment properly.
5698
5699         * inssel.brg (mini_emit_memset): Ditto. 
5700
5701         * inssel.brg (mini_emit_memcpy): Ditto. 
5702
5703         * inssel-sparc.brg: Ditto.              
5704
5705         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
5706
5707 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
5708
5709         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
5710         exceptions raised in unmanaged code. Fixes part of #82594.
5711
5712 2007-08-24  Mark Probst  <mark.probst@gmail.com>
5713
5714         * mini.c (mono_method_to_ir), declsec.c
5715         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
5716
5717 2007-08-22  Martin Baulig  <martin@ximian.com>
5718
5719         * debug-mini.h
5720         (MonoDebuggerThreadInfo): New typedef.
5721         (mono_debugger_thread_table): New global variable.
5722         (mono_debugger_thread_created): New public function.
5723         (mono_debugger_thread_cleanup): New public function.
5724
5725         * debug-debugger.h
5726         (MonoDebuggerInfo):
5727         - removed `get_current_thread' and `lookup_assembly'.
5728         - removed `data_table'.
5729         - added `thread_table'.
5730
5731         * mini.c
5732         (mono_thread_start_cb): Call mono_debugger_thread_created().
5733         (mono_thread_attach_cb): Likewise.
5734         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
5735         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
5736         initial domain.
5737
5738         * driver.c (mono_main): Move mono_debug_init() up, before calling
5739         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
5740
5741 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5742
5743         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
5744         together when passing several arguments of type double (gives a small
5745         speedup and saves a few bytes of generated code).
5746
5747 2007-08-20  Jb Evain  <jbevain@novell.com>
5748
5749         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
5750
5751 2007-08-20  Jb Evain  <jbevain@novell.com>
5752
5753         * mini.c (mono_method_to_ir): throw MethodAccessException
5754         and FieldAccessException instead of InvalidProgramException.
5755
5756 2007-08-20  Mark Probst  <mark.probst@gmail.com>
5757
5758         * mini.c: CoreCLR security checks.
5759
5760         * mini.h: Removed MonoSecurityMode (moved to
5761         metadata/security-manager.h) and mono_security_mode global var
5762         (replaced by set/get functions in security-manager.h).
5763
5764         * driver.c: Added "core-clr-test" security mode for testing.  Used
5765         set-function for setting security mode.
5766
5767 2007-08-17  Mark Probst  <mark.probst@gmail.com>
5768
5769         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
5770         the new jit_info_table.
5771
5772         * driver.c: Test code for the new jit_info_table (enabled by the
5773         define MONO_JIT_INFO_TABLE_TEST).
5774
5775 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
5776
5777         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
5778         detection of call <REG> instruction sequence. Fixes build on freebsd.
5779
5780 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
5781
5782         * mini-exceptions.c: Fix a warning.
5783
5784 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
5785
5786         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
5787         stack overflow handling code on amd64 too.
5788
5789         * mini-exceptions.c (mono_setup_altstack): Make this use 
5790         mono_thread_get_stack_bounds ().
5791
5792         * mini-x86.h: Disable sigaltstack on solaris x86.
5793
5794 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
5795
5796         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
5797
5798 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
5799
5800         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
5801
5802 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
5803
5804         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
5805
5806         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
5807
5808 2007-08-03  Neale Ferguson <neale@sinenomine.net>
5809
5810         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
5811         due to alignment.
5812
5813 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5814
5815         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
5816         to be emitted (bug #82281).
5817
5818 2007-08-01  Martin Baulig  <martin@ximian.com>
5819
5820         Merged the `debugger-dublin' branch.
5821
5822         * debug-debugger.h (MonoDebuggerInfo):
5823         Removed the `old_*' compatibility entries.
5824         Added `debugger_version' and `data_table'.
5825         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
5826         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
5827
5828         * debug-mini.c
5829         (MiniDebugMethodBreakpointInfo): Add `address_list'.
5830         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
5831         instead of a `gconstpointer'.
5832         (mono_debugger_insert_method_breakpoint): Return a
5833         `MonoDebugMethodAddressList *'.
5834
5835 2007-06-28  Martin Baulig  <martin@ximian.com>
5836
5837         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5838
5839 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
5840
5841         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
5842         __builtin_frame_address () since it is broken on older gcc versions.
5843
5844 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5845
5846         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
5847         on the stack overflow handling and made the managed stack overflows
5848         catchable in most cases using soft guard pages.
5849         * exceptions-x86.c: added code to restore the protection in the soft
5850         guard pages at the end of exception handling.
5851
5852 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
5853
5854         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
5855
5856 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5857
5858         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
5859         exception handling.
5860
5861 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5862
5863         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
5864         signal handling support until it has been ported to the new mechanism.
5865         * mini.c: fixed stack overflow detection and use the new
5866         architecture code  to handle signals on the altstack.
5867
5868 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
5869
5870         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
5871         stack overflows on the alt stack.
5872
5873 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
5874
5875         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
5876         stack overflows on the alt stack.
5877
5878 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
5879
5880         * exceptions-ppc.c: cleanup preparing for altstack support.
5881
5882 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5883
5884         * exceptions-arm.c: cleanup preparing for altstack support.
5885
5886 2007-07-27  Mark Probst  <mark.probst@gmail.com>
5887
5888         * mini.c (print_jit_stats): Output hazard pointer stats.
5889
5890 2007-07-26  Mark Probst  <mark.probst@gmail.com>
5891
5892         * driver.c, mini.c: Replaced security mode flags with a single
5893         enum variable.
5894
5895 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5896
5897         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
5898
5899 2007-07-25  Mark Probst  <mark.probst@gmail.com>
5900
5901         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
5902         (which doesn't do anything yet) for activating Core CLR
5903         (Silverlight) security.
5904
5905 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
5906
5907         * mini-codegen.c: work around a possible gcc bug on arm.
5908
5909 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5910
5911         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
5912         message for platforms that don't support AOT compilation.
5913
5914 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5915
5916         * mini.h, mini.c, driver.c: temporary smcs hack.
5917
5918 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
5919
5920         * mini-arm.h, mini-arm.c: arm EABI fixes.
5921
5922 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
5923
5924         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
5925         case.
5926
5927         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
5928         trampolines taking a method argument.
5929
5930         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
5931
5932         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
5933         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
5934
5935         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
5936         JIT compilation throws an exception. Fixes #82050.
5937
5938 2007-07-19  Mark Probst  <mark.probst@gmail.com>
5939
5940         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
5941         with the MONO_EXCEPTION_ defines.
5942
5943 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
5944
5945         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
5946         #82117.
5947         
5948         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
5949         the cause of an assertion.
5950
5951 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
5952
5953         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
5954         removed.
5955
5956 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
5957
5958         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
5959         assert. Should fix #82103.
5960
5961 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
5962
5963         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
5964         here too. Fixes #82095.
5965
5966         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
5967         addresses.
5968
5969         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
5970
5971         * mini-amd64.h: Enable IMT for amd64.
5972         
5973         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
5974
5975 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
5976
5977         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
5978
5979 2007-07-12  Mark Probst  <mark.probst@gmail.com>
5980
5981         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
5982         as soon as check_linkdemand sets an exception_type.
5983
5984 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5985
5986         * mini-x86.c: fixed offsets for IMT call sequence.
5987         * mini-x86.h: enable IMT again.
5988
5989 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5990
5991         * trace.c (mono_trace_enter_method): Decode MonoType too.
5992
5993         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
5994
5995         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
5996
5997         * mini-amd64.c: Add preliminary IMT implementation.
5998         
5999 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6000
6001         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
6002         understand the new IMT-base interface invocation (thanks to
6003         Daniel Nauck for the report and the remote debugging session).
6004
6005 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6006
6007         * mini-x86.c: size and speed optimizations for the IMT bsearch.
6008
6009 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6010
6011         * Makefile.am (aotcheck): Make this actually use the AOTed code.
6012
6013 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
6014
6015         * mini-trampolines.c: implement AOT IMT support.
6016         * mini-x86.h: enable IMT support for wider testing.
6017
6018 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6019
6020         * inssel.brg (emit_imt_argument): Add aot support here.
6021
6022         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
6023
6024 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6025
6026         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
6027         of the IMT implementation, partially from massi, with my
6028         implementation of the bsearch sequence. Disabled by default until
6029         the AOT code is implemented.
6030
6031 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6032
6033         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
6034
6035         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
6036
6037 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6038
6039         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
6040         arch-independent IMT JIT code from Massimiliano
6041         Mantione (massi@ximian.com) with small cleanups from me.
6042
6043 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6044
6045         * Makefile.am: fix svn invocation to get the svn revision to be
6046         independent of the local language (build fix).
6047
6048 2007-07-09  Mark Probst  <mark.probst@gmail.com>
6049
6050         * mini.c (inline_method): Reset cfg->exception_type if the
6051         inlining is aborted.  Fixes: 82049.
6052
6053 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
6054
6055         * mini.c: remove assert from exception handling code when exception_ptr
6056         is not set.
6057
6058 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
6059
6060         * mini.c (mono_codegen): Add an assert.
6061
6062         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
6063         enter and leave code.
6064         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
6065
6066 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6067
6068         * mini-ppc.c: fixed memory corruption for localloc(0)
6069         (bug #81852).
6070
6071 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
6072         
6073         * mini.c: Fix warnings.
6074
6075 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
6076
6077         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
6078         to emit better double->int conversions.
6079
6080 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6081
6082         * mini.c: the provided Min/Max optimizations are valid for unisgned
6083         ints.
6084
6085 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
6086
6087         * 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
6088
6089 2007-06-28  Miguel de Icaza  <miguel@novell.com>
6090
6091         * mini.c (mono_running_on_valgrind): Add support for reporting the
6092         method and  its boundaries to valgrind.
6093
6094 2007-06-28  Martin Baulig  <martin@ximian.com>
6095
6096         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6097
6098 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
6099
6100         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
6101
6102         * generic.2.cs: Add new test case.
6103
6104 2007-06-25  Martin Baulig  <martin@ximian.com>
6105
6106         Merged the `debugger-dublin' branch.
6107
6108         * debug-mini.c
6109         (mono_debugger_insert_method_breakpoint): New public method.
6110         (mono_debugger_remove_method_breakpoint): Likewise.
6111         (mono_debugger_check_breakpoints): New static method.
6112         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
6113
6114         * debug-debugger.h (MonoDebuggerInfo):
6115         Renamed (to keep backward compatibility in the vtable):
6116         `insert_breakpoint' -> `old_insert_breakpoint'.
6117         `remove_breakpoint' -> `old_remove_breakpoint'.
6118         `create_string' -> `old_create_string'.
6119         `lookup_class' -> `old_lookup_class'.
6120         `lookup_type' -> removed; changed into a dummy field.
6121         `lookup_assembly' -> `old_lookup_assembly'.
6122         Added (same functionality, but different signature):
6123         `create_string', `lookup_class', `lookup_assembly'
6124         Added new:
6125         `get_method_addr_or_bpt', `remove_method_breakpoint',
6126         `runtime_class_init'.
6127
6128         * debug-debugger.c: Merged the `debugger-dublin' branch.
6129
6130 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
6131
6132         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
6133         well.
6134         (peephole_pass): Likewise.
6135
6136 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
6137
6138         * driver.c: hopefully make setaffinity work also for ancient
6139         versions of linux.
6140
6141 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
6142
6143         * driver.c : win32 build fix.
6144
6145 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6146
6147         * driver.c: check for the MONO_NO_SMP env var and bind to a single
6148         processor if it is set.
6149
6150 2007-06-21  Martin Baulig  <martin@ximian.com>
6151
6152         * debug-mini.h: New file.
6153
6154         * debug-mini.c
6155         (mono_debugger_insert_breakpoint_full): Moved here from
6156         ../metadata/mono-debug-debugger.c.
6157         (mono_debugger_remove_breakpoint): Likewise.
6158         (mono_debugger_breakpoint_callback): Likewise.
6159
6160 2007-06-15  Raja R Harinath  <rharinath@novell.com>
6161
6162         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6163         changes in MonoGenericClass.
6164
6165 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
6166
6167         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
6168
6169 2007-06-14  Raja R Harinath  <rharinath@novell.com>
6170
6171         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6172         removal of MonoGenericMethod.
6173
6174 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6175
6176         * mini-exceptions.c: hooks for the exception events profiling API.
6177
6178 2007-06-14  Randolph Chung  <tausq@debian.org>
6179
6180         * Makefile.ma: Add hppa target.
6181         * mini-arch.h: Include mini-hppa.h
6182         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
6183         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
6184         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6185
6186 2007-06-14  Randolph Chung  <tausq@debian.org>
6187
6188         * inssel.brg: Add rules for "chained" compare-branch operations so that
6189         a single compare op can affect multiple branches.  Adjust cost for
6190         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
6191         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
6192         cost for some rules so that they can more easily be overridden by
6193         per-arch rules (with fixes from lupus).
6194         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6195
6196 2007-06-13  Randolph Chung  <tausq@debian.org>
6197
6198         * mini-ops.h: Reorder branch ops so that they match the order of the
6199         corresponding CEE_* ops.  The code expects them this way.
6200         Add new ops for HPPA target.
6201         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6202
6203 2007-06-13  Randolph Chung  <tausq@debian.org>
6204
6205         * mini-exceptions.c: Handle cases where the stack grows towards
6206         larger addresses.
6207         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6208
6209 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6210
6211         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
6212         counter.
6213         * driver.c: explain where a non-matching corlib is found.
6214
6215 2007-06-13  Mark Probst  <mark.probst@gmail.com>
6216
6217         * mini.c (print_jit_stats): Output dynamic code allocation stats.
6218
6219 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
6220
6221         * mini-exceptions.c: Generate a method profile leave event during
6222         an exception to ensure that the profiler gets notified.
6223
6224 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
6225
6226         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
6227         branch.
6228
6229         * cpu-amd64.md: Add long_and/or/xor opcodes.
6230
6231 2007-06-06  Wade Berrier  <wberrier@novell.com>
6232
6233         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
6234         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
6235         length of instruction shr_imm (expected 8, got 10)
6236
6237 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
6238
6239         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
6240
6241 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6242
6243         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6244         MonoInternalHashTable again (fixed bug in the internal hash table
6245         code).
6246
6247 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6248
6249         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
6250         Have to figure out what makes it crash the SWF regression.
6251
6252 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
6253
6254         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
6255
6256 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6257
6258         * mini.c: optimize out the type check when storing null in a
6259         reference array.
6260
6261 2007-06-04  Mark Probst  <mark.probst@gmail.com>
6262
6263         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6264         MonoInternalHashTable.
6265
6266 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6267
6268         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
6269         signed integer methods.
6270
6271 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
6272
6273         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
6274         permanently since the current approach doesn't work.
6275
6276 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
6277
6278         * inssel.brg (stmt): Only call delegate->invoke_impl if 
6279         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
6280
6281 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
6282
6283         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
6284         the sreg2==rdx case.
6285         
6286         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
6287         account if it contains a rex prefix.
6288         (peephole_pass): Handle OP_FMOVE as well.
6289
6290 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
6291
6292         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
6293         as it causes regressions.
6294
6295 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
6296
6297         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
6298         static case as well.
6299
6300         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
6301
6302         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6303         (mono_arch_get_this_arg_from_call): Ditto.
6304
6305         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
6306
6307         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
6308         invoke_impl field.
6309
6310         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6311         (mono_arch_get_this_arg_from_call): Ditto.
6312
6313         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
6314         
6315         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
6316         try to create optimized invoke code and use that for further invocations. 
6317         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
6318
6319         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
6320
6321 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
6322
6323         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
6324         sealed classes or methods.
6325         *devirtualization.cs: tests for the new optimization
6326
6327 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
6328
6329         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
6330         by the update_volatile () function.
6331
6332 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
6333
6334         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
6335         require it.
6336
6337         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
6338
6339 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
6340
6341         * mini.c: Add configure checks for header files.
6342         * mini-x86.c: Add configure checks for header files.
6343         * trace.c: Add configure checks for header files.
6344         * aot-runtime.c: Add configure checks for header files.
6345         * aot-compiler.c: Add configure checks for header files.
6346         * driver.c: Add configure checks for header files.
6347         * mini-codegen.c: Add configure checks for header files.
6348         
6349         Code is contributed under MIT/X11 license.
6350
6351 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
6352
6353         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
6354         icompare_imm -128 + op_iclt. Fixes #81703.
6355
6356 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
6357
6358         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
6359
6360 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
6361
6362         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
6363         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
6364         so that all isinst checks now use "interface_bitmap".
6365
6366 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
6367
6368         * cpu-amd64.md (jmp): Fix a warning.
6369
6370         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
6371
6372         * basic.cs: Add new regression test.
6373
6374         * basic.cs: Remove test which is now in basic-long.cs.
6375
6376         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
6377
6378         * basic-long.cs: Add new test.
6379         
6380 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
6381
6382         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
6383
6384 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
6385
6386         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
6387
6388         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
6389         places.
6390         
6391         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
6392         throwing code a bit.
6393
6394         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
6395         the exception throwing code a bit.
6396
6397         * mini-x86.c (get_call_info): Allocate result from a mempool.
6398
6399 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
6400
6401         * aot-compiler.c (find_typespec_for_class): Fix the assert.
6402
6403         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
6404
6405         * mini.h (MonoCompile): Add 'token_info_hash' field.
6406
6407         * mini.c: Save token->method associations during compilation so the AOT 
6408         compiler can use it.
6409         
6410         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
6411         which reference generic classes and methods.
6412
6413 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
6414
6415         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
6416
6417         * aot-compiler.c (compile_method): Fix a typo in a comment.
6418
6419         * aot-runtime.c (decode_cached_class_info): Skip generic types.
6420
6421         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
6422         everything generic.
6423
6424         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
6425
6426 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
6427
6428         * mini.h (MonoCompile): Add 'args' field.
6429
6430         * mini.c (mono_compile_create_vars): Store variables representing the arguments
6431         into cfg->args.
6432
6433         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
6434
6435 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
6436
6437         * mini.c (mono_compile_get_interface_var): Remove this unused function.
6438
6439         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
6440
6441         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
6442         opcodes for some opcodes.
6443
6444         * mini.h *.brg *.c: Use the new opcodes.
6445
6446 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
6447
6448         * mini.h: Bumped aot revision.
6449
6450         * inssel.brg: modified code generation of type checks for interfaces
6451         to use the new "MonoClass.interface_bitmap" instead of the old
6452         "MonoClass.interface_offsets".
6453
6454 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
6455
6456         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
6457
6458 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
6459
6460         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
6461         64 bit platforms.
6462
6463 2007-04-27  Neale Ferguson <neale@sinenomine.net>
6464
6465         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
6466
6467 2007-04-27  Wade Berrier  <wberrier@novell.com>
6468
6469         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
6470         mini.h) to fix build.
6471
6472 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
6473
6474         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
6475         
6476         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
6477         causes the corlib unit tests to fail.
6478
6479 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
6480
6481         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
6482
6483         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
6484
6485         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
6486         opcodes to the comparison relations.
6487
6488         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
6489         opcodes to their types.
6490         
6491         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
6492
6493         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
6494         it in cfg->arch.cinfo.
6495
6496         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
6497
6498         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
6499         cfg->cil_offset_to_bb.
6500
6501 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
6502
6503         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
6504         created becase of initlocals.
6505
6506 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
6507
6508         * mini-alpha.c cpu-alpha.md: More alpha port work from 
6509         Sergey Tikhonov <tsv@solvo.ru>.
6510
6511 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
6512
6513         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
6514
6515 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
6516
6517         * cpu-s390.md (break): Correct the length of break instruction.
6518
6519 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6520
6521         * mini.c: fix a couple of soft-float issues and comments.
6522
6523 2007-04-15  Miguel de Icaza  <miguel@novell.com>
6524
6525         * trace.c (is_filenamechar): - is also a filename char.
6526
6527 2007-04-15  Neale Ferguson <neale@sinenomine.net>
6528
6529         * mini-s390.c: Correct checking for enum type in return value processing.
6530
6531 2007-04-14  Raja R Harinath  <rharinath@novell.com>
6532
6533         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
6534         (version.h): Makefile is in the build directory.
6535
6536 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
6537
6538         * mini-amd64.h: fix for assertion failure on Solaris/amd64
6539
6540 2007-04-11  Martin Baulig  <martin@ximian.com>
6541
6542         * mini.c (can_access_member): Fix handling of generic classes;
6543         fixes #81259.
6544
6545 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
6546
6547         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
6548
6549 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
6550
6551         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
6552
6553 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6554
6555         * mini-codegen.c: make sure the right spill amount is
6556         used for fp or integer registers (fixes the float_sub_spill() on ppc).
6557
6558 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
6559
6560         * mini-ppc.c: fixes for the fp_branch_nan test.
6561
6562 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
6563
6564         * basic.cs: Comment out new test which still fails on ia64.
6565
6566 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6567
6568         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
6569
6570 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6571
6572         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
6573
6574 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
6575
6576         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
6577         on 64 bit machines. Fixes part of #80738.
6578
6579         * basic.cs: Add regression test.
6580
6581 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6582
6583         * inssel.brg basic.cs: Revert previous change to fix build.
6584
6585         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
6586         platforms.
6587         
6588         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
6589
6590         * basic.cs: Add new regression test.
6591
6592 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
6593
6594         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
6595         many arguments.
6596
6597 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6598
6599         * cpu-s390x.md: Correct length of break instruction.
6600
6601 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6602
6603         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
6604         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
6605
6606 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
6607
6608         * *.c: Begin WIN64 port.
6609         * mini.c:  Use correct register in profiler.
6610         * mini-amd64.c: No inline assembly on Win64.
6611         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
6612         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
6613         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
6614         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
6615         mono_arch_ip_from_context for Win64.
6616         
6617         Contributed under MIT/X11 license.
6618
6619 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
6620
6621         * exceptions-amd64.c (seh_handler): Ditto.
6622
6623         * exceptions-x86.c (seh_handler): Fix a memory leak.
6624
6625 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
6626
6627         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
6628         mini-s390x.c: fixed peephole optimizations to deal
6629         correctly with 1 and 2 byte reload avoidance.
6630
6631 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
6632
6633         * cpu-s390.md, cpu-s390x.md: update localloc length.
6634
6635 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6636
6637         * cpu-g4.md: added missing descriptions.
6638
6639 2007-03-14  Miguel de Icaza  <miguel@novell.com>
6640
6641         *  Makefile.am: Add support so the tail tests are not executed on
6642         PowerPC as that is a known limitation of the PowerPC port.
6643
6644 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6645
6646         * runmdesc.bat:  Move to msvc directory.
6647         
6648 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6649
6650         * runmdesc.bat:  Run executable that was produced by the current
6651         target and sent via an argument.
6652         
6653 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
6654
6655         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
6656         #81102.
6657
6658         * generics.2.cs: Add regression test.
6659
6660 2007-03-09  Wade berrier  <wberrier@novell.com>
6661
6662         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
6663
6664 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
6665
6666         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
6667         AOT code depends on this.
6668
6669 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6670
6671         * mini.c: more precise tracking of types in the eval stack
6672         (part of fix for bug #81044).
6673
6674 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
6675
6676         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
6677
6678         * aot-compiler.c (encode_patch): Remove an obsolete comment.
6679
6680 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
6681
6682         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
6683
6684         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
6685
6686 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
6687
6688         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
6689         a pointer on 64 bit systems. Fixes #80190.
6690
6691         * iltests.il: Add new regression test.
6692
6693 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6694
6695         * mini.c: inline a constant for Environment.IsRunningOnWindows.
6696
6697 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
6698
6699         * trace.c: Remove an erroneous alignemnt check when tracing.
6700           Fixes --trace on OSX86.
6701
6702 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6703
6704         * mini-$(arch).h: initialize SP in context for all the archs.
6705
6706 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
6707
6708         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
6709         regressions in the thread tests.
6710
6711 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
6712
6713         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
6714         - fixed implementation of LOCALLOC opcode
6715         - implemented non-un compare for floats
6716         - code cleanup
6717         - implementation of FDIV and CKFINITE opcodes
6718         - fixes for latest mono updates
6719         - additional arch opcodes
6720
6721 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6722
6723         * Makefile.am: simplify and merge rules for cross-compilation.
6724
6725 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
6726
6727         * local-propagation.c: Actually *apply* the fix for bug 80591...
6728
6729 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6730
6731         * mini-exceptions.c: backuot part of the last change
6732         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
6733
6734 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
6735         * inssel.brg: Fix bug 59286.
6736
6737
6738 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
6739
6740         * mini-exceptions.c: patch from Zoltan to correctly check for
6741         stack boundaries (using the stack register, not the frame register),
6742         fixes bugs #80724, #79717.
6743
6744 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
6745
6746         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
6747         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
6748
6749         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
6750         presence of frame pointer elimination.
6751
6752 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
6753         
6754         * mini-x86.h: NetBSD UCONTEX_REG defines.
6755
6756 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
6757
6758         * inssel-amd64.brg: Fix amd64 build.
6759
6760 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
6761
6762         * mini.h: remove extern to workaround what looks likes gcc bug 26905
6763         on amd64.
6764
6765 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
6766
6767         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
6768         ends.
6769
6770         * mini-<ARCH>.c: Use mono_is_regsize_var ().
6771
6772 2007-01-30 Mark Mason <mason@broadcom.com>
6773
6774            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
6775            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
6776            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
6777            beginning support for CEE_JMP [not quite working yet]
6778            * tramp-mips.c: LMF handling now works
6779         
6780 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
6781
6782         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
6783
6784         * mini.h (NULLIFY_INS): New macro.
6785
6786 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6787
6788         * mini.c: statistical profiler fix for windows, patch
6789         from Tor Lillqvist (tml@novell.com).
6790
6791 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
6792         * local-propagation.c: Fix bug 80591.
6793
6794 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6795
6796         * Makefile.am: put back the --export-dynamic option as with
6797         the previous gmodule flags (thanks to Robert Jordan).
6798
6799 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
6800
6801         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
6802
6803         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
6804         simplify and speed up the local register allocator. Also rename some fields
6805         like iassign->vassign.
6806         
6807         * regalloc.c: Remove some functions which are no longer used since their
6808         inlined version is in mini-codegen.c.
6809         
6810         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
6811
6812         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
6813
6814 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
6815
6816         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
6817         narrowing. Fixes #80622.
6818
6819         * iltests.il: Add new regresssion test. 
6820
6821 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6822
6823         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
6824         debug-debugger.c, debug-debugger.h: warning fixes.
6825         * driver.c: updated copyright year and made it fit in one line.
6826
6827 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
6828
6829         * aot-runtime.c: updated to use mono-dl instead of gmodule.
6830
6831 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
6832
6833         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
6834
6835         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
6836
6837         * iltests.il: Add new test for bug #80507.
6838
6839 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6840
6841         * mini-arm.h: use soft-float also on vfp for now.
6842
6843 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6844
6845         * mini.c: fix some more soft-float issues.
6846
6847 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
6848
6849         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
6850
6851 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
6852         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
6853         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
6854         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
6855
6856 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
6857
6858         * mini-arm.c: typo fix.
6859
6860 2007-01-23  Neale Ferguson <neale@sinenomine.net>
6861
6862         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
6863
6864 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
6865
6866         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
6867         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
6868
6869         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
6870
6871         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
6872
6873         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
6874         
6875         * inssel.brg: Fix a warning.
6876
6877         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
6878
6879         * abcremoval.c ssa.c ssapre.c: Update after this change.
6880         
6881         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
6882
6883         * dominators.c (df_set): Use mono_bitset_union_fast.    
6884
6885 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6886
6887         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
6888         mini-codegen.c: reduce relocations and memory usage for the cpu
6889         description.
6890
6891 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
6892
6893         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
6894
6895         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
6896         to reduce their size.
6897
6898 2007-01-19 Mark Mason <mason@broadcom.com>
6899
6900         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
6901         * mini-mips.c: more configuration macros, support long conditional branches, additional
6902         asserts, fix epilog instrumentation.
6903         * mini-mips.h: use standard stack walk
6904         * cpu-mips.md: increase size of div, rem and conditional branches
6905         
6906 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
6907
6908         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
6909         to cpu spec data.
6910
6911 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
6912
6913         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
6914         (compile_method): Ditto.
6915
6916         * aot-runtime.c (decode_klass_info): Ditto.
6917
6918         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
6919         needed by the code generated by inssel.brg. Also fix a warning.
6920
6921 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
6922
6923         * mini.c: deal with enums that become genericinsts by
6924         being nested in a generic class (bug #79956).
6925
6926 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6927
6928         * mini.c: match the generic definition to check for
6929         private access with generic types (bug #78431).
6930
6931 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6932
6933         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
6934         to make life easier for people cross-compiling that insist on not
6935         using scratchbox.
6936
6937 2007-01-17 Mark Mason <mason@broadcom.com>
6938
6939         * inssel-long.brg: patch to deal with mips missing flags
6940         * inssel-long32-mips.brg: implement overflow checks
6941         * insset-mips.brg: implement overflow checks
6942         * mini-mips.h: implement conditional exception handling
6943         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
6944           Remove unused code, minor cleanups.
6945         * exceptions-mips.c: minor cleanups
6946         * mini-ops.h: add mips conditional exception ops
6947         * cpu-mips.md: add mips conditional exception ops
6948
6949         
6950 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6951
6952         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
6953         to deal with mips missing of flags.
6954
6955 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6956
6957         * exceptions-ppc.c: execute fault handlers.
6958
6959 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
6960
6961         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
6962
6963 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6964
6965         * mini.c: handle also floating point values in initialize_array.
6966
6967 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6968
6969         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
6970         array initialization and make it conditional on the intrins option.
6971
6972 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6973
6974         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
6975         relocations and put the patch info names close to the enum definition.
6976
6977 2007-01-15 Mark Mason <mason@broadcom.com>
6978
6979         * basic.cs, exceptions.cs: break up large tests to increase debugability.
6980
6981 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6982
6983         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
6984
6985 2007-01-12  Raja R Harinath  <rharinath@novell.com>
6986
6987         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
6988
6989 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
6990
6991         * Makefile.am: distribute the mips sources.
6992
6993 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6994
6995         * mini-codegen.h: handle bug #80489 here, by excluding ecx
6996         directly.
6997
6998 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
6999
7000         * cpu-x86.md: back out for now as this triggers other regressions.
7001
7002 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7003
7004         * cpu-x86.md: force src1 and dest regpair for long shift instructions
7005         to eax:edx, so ecx can't get allocated to them (bug #80489).
7006
7007 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
7008
7009         * mini.c, mini-exceptions.c: enabled running fault handlers
7010         (bug #80469).
7011
7012 2007-01-03  Miguel de Icaza  <miguel@novell.com>
7013
7014         * driver.c: If nothing fail, do not use the string "failed",
7015         because it makes it very annoying to view test result logs on the
7016         web. 
7017
7018 2006-12-30  Miguel de Icaza  <miguel@novell.com>
7019
7020         * debug-debugger.c (mono_debugger_main): Rename "main" to
7021         "main_method" to prevent a warning.
7022
7023         Remove a warning for unused field.
7024
7025 2006-12-28  Martin Baulig  <martin@ximian.com>
7026
7027         * debug-debugger.c
7028         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
7029
7030 2006-12-22  Martin Baulig  <martin@ximian.com>
7031
7032         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
7033         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
7034         seperate `.mdb_debug_info' section, so we can access it from the
7035         debugger even if the binary is stripped.
7036
7037         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
7038         from the `.mdb_debug_info' here to prevent the linker from
7039         removing that section.
7040
7041         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
7042         mdb-debug-info64.s.
7043
7044 2006-12-19  Robert Jordan  <robertj@gmx.net>
7045
7046         * mini-x86: enable the code to return small structures in
7047         registers for FreeBSD as well. Fixes bug #80278.
7048         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
7049
7050 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7051
7052         * mini-x86.c: align the stack when calling the profiler
7053         function instrumenting the prolog (on OSX).
7054
7055 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
7056
7057         * mini.c: emit a break opcode where Debugger.Break () is called.
7058
7059 2006-12-13  Miguel de Icaza  <miguel@novell.com>
7060
7061         * mini.c (mono_method_to_ir): Provide useful information on this
7062         assert, to prevent others from debugging like I did.
7063
7064 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7065
7066         * mini.c: enable code which was incorrectly commented
7067         (bug #80235).
7068
7069 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7070
7071         * mini-x86.c: enable on OSX, too, the code to return small
7072         structures in registers.
7073
7074 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7075
7076         * mini-x86.c: remove the use of the dynamic code manager here, too.
7077
7078 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7079
7080         * mini.h, debug-debugger.c, tramp-*.c: fixed 
7081         mono_debugger_create_notification_function() to use
7082         mono_global_codeman_reserve () instead of a dynamic code manager.
7083
7084 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
7085
7086         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
7087         ves_array_element_address() jit icall and use a generated
7088         managed method instead (which is about 4 times faster for a rank 3
7089         array access).
7090
7091 2006-11-29  Mark Mason  <mason@broadcom.com>
7092
7093         * basic-calls.cs: additional tests for passing
7094         structures as function arguments.
7095
7096 2006-11-29  Mark Mason  <mason@broadcom.com>
7097
7098         * mini-mips.h: disable custom exception handling
7099         * mini-mips.c: throw/rethrow should use jalr to call
7100         exception stubs.  Fixed bug with passing structures
7101         by value. More support for tracing floating point
7102         functions.
7103
7104 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7105
7106         * mini.c: fixed typo in the soft-float ldind.r4 handling
7107         (bug #80086).
7108
7109 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7110
7111         * mini.c, mini.h, driver.c: added --runtime command line
7112         option to select a different runtime than the autodetected one.
7113         * jit.h: added API for embedders to initialize with a specific
7114         runtime version.
7115
7116 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
7117
7118         * mini.c: handle also boxing of r4 values (bug #80024).
7119
7120 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
7121
7122         * mini-ppc.c: force indirect calls until we reserve
7123         enough address space for all the generated code.
7124
7125 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
7126
7127         * exceptions-arm.c: workaround bugs in the libc definition
7128         of struct ucontext.
7129
7130 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7131
7132         * inssel.brg: fixes from me and Mark Mason.
7133
7134 2006-11-23  Dick Porter  <dick@ximian.com>
7135
7136         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
7137         semaphore display now we've fixed the initial value
7138
7139 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7140
7141         * inssel.brg: partially revert the last change to fix the build.
7142
7143 2006-11-21  Mark Mason  <mason@broadcom.com>
7144
7145         * inssel.brg: Add and use compare-and-branch macros to support
7146         architectures that do not have condition code registers (ie. MIPS).
7147         * *-mips.{c,brg,md}: Fix copyright statements
7148
7149 2006-11-20  Mark Mason  <mason@broadcom.com>
7150
7151         * Makefile.am: remove mini-codegen.c from list of MIPS sources
7152         * mini.c: Allow GET_CONTEXT to be specified by the arch port
7153         * mini.h: Added declaration for mono_print_ins()
7154         * mini-codegen.c: added ins_spec initializer for MIPS
7155         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
7156         vreg to be virtual and hreg to be non-virtual.
7157         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
7158         is not yet working/implemented correctly.
7159         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
7160         non-static, fixup calls to print_ins() from other parts in the file.
7161
7162 2006-11-20  Mark Mason  <mason@broadcom.com>
7163
7164         * basic-calls.cs: added tests for passing structures as arguments
7165         to calls.
7166
7167 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7168
7169         * inssel-long32.brg: optimize signed division by power of two.
7170
7171 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
7172
7173         * mini-arm.c: added support for interworking with thumb code
7174         (mono must be still be built using the ARM instruction encoding).
7175
7176 2006-11-19  Miguel de Icaza  <miguel@novell.com>
7177
7178         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
7179         verifier has different rules for it.   Fixes a few verifier issues
7180         in the test suite.
7181
7182         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
7183         at the end, so people know what happened.
7184
7185 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7186
7187         * brach-opts.c: in optimize_exception_target() make sure we
7188         are in a catch clause (fixes bug #79871).
7189
7190 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7191
7192         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
7193         more soft-float support fixes.
7194
7195 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
7196
7197         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
7198         that are passed half on the stack and half in registers.
7199
7200 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
7201
7202         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
7203         more mips integration work from Mark E Mason 
7204         <mark.e.mason@broadcom.com>.
7205
7206 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7207
7208         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
7209         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
7210         tramp-mips.c: added sources for the mips port, not
7211         integrated in the build yet. Contributed by
7212         Mark E Mason <mark.e.mason@broadcom.com>.
7213
7214 2006-11-14  Neale Ferguson <neale@sinenomine.net>
7215
7216         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
7217
7218 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7219
7220         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
7221         put the soft-float rules in its own file since it seems to
7222         break s390 compilation.
7223
7224 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7225
7226         * mini-arm.c: fixed wrnings.
7227
7228 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
7229
7230         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
7231         inssel-arm.brg: ARM support for soft-float.
7232
7233 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7234
7235         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
7236         loads and stores of 32 bit fp values.
7237
7238 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
7239
7240         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
7241
7242         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
7243         works. Fixes #79852 and #79463.
7244
7245 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7246
7247         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
7248         more soft-float support WIP and fixes.
7249
7250 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
7251
7252         * mini-arm.c: some VFP updates.
7253
7254 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7255
7256         * mini-exceptions.c: 0 is a valid local var offset in some
7257         architectures, don't assert (bug #78508).
7258
7259 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
7260
7261         * exceptions-arm.c: fixed off by one error in stack walk code.
7262
7263 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
7264
7265         * mini.h, mini.c: more precise tracking of type load exceptions.
7266
7267 2006-11-03  Robert Jordan  <robertj@gmx.net>
7268
7269         * Makefile.am: [WIN32] Add monow.exe target.
7270         * driver.c: [WIN32] Don't detach the console when debugging.
7271         Fixes bug #79797.
7272         
7273 2006-10-30  Miguel de Icaza  <miguel@novell.com>
7274
7275         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
7276
7277 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
7278
7279         * aot-compiler.c (emit_method_info): Add a case missed earlier.
7280
7281         * driver.c (mini_regression): Fix --regression with AOT.
7282
7283         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
7284
7285 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
7286
7287         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
7288
7289         * mini-sparc.h: Don't use sigaction on sparc/linux.
7290
7291         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
7292
7293         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
7294
7295         * mini-exceptions.c: Add proper include files for getpid ().
7296
7297 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
7298
7299         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
7300         address instead of a MonoJitInfo* to avoid decoding the exception info for the
7301         method.
7302
7303         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
7304         name cache to reduce its size.
7305
7306         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7307
7308 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
7309
7310         * mini-x86.c: Save/restore the current LMF structure more efficiently using
7311         the mono_lmf TLS variable.
7312
7313         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
7314         trampoline lmf frames.  
7315
7316         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
7317
7318 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
7319
7320         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
7321         the mono_lmf TLS variable.
7322
7323         * mini-exceptions.c: Access the LMF structure through accessors.
7324
7325         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
7326         variable instead of in jit_tls->lmf.
7327
7328         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
7329         
7330         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
7331         trampoline lmf frames.
7332
7333         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
7334
7335 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
7336
7337        * mini.c trace.c mini-x86.c: Revert these too.
7338         
7339        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
7340        signature change.
7341
7342 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
7343
7344         * genmdesc.c: removed now dead code.
7345
7346 2006-10-09  Robert Jordan <robertj@gmx.net>
7347
7348         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
7349
7350 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
7351
7352         * mini.h: do not leave gaps in the opcode values.
7353
7354 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
7355
7356         * jit-icalls.h: flag functions as internal here, too.
7357
7358 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
7359
7360         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
7361         functions with the internal attribute.
7362
7363 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
7364
7365         * aot-compiler.c: fclose the file descriptor in the profile read loop.
7366
7367 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
7368
7369         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
7370         for soft-float.
7371
7372 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
7373
7374         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
7375         tail calls as on other platforms.
7376
7377         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
7378
7379         * iltests.il: Add a few tailcall tests.
7380
7381 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7382
7383         * driver.c: fix loop for old compilers (bug #79521).
7384
7385 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
7386
7387         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
7388
7389         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
7390
7391         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
7392         metadata without any code.
7393
7394         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
7395         more precise debugging information using gdb.
7396
7397 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
7398
7399         * inssel-ia64.brg: Make the helper methods static.
7400
7401 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7402
7403         * inssel-x86.brg: make the helper methods static.
7404
7405 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
7406
7407         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
7408
7409 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7410
7411         * mini.c: updates for monoburg changes.
7412         * inssel.brg: make a few helper functions static as they should.
7413
7414 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
7415
7416         * Makefile.am: Move mini-codegen.c to common_sources.
7417
7418 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7419
7420         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
7421         instructions.
7422         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
7423         mini-ppc.h: port to use the common local register allocator.
7424
7425 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7426
7427         * mini.h: Remove the comment too then.
7428
7429 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
7430
7431         * mini.h: put back backend.data which is to be used shortly and
7432         doesn't increase the size of MonoInst. If any 64 bit arch aligned
7433         pointers on 4 byte boundaries it'd have much bigger issues running
7434         and you can ifdef it out anyway.
7435
7436 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7437
7438         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
7439         MonoInst size by 4 bytes on 64 bit machines.
7440
7441 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
7442
7443         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
7444         replacement with more meaningful field names. Arch maintainers, please
7445         check the assigned names are good enough for your arch.
7446
7447 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7448
7449         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
7450         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
7451
7452 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
7453
7454         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
7455         relocations and memory requirements, put the optimization flags
7456         definitions in their own file.
7457
7458 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
7459
7460         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
7461
7462         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
7463
7464 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
7465
7466         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
7467
7468 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
7469
7470         * inssel.brg: use the correct function to get the size of an item
7471         in an array, given an element class.
7472         * aot-compiler.c: do not access class->class_size directly.
7473
7474 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
7475
7476         * mini.h, debug-mini.c: added a debugging function to print
7477         info about local variables and arguments in a jitted method.
7478
7479 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
7480
7481         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7482
7483         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
7484
7485 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
7486
7487         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
7488         inner and outer loops when passing vtypes.
7489
7490 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
7491
7492         * mini-ppc.c: take into account the cpu errata for cache flushing
7493         which caused some random errors (bug #79381).
7494
7495 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
7496
7497         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
7498         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
7499
7500 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
7501
7502         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
7503         loaded.
7504
7505         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
7506         freebsd ports tree.
7507
7508         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
7509         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
7510
7511         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
7512         displacement.
7513
7514 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
7515
7516         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
7517
7518 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
7519
7520         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
7521         macro does not have to be changed during debugging.
7522
7523         * 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>.
7524
7525         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
7526
7527         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
7528         
7529         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
7530         MONO_ARCH_NO_EMULATE_MUL is defined.
7531
7532         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
7533
7534         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
7535
7536         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
7537
7538         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
7539         
7540 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
7541
7542         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
7543         stuff to mini-exceptions.c where it is used.
7544
7545         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
7546         setup code, the real one is in mini-exceptions.c.
7547
7548         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
7549         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
7550         some changes from the freebsd ports tree.
7551
7552         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
7553         constants.
7554         
7555         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
7556
7557 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
7558
7559         * mini.c: on Linux, check for /proc to be mounted
7560         (bug# 79351, novell bug#201204).
7561
7562 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
7563
7564         * mini.c: handle cases where pthread_attr_getstack() behaves
7565         incorrectly (bug #78096).
7566
7567 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
7568
7569         * mini-arm.c: support larger stack frames (bug #79272).
7570
7571 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
7572
7573         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
7574
7575         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
7576         tokens.
7577
7578         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
7579         mono_class_from_name () to find a class from its name.
7580
7581         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
7582
7583 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
7584
7585         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
7586
7587 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
7588
7589         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
7590
7591 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
7592
7593         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
7594         callinfo->trampoline.
7595
7596         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
7597         fixes #79271.
7598         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
7599         future.
7600
7601 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
7602
7603         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
7604
7605 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
7606
7607         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
7608         stats.method_trampolines, it is already done by the generic trampoline code.
7609
7610         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
7611         
7612 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
7613
7614         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
7615
7616         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
7617
7618         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
7619
7620         * mini.c (print_jit_stats): Print mscorlib mempool size too.
7621         
7622         * mini.c (print_jit_stats): Print new stats.
7623
7624         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7625
7626 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
7627
7628         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
7629         Address on two dimensional arrays. Fixes #78729.
7630
7631         * mini.h (MonoCompile): Add a 'skip_visibility' field.
7632
7633         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
7634         a method.
7635
7636         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
7637
7638         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
7639         #79130.
7640         
7641         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
7642         a race condition.
7643         (mini_get_ldelema_ins): Ditto.
7644
7645 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
7646
7647         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
7648         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
7649         Fixes #79213.
7650
7651 2006-08-29 Neale Ferguson <neale@sinenomine.net>
7652
7653         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
7654         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
7655
7656         * exceptions-s390x.c: Cosmetic change.
7657
7658         * tramp-s390.c: Fix warning.
7659
7660         * cpu-s390.md: Correct length of mul_imm.
7661
7662 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
7663
7664         * aot-compiler.c: added binary writer with ELF backend
7665         implementation (only on Linux/x86 for now).
7666
7667 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7668
7669         * Makefile.am: Don't run net 2.0 AOT tests.
7670
7671         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
7672         (mono_compile_assembly): Skip net 2.0 assemblies as well.
7673
7674         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
7675
7676 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7677
7678         * aot-compiler.c: simplified and refactored the asm-writing code
7679         to allow different backends.
7680
7681 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7682
7683         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7684
7685         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
7686         little. Share patches of type TYPE_FROM_HANDLE as well.
7687
7688         * mini.c (mono_patch_info_equal): New helper function.
7689         (mono_patch_info_hash): Ditto.
7690
7691         * aot-compiler.c (emit_method_code): Fix s390 build.
7692
7693         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
7694         is not handled because it is stored as a flag and not as a type ctor. Fixes
7695         #79016.
7696
7697 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
7698
7699         * aot-compiler.c: Fix computation of GOT slot statistics.
7700         
7701         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
7702         Also remove support for not PIC AOT.
7703
7704         * mini.h: Bump AOT file format version.
7705
7706         * objects.cs: Add a test for #78990.
7707
7708         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
7709         (peter.dettman@iinet.net.au). Fixes #79087.
7710
7711         * basic-long.cs: Add a test for the above.
7712
7713 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
7714
7715         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
7716         
7717         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
7718         code somewhat.
7719
7720 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
7721
7722         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
7723         exceptions.
7724
7725 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
7726
7727         * mini.c: Don't verify COM proxy invoke calls
7728         
7729
7730 2006-08-10  Dick Porter  <dick@ximian.com>
7731
7732         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
7733         which process is holding semaphores locked.
7734
7735 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
7736
7737         * mini-ia64.c mini-amd64.c: Fix #79027.
7738
7739         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
7740
7741         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
7742
7743         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
7744         implicit arguments in a vararg call. Fixes #79027.
7745
7746 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
7747
7748         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
7749         (mono_get_array_new_va_signature): Ditto.
7750
7751 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
7752
7753         * aot-runtime.c: Call init_plt lazily.
7754
7755         * inssel-long.brg: Fix unsigned long->int conversion.
7756
7757         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
7758
7759         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
7760         that most data is now in the .rss/.data section.
7761
7762 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
7763
7764         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
7765
7766         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
7767
7768         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
7769
7770         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
7771
7772         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
7773         virtual call. Fixes #79010.
7774
7775         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
7776         and use the result as the this argument in the real call.
7777
7778         * generics.2.cs: Add a new test for #79010.
7779         
7780 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
7781
7782         * mini-x86.c: Fix a warning.
7783
7784         * aot-compiler.c: Add a bunch of statistics.
7785
7786         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
7787
7788 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
7789
7790         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
7791
7792 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
7793
7794         * 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>.
7795
7796 2006-07-13  Miguel de Icaza  <miguel@novell.com>
7797
7798         * mini.c (mono_method_to_ir): Obtain the original method in the
7799         CIL stream and use this to perform validation.
7800
7801         Fixed: #78816
7802
7803 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
7804
7805         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
7806         (mono_arch_call_opcode): Ditto.
7807
7808         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
7809         #78826.
7810
7811         * mini.c (mono_patch_info_dup_mp): New helper function.
7812         
7813         * aot-compiler.c (compile_method): Fix some of the memory allocated during
7814         compilation. Fixes #78827.
7815
7816 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
7817
7818         * declsec.c: Use original security informations for
7819           MONO_WRAPPER_MANAGED_TO_MANAGED.
7820
7821 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
7822
7823         * mini.c: Allow Com Interop methods/classes and
7824         don't verify COM wrapper calls
7825         
7826
7827 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
7828
7829         * inssel-long32.brg: Fix long->i4 checked conversion.
7830
7831         * exceptions.cs: Add a test for the above.
7832
7833 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
7834
7835         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
7836
7837         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
7838         leaks.
7839
7840         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
7841         #78775.
7842
7843 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
7844
7845         * mini.c: Fix solaris/x86 exception handling.
7846
7847         * Makefile.am: Get rid of $(ICU_LIBS).
7848
7849 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
7850
7851         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
7852         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
7853         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
7854
7855         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
7856
7857         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
7858         this function causes a SIGSEGV.
7859
7860 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
7861
7862         * mini.c: Remove unused solaris/x86 includes.
7863
7864 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
7865
7866         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
7867
7868 2006-06-20  Jb Evain  <jbevain@gmail.com>
7869
7870         * cpu-g4.md: fix max length of start_handler instruction.
7871
7872 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
7873         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
7874
7875 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
7876         * ssa.c: Fixed bug 78653 for SSA based deadce.
7877         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
7878         MonoInst.flags, used in SSA based deadce.
7879         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
7880         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
7881
7882 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
7883
7884         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
7885         it can end up using non executable memory on ppc64 systems
7886         running ppc32 userspace (fix from Johannes Berg).
7887
7888 2006-06-14  Dick Porter  <dick@ximian.com>
7889
7890         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
7891         4.1.1
7892
7893 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
7894         * mini.c: Made so that inline is locally disabled if it would
7895         trigger a .cctor, because too many apps depend on this behavior
7896         (which seems to be also the one of the MS CLR).
7897
7898 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
7899
7900         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
7901         No idea why this worked before.
7902
7903         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
7904         which branch to outer exception clauses since they could skip the
7905         inner finally clauses. Fixes #78633.
7906
7907         * exceptions.cs: Add a test for the above.
7908
7909         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
7910         Fixes #78629.
7911
7912         * iltests.il: Add a test for the above.
7913
7914 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
7915
7916         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
7917         after the end of a try bblock, to prevent asserts in mini_method_compile ().
7918
7919         * iltests.il: Add a test for the above.
7920
7921 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
7922
7923         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
7924         
7925         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
7926         methods as instrinsics.
7927
7928 2006-06-09  Wade Berrier <wberrier@novell.com>
7929
7930         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
7931         (simple-cee-ops.h ssapre-mini-ops.h)
7932
7933 2006-06-09  Neale Ferguson <neale@sinenomine.net>
7934
7935         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
7936         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
7937         instruction).
7938         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
7939         * cpu-s390x.md: Fix max. length values for a couple of instructions.
7940
7941 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
7942
7943         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
7944
7945 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
7946
7947         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
7948         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
7949         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
7950         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
7951         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
7952         of opcodes, so that bug 78549 should not happen again.
7953         * ssapre.c: Updated to use the renamed files.
7954
7955 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
7956
7957         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
7958         in OP_ATOMIC_EXCHANGE_I4.
7959
7960 2006-06-07  Wade Berrier <wberrier@novell.com>
7961
7962         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
7963         in mono_debugger_create_notification_function)
7964
7965 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
7966
7967         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
7968         
7969         * mini.c (type_from_stack_type): Disable some changes which do not
7970         seem to work.
7971
7972         * driver.c: Reenable opts.
7973
7974         * mini.h (MonoStackSlot): New structure to keep track of the verification state
7975         of the evaluation stack.
7976         
7977         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
7978         evaluation stack trace at entry to the bblock.
7979
7980         * mini.c (merge_stacks): New function to perform verification of stack merges.
7981         Turned off by default.
7982
7983         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
7984         STACK_MP.
7985         
7986 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
7987
7988         * local-propagation.c: Fixed bug 78549.
7989
7990 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
7991
7992         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
7993
7994 2006-06-02  Miguel de Icaza  <miguel@novell.com>
7995
7996         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
7997         tramp-arm.c, tramp-ia64.c
7998         (mono_debugger_create_notification_function): Update signature to
7999         new signature and use new protocol for creating the notification
8000         function.  
8001
8002         Should fix the build.
8003
8004 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
8005
8006         * exceptions-ppc.c (mono_jit_walk_stack)
8007         (ves_icall_get_frame_info): Fix the build
8008
8009 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
8010
8011         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
8012
8013 2006-05-31  Raja R Harinath  <rharinath@novell.com>
8014
8015         * il2tests.2.il: New file for generics CIL tests.  Add test for
8016         #78019.
8017         * Makefile.am: Update.
8018
8019         Fix #78019
8020         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
8021         to nullable types.
8022
8023 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
8024
8025         * aliasing.c: Fixed bug 78311.
8026
8027 2006-05-29  Martin Baulig  <martin@ximian.com>
8028
8029         * mini-exceptions.c (mono_find_jit_info): When computing the
8030         native offset, check whether we're actually inside the method's
8031         code; call mono_debug_print_stack_frame() to format the frame.
8032         (ves_icall_System_Exception_get_trace): Call
8033         mono_debug_print_stack_frame() to format the stack frame.
8034         (ves_icall_get_trace): Update to the new debugging API.
8035         (mono_jit_walk_stack_from_ctx): Likewise.
8036         (ves_icall_get_frame_info): Likewise.
8037
8038         * mini.c (get_method_from_ip): Use the new debugging API.
8039         (mono_print_method_from_ip): Likewise.
8040
8041         * exceptions-ppc.c
8042         (mono_jit_walk_stack): Use the new debugging API.
8043         (ves_icall_get_frame_info): Likewise.   
8044
8045 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
8046
8047         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
8048
8049 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
8050
8051         * mini.c: Added "limitator" to inline for debugging.
8052
8053 2006-05-24  Martin Baulig  <martin@ximian.com>
8054
8055         * debug-debugger.c (mono_debugger_init): Create a private,
8056         malloc()-based code manager for the notification function and
8057         intentionally leak it on exit.  This fixes the crash-on-exit race
8058         condition.
8059
8060         * tramp-amd64.c
8061         (mono_debugger_create_notification_function): Added
8062         `MonoCodeManager *' argument.
8063
8064         * tramp-x86.c
8065         (mono_debugger_create_notification_function): Added
8066         `MonoCodeManager *' argument.
8067
8068 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
8069
8070         * aliasing.c: Fixed 64 bit issue.
8071         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8072         default since all known bugs are fixed (one more time!).
8073
8074 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8075
8076         * mini.c: write barrier support.
8077
8078 2006-05-23  Martin Baulig  <martin@ximian.com>
8079
8080         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
8081         check at the top of the file.
8082
8083 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
8084
8085         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
8086         reverting changes without reason and without changelog entries.
8087
8088 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
8089
8090         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
8091         to a few opcodes. Fixes #78439.
8092
8093         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
8094         consistency with other archs.
8095
8096         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
8097
8098 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8099
8100         * debug-debugger.c: fix the build.
8101
8102 2006-05-17  Martin Baulig  <martin@ximian.com>
8103
8104         * debug-debugger.c
8105         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
8106         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
8107         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
8108         (debugger_attach): Call GC_mono_debugger_add_all_threads().
8109
8110 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
8111
8112         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
8113
8114 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
8115
8116         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
8117         MONO_TYPE_GENERICINST.
8118         
8119         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
8120         MONO_TYPE_GENERICINST.
8121
8122 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
8123
8124         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
8125         #78325.
8126
8127 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
8128
8129         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
8130         mempool.
8131         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
8132
8133 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
8134
8135         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
8136         mono_trace_cleanup ().
8137
8138         * iltests.il: Fix problem with the newly added test.
8139
8140         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
8141         due to register constraints, free up the previous hreg. Fixes #78314.
8142
8143         * iltests.il: Add new test for #78314.  
8144
8145         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
8146         Interlocked.Add. Fixes #78312.
8147
8148         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
8149         
8150 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
8151
8152         * inssel.brg (mini_emit_virtual_call): Fix a warning.
8153
8154 2006-05-05  Martin Baulig  <martin@ximian.com>
8155
8156         * debug-mini.c (mono_debug_open_block): New method.
8157
8158         * mini-amd64.c
8159         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8160         the beginning of each basic block.
8161
8162         * mini-x86.c
8163         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8164         the beginning of each basic block.
8165
8166 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8167
8168         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8169         default until I understand why they break the build on amd64.
8170
8171 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
8172
8173         * mini.c (mini_cleanup): Call mono_cleanup ().
8174
8175         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
8176         errors.
8177
8178 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8179
8180         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
8181         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8182         default since all known bugs are fixed, and I cannot reproduce bug
8183         77944... I'm asking Matt Hargett to test again after this commit.
8184
8185 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
8186
8187         * mini-codegen.c: Fixed typo that thrashed inline.
8188
8189 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
8190
8191         * dominators.c (compute_dominators): Avoid using a worklist since
8192         it is not correct in some cases. Instead, iterate over all bblocks as
8193         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
8194
8195 2006-04-28  Miguel de Icaza  <miguel@novell.com>
8196
8197         * mini.c (mono_jit_compile_method_inner): Use
8198         mono_prepare_exception_from_error that resets the value
8199         internally.
8200
8201 2006-04-27  Miguel de Icaza  <miguel@novell.com>
8202
8203         * mini.c: Move the mini_loader_error_to_exception to metadata. 
8204         
8205 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8206
8207         * aliasing.c: Fixed bug 78210.
8208
8209 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8210
8211         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8212         default until all their problems (or the ones they trigger) are fixed.
8213
8214 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
8215
8216         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
8217         
8218         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
8219         as loaded only after resolving patches since that could invoke the same method.
8220
8221         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
8222
8223         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
8224         functions.
8225
8226         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
8227         AOT loader.
8228
8229         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
8230         stack.
8231
8232         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
8233         made from AOT code through the PLT table.
8234
8235         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
8236         holding the plt offset when a call is made to the aot plt trampoline.
8237         
8238 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
8239
8240         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
8241         amd64 AOT support.
8242
8243         * Makefile.am (common_sources): Fix build breakage.
8244
8245         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
8246         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
8247         intra-assembly calls if possible.
8248         
8249         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
8250
8251         * mini-trampolines.c: Handle PLT entries.
8252
8253         * mini.c: Avoid creating a GOT var for calls.
8254
8255         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
8256         from mscorlib code.
8257
8258         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
8259         from mscorlib code.
8260
8261         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
8262         AOT code.       
8263
8264         * mini.h: Bump AOT file format version.
8265         
8266         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
8267         covers more cases.
8268
8269 2006-04-25  Martin Baulig  <martin@ximian.com>
8270
8271         * driver.c: Disable copyprop, consprop and inline when running
8272         inside the debugger.
8273
8274 2006-04-25  Martin Baulig  <martin@ximian.com>
8275
8276         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
8277         with `get_current_thread' and added `detach'.
8278         (MonoDebuggerMetadataInfo): Added `thread_size',
8279         `thread_tid_offset', `thread_stack_ptr_offset' and
8280         `thread_end_stack_offset'.
8281
8282 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
8283
8284         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
8285         aot-runtime.c.
8286
8287         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
8288         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
8289
8290         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
8291
8292         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
8293
8294         * aot.c: Add support for ADJUSTED_IID.  
8295
8296 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
8297
8298         * aot.c (emit_method_order): Don't align method_order_end.
8299
8300         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
8301         the interface ID changes.
8302
8303 2006-04-21  Dick Porter  <dick@ximian.com>
8304
8305         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
8306         cleaning up a thread.  Fixes the new part of bug 77470.
8307
8308 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
8309
8310         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
8311         to managed wrapper.
8312                      
8313 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
8314
8315         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
8316         
8317         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
8318         SIGSEGV. Fixes #78072.
8319
8320         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
8321         unregister our SIGABRT handler.
8322
8323 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
8324
8325         * mini.c: Disabled inline where it can alter the call stack in a
8326         way visible from managed code.
8327         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
8328         default.
8329
8330 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
8331
8332         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
8333         on other platforms. Fixes #78089.
8334
8335 2006-04-13  Martin Baulig  <martin@ximian.com>
8336
8337         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
8338         determine whether we're inside the debugger.
8339
8340         * debug-debugger.h
8341         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
8342
8343 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
8344
8345         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
8346         handler clauses. Fixes #78024.
8347
8348         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
8349         in the CALL_MEMBASE opcodes. Fixes #78088.
8350         (mono_arch_get_vcall_slot_addr): Ditto.
8351
8352 2006-04-10  Martin Baulig  <martin@ximian.com>
8353
8354         * debug-debugger.c: The thread handling code has now been moved
8355         into ../metadata/threads.c.
8356
8357 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
8358
8359         * driver.c (mono_main): Fix --with-gc=none build.
8360
8361         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
8362         (mono_spillvar_offset_float): Ditto.
8363         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
8364         hreg, not when its !global, since on ia64, there is a third category: stacked
8365         registers.      
8366
8367 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
8368
8369         * mini.c: set MonoInst->klass for load field address and a few other
8370         places.
8371
8372 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
8373
8374         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
8375
8376 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
8377
8378         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
8379         the branch opt changes.
8380
8381 2006-04-06  Dick Porter  <dick@ximian.com>
8382
8383         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
8384         
8385         * wapihandles.c (mini_wapi_seminfo): 
8386         * driver.c (mono_main): Add semaphore info option
8387
8388 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
8389
8390         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
8391         branch optimization changes. Fixes #78009.
8392
8393 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8394
8395         * mini.c: ignore accessibility of methods in managed->native wrappers.
8396
8397 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
8398
8399         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
8400         
8401         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
8402
8403 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
8404
8405         * mini.c: Modify the branch optimizations to preserve the invariant that
8406         the entries inside the in_bb and out_bb arrays are unique.
8407         (mono_unlink_bblock): Avoid creation of new arrays.
8408
8409 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
8410
8411         * mini.c (mono_unlink_bblock): Fix regression caused by previous
8412         change (#77992).
8413
8414 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
8415
8416         * mini.c (optimize_branches): Remove the "optimizations" in
8417         the cbranch1/cbranch2 -> branch cases which were causing several
8418         problems in the past. Fixes #77986.
8419
8420 2006-03-31  Chris Toshok  <toshok@ximian.com>
8421
8422         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
8423         default optimizations :(
8424
8425 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
8426
8427         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
8428         branch.
8429
8430 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
8431
8432         * local-propagation.c: Added comments to structs and removed
8433         "Mono" prefixes from local tree mover types.
8434
8435 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
8436
8437         * Makefile.am (arch_sources): Define this for each architecture so 
8438         libmono_la_SOURCES is defined in one place.
8439
8440 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
8441
8442         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
8443         from handles/.
8444
8445 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
8446
8447         * driver.c: print the GC name supplied by configure.
8448
8449 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
8450
8451         * local-propagation.c: Added tree mover, and moved here all the
8452         local propagation code from mini.c
8453         * mini.c: Added support for treeprop, and moved all the local
8454         propagation code to local-propagation.c
8455         * mini.h: Added support for treeprop
8456         * driver.c: Added support for treeprop, enabled consprop, copyprop,
8457         treeprop, inline and deadce by default
8458         * Makefile.am: Added local-propagation.c
8459
8460 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
8461
8462         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
8463
8464 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
8465
8466         * debug-debugger.c: make it compile without the Boehm GC.
8467
8468 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8469
8470         * mini.c: fixed issue with mismatch when an icall is registered
8471         with multiple names but same address.
8472
8473 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8474
8475         * declsec.c, mini-exceptions.c: use write barrier to set reference
8476         fields of managed objects.
8477
8478 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
8479
8480         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
8481         (can_access_internals): Fix a warning.
8482
8483         * mini.c (print_method_from_ip): Rename this to 
8484         mono_print_method_from_ip so it gets exported.
8485
8486         * trace.c: Deal with strings inside StringBuilder's containing garbage
8487         and fix memory leaks. Fixes #77848.
8488
8489 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
8490
8491         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
8492         fixes #77787.
8493
8494 2006-03-16 Neale Ferguson <neale@sinenomine.net>
8495         
8496         * mini-s390.c: Remove OP_X86_TEST_NULL.
8497
8498 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8499
8500         * mini.c: use the correct GetHashCode() for the moving collector.
8501
8502 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
8503
8504         * liveness.c: Regalloc spill cost tuning.
8505
8506 2006-03-15 Neale Ferguson <neale@sinenomine.net>
8507         
8508         * mini-s390x.h: Correct S390_LONG macro.
8509
8510         * mini-s390x.c: Cleanup unused code.
8511
8512 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
8513
8514         * jit-icalls.h: New file.
8515
8516         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
8517         icalls and include that instead of including jit-icalls.c.
8518
8519         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
8520         OP_X86 opcodes.
8521
8522 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
8523
8524         * mini.c: when checking for member accessibility, also check for
8525         friend assemblies and for explicit interface implementations.
8526
8527 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
8528
8529         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
8530
8531         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
8532
8533         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8534         common cases are done first.    
8535
8536         * mini-ops.h: Only define platform specific opcodes on the given platform.
8537
8538         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
8539         branch.
8540         
8541 2006-03-14  Martin Baulig  <martin@ximian.com>
8542
8543         Revert Paolo's change from r57348:
8544
8545         * mini.h: don't use gboolean for bitfields.
8546         * mini.c: verifier changes for fields and methods accessibility.
8547
8548 2006-03-13  Neale Ferguson <neale@sinenomine.net>
8549
8550         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
8551
8552         * mini-s390x.c: Fix conv_r_un.
8553
8554         * cpu-s390, cpu-s390x.md: Fix lengths.
8555
8556 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
8557
8558         * mini.c: nested types have access to all the nesting
8559         levels, not just the enclosing types.
8560
8561 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
8562
8563         * mini.c: added a few more verification checks.
8564
8565 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
8566
8567         * liveness.c: Merge optimizations from the linear-il branch.
8568
8569 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8570
8571         * mini-ia64.c (emit_call): Add a comment.
8572
8573         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
8574
8575         * tramp-ia64.c: Fix some warnings.
8576
8577 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
8578
8579         * mini.h: don't use gboolean for bitfields.
8580         * mini.c: verifier changes for fields and methods accessibility.
8581
8582 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
8583
8584         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
8585         lazy icall wrapper changes.
8586
8587         * dominators.c: Replace all the dominator algorithms with faster
8588         ones from the linear-il branch.
8589
8590         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
8591         the mempool.
8592
8593         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8594         common cases are done first.
8595
8596         * mini-amd64.c: Fix some warnings.
8597
8598         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
8599         from the mempool.
8600
8601         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
8602         added code.
8603
8604         * mini.h: Add a missing prototype.
8605
8606 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
8607
8608         * mini.c: Compile icall wrappers lazily.
8609
8610         * mini-codegen.c: Use printf instead of g_print since its much faster.
8611
8612         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
8613         function.
8614
8615         * mini.c (optimize_branches): Cache the negative result from 
8616         remove_block_if_useless ().
8617
8618         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
8619         Also fix some bblock linking issues.
8620
8621         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
8622         assembly files.
8623
8624         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
8625
8626         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
8627         accessed fields first, for better cache behavior.
8628         
8629 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8630
8631         * mini.c: speedup IList<T> array accesses.
8632
8633 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
8634
8635         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
8636         inline_costs counter. Fixes #77190.
8637
8638 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
8639
8640         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
8641         trace messages. Fixes #77706.
8642
8643 2006-03-04  Martin Baulig  <martin@ximian.com>
8644
8645         * tramp-amd64.c, tramp-x86.c
8646         (mono_debugger_create_notification_function): Use
8647         mono_global_codeman_reserve() to allocate a buffer at runtime and
8648         return it.
8649
8650         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
8651
8652         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
8653         notification function at runtime and then call `initialize' in the
8654         `MONO_DEBUGGER__debugger_info' vtable.
8655
8656 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
8657
8658         * iltests.il: Fix a visibility problem.
8659
8660 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8661
8662         * driver.c, mini.c: add hooks for the counters API.
8663
8664 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8665
8666         * driver.c: show disabled options.
8667
8668 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8669
8670         * linear-scan.c: always use cost-driven selection.
8671
8672 2006-02-28  Raja R Harinath  <rharinath@novell.com>
8673
8674         * jit-icalls.c (helper_compile_generic_method): Revert change from
8675         2006-02-24.
8676
8677 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
8678
8679         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
8680
8681 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
8682
8683         * inssel.brg: style fixes, mostly to force the updated monoburg
8684         to run for people using svn.
8685
8686 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
8687
8688         * mini.c: match monoburg changes.
8689
8690 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8691
8692         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
8693         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
8694         declaration in the header file.
8695
8696 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8697
8698         * helpers.c: reduce relocations and mem usage.
8699
8700 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
8701
8702         * mini.h, mini-codegen.c: disable logging features if
8703         requested by configure.
8704
8705 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
8706
8707         * mini.c: tiny verifier changes.
8708
8709 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8710
8711         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
8712         cpu-pentium.md: stack alignment changes for osx/x86,
8713         partially from Geoff Norton <gnorton@customerdna.com>.
8714
8715 2006-02-24  Raja R Harinath  <harinath@gmail.com>
8716
8717         * jit-icalls.c (helper_compile_generic_method): Update to changes
8718         in metadata/class.c.
8719
8720 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
8721         
8722         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
8723         
8724         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
8725         interface calls with large offsets.
8726
8727 2006-02-23  Raja R Harinath  <rharinath@novell.com>
8728
8729         * jit-icalls.c (helper_compile_generic_method): Document the
8730         special-case we depend on so that we can inflate the method twice
8731         with the same context with no bad side-effects.
8732
8733 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
8734
8735         * mini-x86.c, mini-amd64.c: fix for case when xen support
8736         is disabled.
8737
8738 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
8739
8740         * mini-x86.c, mini-amd64.c: generate code to access tls items
8741         in a faster way for Xen systems.
8742
8743 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8744
8745         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
8746         updates and compilation fixes for the OSX/x86 port, mostly from
8747         Geoff Norton <gnorton@customerdna.com>.
8748
8749 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8750
8751         * inssel.brg: faster interface call implementation
8752         to sync with the interface_offsets MonoVTable changes.
8753
8754 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8755
8756         * mini.c: more verification checks.
8757
8758 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
8759
8760         * mini.c: added a few more verification checks.
8761
8762 2006-02-17      Neale Ferguson <neale@sinenomine.net>
8763
8764         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
8765         facility on the processor and use it if available.
8766
8767 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8768
8769         * driver.c, aot.c, mini.c: throw exception if the IL code is
8770         invalid or unverifiable.
8771
8772 2006-02-17  Raja R Harinath  <rharinath@novell.com>
8773
8774         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
8775         m.StructField.
8776
8777 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
8778
8779         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
8780
8781 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8782
8783         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
8784         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
8785         handling of instantiated generic valuetypes.
8786
8787 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
8788
8789         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
8790         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
8791         instead.
8792
8793         * generics.2.cs: Revert the nullable reftypes tests.
8794
8795 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
8796
8797         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
8798         using __builtin_frame_address (1) as it doesn't work in the presence
8799         of optimizations. Hopefully fixes #77273.
8800
8801         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
8802         -> generics.cs change as it doesn't work with some automake versions.
8803
8804 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8805
8806         * mini.c: handle systems that sue a different way to
8807         retrieve the stack address of the current thread.
8808
8809 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
8810
8811         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
8812         it specially in the makefile.
8813
8814         * generics.2.cs: Add tests for nullable reference types.
8815
8816 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8817
8818         * mini.c: always handle the case when mono_jit_init()
8819         is called in a thread different from the main thread,
8820         confusing libgc (bug #77309).
8821
8822 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
8823
8824         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
8825
8826 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8827
8828         * mini.c: change optimize_branches () to use a single loop
8829         and introduce a new optimization to simplify some range checks.
8830
8831 2006-02-03  Martin Baulig  <martin@ximian.com>
8832
8833         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
8834         and merged with debugger_thread_manager_add_thread().
8835         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
8836         inform the debugger about the main thread.
8837
8838 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8839
8840         * basic.cs: Add test for div.un/rem.un constant folding.
8841
8842 2006-02-03  Neale Ferguson <neale@sinenomine.net>
8843
8844         * cpu-s390x.md: correct int_xor_imm length
8845
8846 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8847
8848         * generics.2.cs: New test for #77442.
8849
8850         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
8851         #77442.
8852
8853 2006-02-02  Martin Baulig  <martin@ximian.com>
8854
8855         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
8856         <mono/metadata/mono-debug-debugger.h>   
8857
8858         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
8859
8860 2006-02-02  Martin Baulig  <martin@ximian.com>
8861
8862         * debug-debugger.h: New header file for debug-debugger.c.
8863
8864         * debug-debugger.c: Big API cleanup; don't run the managed Main()
8865         function is a separate thread anymore; add support for attaching.
8866
8867 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
8868
8869         * tramp-x86.c: Fix a warning.
8870
8871 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
8872
8873         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
8874         on very large methods.
8875
8876         * aot.c (load_patch_info): Fix a warning.
8877
8878 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
8879
8880         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
8881         mini-ops.h: alu membase optimizations.
8882
8883 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
8884
8885         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
8886         to speedup StringBuilder.
8887
8888 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
8889
8890         * dominators.c (mono_compute_natural_loops): Fix detection of
8891         loop body start blocks.
8892
8893         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
8894
8895 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
8896
8897         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
8898         #75145.
8899
8900 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
8901
8902         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8903
8904 2006-01-25  Martin Baulig  <martin@ximian.com>
8905
8906         * debug-debugger.c: Moved the `MonoDebuggerManager' and
8907         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
8908         started to cleanup this file a little bit.
8909
8910 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
8911
8912         * mini.c: optimize a codepath frequently happening in generics code.
8913
8914 2006-01-23  Martin Baulig  <martin@ximian.com>
8915
8916         * Makefile.am: Only compile debug-debugger.c on supported platforms.
8917
8918         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
8919         functions directly.
8920
8921         * driver.c: debug-debugger.c is only available if
8922         `MONO_DEBUGGER_SUPPORTED' is defined.   
8923
8924 2006-01-23  Martin Baulig  <martin@ximian.com>
8925
8926         * debug-debugger.c: Only enable this on platforms where the Mono
8927         Debugger is working (x86 and x86_64).
8928
8929 2006-01-21  Martin Baulig  <martin@ximian.com>
8930
8931         The Mono Debugger is now using the normal `mono' instead of the
8932         `mono-debugger-mini-wrapper' when executing managed code.
8933
8934         * debug-debugger.c: New file; previously known as
8935         debugger/wrapper/wrapper.c.
8936
8937         * debug-mini.c (mono_init_debugger): Removed.
8938
8939         * driver.c (mono_main): Added new `--inside-mdb' command line
8940         argument which is used when running inside the debugger.
8941
8942 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
8943
8944         * liveness.c (mono_analyze_liveness): Remove some unused data
8945         structures.
8946
8947 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
8948
8949         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
8950
8951 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
8952
8953         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
8954         depends on implementation details of monobitset.
8955
8956         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
8957         Fixes #77271.
8958
8959 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
8960
8961         * liveness.c: Update after monobitset changes.
8962
8963 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
8964
8965         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
8966
8967 2006-01-11 Neale Ferguson <neale@sinenomine.net>
8968
8969         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
8970
8971         * mini-s390x.c: Remove warning messages.
8972
8973 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
8974
8975         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
8976
8977 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
8978
8979         * generics.2.cs: Add ldelem/stelem_any test.
8980
8981 2006-01-10 Neale Ferguson <neale@sinenomine.net>
8982
8983         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
8984
8985 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
8986
8987         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
8988         
8989 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
8990
8991         * generics.2.cs: Reenable vtype tests.
8992
8993         * inssel-x86.brg: Remove an icorrect valuetype rule.
8994
8995 2006-01-06 Neale Ferguson <neale@sinenomine.net>
8996
8997         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
8998         initial support for OP_ABS.
8999
9000 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9001
9002         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
9003
9004 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9005
9006         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
9007         conversion and implement LADD/LSUB.
9008
9009         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
9010         architectures.
9011
9012 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9013
9014         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
9015
9016         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
9017         architectures.
9018
9019 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9020
9021         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
9022         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
9023         (stack walk problem).
9024
9025 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
9026
9027         * aot.c (mono_aot_load_method): Fix a warning.
9028
9029 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9030
9031         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
9032
9033 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9034
9035         * iltests.il: Add test for #77148.
9036
9037         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
9038         #77148.
9039
9040 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9041
9042         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
9043
9044 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9045
9046         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
9047         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
9048
9049         * basic-long.cs: Add lconv-to-r4/r8 tests.
9050
9051 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9052
9053         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
9054
9055         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
9056         here as on other archs.
9057
9058 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9059
9060         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
9061
9062 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9063
9064         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
9065         
9066         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
9067
9068         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
9069         instrument_prolog; Add memory_barrier instruction.
9070
9071 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
9072
9073         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
9074
9075 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
9076
9077         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
9078
9079         * aliasing.c inssel.brg: Fix warnings.
9080
9081         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
9082         could skip initialization of some parts of memory.
9083
9084         * mini.c mini-ia64.c: Fix warnings.
9085
9086         * inssel-sparc.brg: Add an implementation of lneg which actually works.
9087
9088 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
9089
9090         * aliasing.c (mono_build_aliasing_information): Add a workaround for
9091         a crash seen on sparc.
9092
9093         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
9094         
9095         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
9096
9097 2005-12-21 Neale Ferguson <neale@sinenomine.net>
9098
9099         * mini-ops.h: Add s390_backchain instruction
9100
9101         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
9102
9103         * cpu-s390.md: Add s390_backchain instruction
9104
9105         * mini-s390.c: Significant ABI changes
9106
9107         * mini-s390.h: Cater for zero length structures
9108
9109 2005-12-20 Neale Ferguson <neale@sinenomine.net>
9110
9111         * mini-s390.c: ABI fixes
9112
9113         * inssel-s390.brg: Remove debug statements
9114
9115         * cpu-s390.md: Fix length of ATOMIC_xx operations
9116
9117 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
9118
9119         * basic-float.cs: Add float<->long conversion tests.
9120
9121 2005-12-16 Neale Ferguson <neale@sinenomine.net>
9122
9123         * mini-s390.c: Fix LOCALLOC processing.
9124
9125         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
9126
9127 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
9128
9129         * iltests.il: Add tests for some opcodes not covered by the other
9130         tests.
9131
9132 2005-12-15 Neale Ferguson <neale@sinenomine.net>
9133
9134         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
9135         register loading for Tail processing; Correct trace output.
9136
9137         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
9138
9139         * cpu-s390.md: Correct size of jmp instruction. 
9140
9141 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9142
9143         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
9144
9145 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9146
9147         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
9148           Bring s390 up to current level.
9149
9150 2005-12-12  Zltan Varga  <vargaz@gmail.com>
9151
9152         * generics.2.cs: Disable the newly added tests as they do not work yet.
9153         
9154         * generics.2.cs: Add valuetype tests.
9155
9156 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
9157
9158         * basic-long.cs: Add i4->u8 test.
9159
9160         * objects.cs: Add tests for JIT intrinsic.
9161
9162         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
9163         optimizations lost by a mistake.
9164
9165 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
9166
9167         * basic-long.cs: Remove a test moved to objects.cs.
9168
9169         * arrays.cs: Add more array tests.
9170
9171 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
9172
9173         * arrays.cs: Add new tests for multi-dimensional arrays.
9174
9175 2005-12-06  Raja R Harinath  <rharinath@novell.com>
9176
9177         * Makefile.am (test_sources2): Add generics.2.cs.
9178         (EXTRA_DIST): Add test_sources2.
9179
9180 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
9181
9182         Support for boxing and unboxing nullable types as well as the
9183         isinst operation on nullables, per the CLI ammendment.
9184
9185         * inssel.brg (CEE_ISINST): Special case for nullable
9186
9187         * mini.c (handle_unbox_nullable): new method
9188         (handle_box): Special case for nullable types
9189         (mono_method_to_ir): Call handle_unbox_nullable in correct
9190         places.
9191
9192         * generics.2.cs: New test suite
9193
9194         * Makefile.am: Support for regression tests with generics.
9195
9196 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
9197
9198         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
9199         allocated to registers. Fixes #76800.
9200
9201 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
9202
9203         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
9204
9205 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
9206
9207         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
9208         of platforms.
9209
9210 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
9211
9212         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
9213         objects.cs.
9214
9215         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
9216         
9217         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
9218 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
9219
9220         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
9221         single precision before storing to a single precision location.
9222
9223 2005-11-28  Raja R Harinath  <rharinath@novell.com>
9224
9225         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
9226
9227 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
9228
9229         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
9230         correct files.
9231
9232         * basic.cs: Remove test_0_byte_compares test which was moved to
9233         objects.cs a long time ago.
9234
9235 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
9236
9237         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9238
9239 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
9240
9241         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
9242         handlers are called.
9243
9244         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
9245         throwing code.
9246
9247          * mini-ia64.c: Add support for the throw->branch exception 
9248         optimization.   
9249
9250         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
9251
9252 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9253
9254         * mini.c: Enabled "fastpath" deadce :-)
9255         
9256 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9257
9258         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
9259         alias analysis pass to support it.
9260         * mini.h: Likewise.
9261         * ssa.c: Likewise.
9262         * liveness.c: Likewise (liveness computation can use aliasing
9263         information to be more accurate).
9264         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
9265         moreover made so that "--compile-all" uses the given optimization
9266         flags and not the default ones.
9267         * aliasing.c: Alias analysis (new file).
9268         * aliasing.h: Likewise.
9269         * Makefile.am: added "aliasing.c" and "aliasing.h".
9270         
9271 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
9272
9273         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
9274         OP_L opcodes.
9275
9276 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
9277
9278         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
9279         fp >= end_of_stack exit condition, as it is not needed, and it might
9280         become true for fp eliminated frames.
9281
9282 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
9283
9284         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
9285         coded offsets.
9286
9287 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
9288
9289         * mini-arm.c: fixed alignment of doubles/longs to match
9290         the C ABI (bug #76635).
9291
9292 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
9293
9294         * aot.c: fix compilation with --enable-minimal=aot.
9295
9296 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
9297
9298         * mini-arm.c: fixed compatibility with the new
9299         floating point emulator package for compares.
9300
9301 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
9302
9303         * mini.c : reverted sig->pinvoke changes (r51396-51397).
9304
9305 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
9306
9307         * mini-exceptions.c (print_stack_frame): Output to stderr.
9308         (mono_handle_native_sigsegv): Ditto.
9309
9310 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
9311
9312         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
9313         OP_LCONV_TO_OVF_I implementation.
9314
9315         * mini-amd64.c: Add support for the throw->branch exception 
9316         optimization.
9317
9318         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
9319         when the catch clause catches a more general exception, i.e. Object.
9320
9321 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
9322
9323         * cpu-ia64.md: Remove unused opcodes.
9324
9325         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
9326         specific defines for architectures defining USE_SIGACTION.
9327
9328         * mini-ia64.c: Fix some warnings.
9329
9330         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
9331         version seemed to skip a frame.
9332
9333 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
9334
9335         * mini.c: Clean up the usage of sig->pinvoke flag. Now
9336         only calls which are made to native code use this flag.
9337
9338 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
9339
9340         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
9341         varargs methods as well.
9342         
9343         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
9344         which have save_lmf set. Reorganize methods prologs a bit.
9345
9346         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
9347         debugger to the proper place.
9348
9349 2005-10-29  Martin Baulig  <martin@ximian.com>
9350
9351         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
9352         when running inside the debugger until the debugger has support
9353         for it.
9354
9355 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
9356
9357         * mini.h: Fix a warning.
9358
9359 2005-10-24  Miguel de Icaza  <miguel@novell.com>
9360
9361         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
9362         we expose publicly, this returns the string.
9363
9364 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
9365
9366         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
9367         with fp elimination.
9368
9369 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
9370
9371         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
9372         native stacktrace using the glibc 'backtrace' function if available.
9373
9374 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
9375
9376         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
9377
9378         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
9379         handle SIGSEGVs received while in native code.
9380
9381         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
9382         code, call mono_handle_native_sigsegv which will abort the runtime
9383         after printing some diagnostics, instead of converting it into a
9384         confusing NullReferenceException.
9385
9386 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
9387
9388         * cpu-pentium.md: Remove unused opcodes.
9389
9390 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
9391
9392         * mini-amd64.h (MonoLMF): Add rsp field.
9393
9394         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
9395         the lmf too.
9396
9397 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
9398
9399         * mini-codegen.c (get_register_spilling): Fix some warnings.
9400
9401 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
9402
9403         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
9404         elimination during exception handling. Enable fp elimination by
9405         default.
9406
9407         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
9408         elimination.
9409
9410 2005-10-16  Martin Baulig  <martin@ximian.com>
9411
9412         * mini-exceptions.c
9413         (mono_debugger_run_finally): New public method for the debugger.
9414
9415 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
9416
9417         * debug-mini.c (mono_debug_init_method): Fix warning.
9418
9419         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
9420         the 'exname' parameter const to fix some warnings.
9421
9422 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
9423
9424         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
9425         introduced by the previous patch.
9426
9427 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
9428
9429         * basic-float.cs: Add test for precision of float arithmetic.
9430
9431         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
9432         when loading/storing single values from/to memory.
9433
9434         * mini.c (mono_jit_compile_method_with_opt): Create the function
9435         pointers in the correct domain.
9436
9437 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
9438
9439         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
9440         introduced by previous patch.
9441         
9442         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
9443         when out_filter_idx is NULL.
9444
9445         * mini-exceptions.c: Don't run filter clauses twice during exception
9446         handling. Fixes #75755.
9447
9448 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
9449
9450         * aot.c: Add support for ldflda wrappers.
9451
9452         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
9453         #75902.
9454
9455 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
9456
9457         * mini.c, mini.h: do not consider exception handlers blocks when
9458         setting up interface variables.
9459
9460 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
9461
9462         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
9463
9464 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
9465
9466         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
9467         causes a regression.
9468
9469         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
9470
9471 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
9472
9473         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
9474         of the OP_P definitions.
9475
9476         * TODO: Add a proposal for dealing with the CEE/OP mess.
9477
9478         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
9479         optimizations from the x86 port.
9480
9481         * cpu-amd64.md: Ditto.
9482
9483         * basic.cs basic-long.cs: Add tests.
9484
9485 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
9486
9487         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
9488         Patrik Torstensson's implementation of my exception-handling
9489         optimization idea, when the exception object is not used
9490         (bug #62150).
9491
9492 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
9493
9494         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
9495         of the mul_imm optimizations from the old jit.
9496
9497 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
9498
9499         * mini.c, liveness.c: patch by Patrik Torstensson and
9500         Zoltan Varga to improve performance in methods with
9501         exception clauses.
9502
9503 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
9504
9505         * driver.c: Remove 'Globalization' entry from --version.
9506
9507 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
9508
9509         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
9510         there is a profiler interested in JIT events.
9511
9512         * aot.c: Load profile files produced by the AOT profiling module, and
9513         reorder methods based on the profiling info. Add a 'method_order' table
9514         to the AOT file to make mono_aot_find_jit_info work with the reordered
9515         methods.
9516
9517         * mini.h: Bump AOT file version info.
9518
9519 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
9520
9521         * mini-arm.h: work around what looks like a gcc bug when optimizations
9522         are enabled.
9523
9524 2005-09-28  Raja R Harinath  <rharinath@novell.com>
9525
9526         * Makefile.am (AM_CFLAGS): Don't use += to append inside
9527         conditionals.  Use ...
9528         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
9529
9530 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
9531
9532         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
9533         to determine the amount of memory to copy when passing valuetypes.
9534
9535         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
9536         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
9537
9538 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
9539
9540         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
9541         information about aot.
9542
9543 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
9544
9545         * *.c: Replace the use of {Enter,Leave}CriticalSection with
9546         macros. This will allow a deadlock debugger to easily be plugged
9547         in.
9548
9549 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
9550
9551         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
9552
9553 2005-09-27  Raja R Harinath  <rharinath@novell.com>
9554
9555         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
9556         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
9557         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
9558         ($(arch_built)) [CROSS_COMPILING]: Error out.
9559
9560 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
9561
9562         * aot.c: Add support for the no_special_static flag for classes.
9563
9564 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9565
9566         * Reapply reverted patches.
9567
9568         * *: Revert r50174 as well.
9569
9570         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
9571
9572 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
9573
9574         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
9575
9576 2005-09-23  Miguel de Icaza  <miguel@novell.com>
9577
9578         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
9579         part of the SIG_HANDLER_SIGNATURE.  
9580
9581 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
9582
9583         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
9584         statistics.
9585
9586         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
9587         introduced by previous patch.
9588
9589 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
9590
9591         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
9592         saved registers too.
9593
9594         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
9595         upon the information returned by get_call_info ().
9596         
9597         * mini-x86.c (add_float): Fix stack size calculation.
9598         (mono_arch_call_opcode): Rewrite this so it works based up the
9599         information returned by get_call_info ().
9600         (mono_arch_get_this_vret_args): Ditto.
9601
9602 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
9603
9604         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
9605         in cinfo to determine the registers which need to be used.
9606
9607 2005-09-20  Miguel de Icaza  <miguel@novell.com>
9608
9609         * driver.c (mono_main): Add --server and --desktop flags. 
9610
9611 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
9612
9613         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
9614         registers as global registers.
9615
9616         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
9617         longer needed with the new register allocator.
9618
9619         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
9620
9621         * cpu-ia64.md: Remove unused opcodes.
9622         
9623         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
9624         
9625 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
9626
9627         * cpu-amd64.md: Remove unused opcodes.
9628
9629         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
9630         needed with the new register allocator.
9631
9632         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
9633         reg-reg moves.
9634
9635 2005-09-16  Raja R Harinath  <rharinath@novell.com>
9636
9637         * Makefile.am (check-local): Don't invoke semdel-wrapper.
9638
9639 2005-09-16  Martin Baulig  <martin@ximian.com>
9640
9641         * exceptions-amd64.c
9642         (throw_exception): Don't call mono_debugger_throw_exception() if
9643         we're a rethrow - see the FIXME in the code.
9644
9645 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
9646
9647         * mini.c (mono_init_exceptions): This only works on some architectures.
9648         
9649 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9650
9651         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
9652         on ia64.
9653
9654         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
9655
9656         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
9657         now in mini-exceptions.c.
9658
9659 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
9660
9661         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
9662         now in mini-exceptions.c.
9663
9664 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9665
9666         * exceptions-x86.c: Applied patch from Patrik Torstensson 
9667         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
9668
9669         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
9670         code into mini-exceptions.c. Add some assertions to it.
9671
9672 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
9673
9674         * aot.c (emit_section_change): Applied patch from "The Software Team" 
9675         (<software@solmersa.com>). Fix as errors on windows.
9676
9677 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9678
9679         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
9680         method info into the LMF.
9681
9682 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9683         
9684         * mini-ia64.c: Add proper unwind info for method epilogs.
9685
9686         * exceptions-ia64.c: Add some code to help debugging.
9687         
9688         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
9689
9690         * mini-exceptions.c: Fix warning.
9691
9692 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9693
9694         * mini.c: Really fix build.
9695
9696         * mini-x86.c mini-amd64.c: Fix build.
9697
9698 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9699
9700         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
9701
9702         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
9703         some Interlocked methods as intrinsics.
9704
9705         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
9706         for Thread methods as well.
9707
9708         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
9709
9710         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
9711
9712         * mini-ia64.c mini-x86.c mini-amd64.c 
9713         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
9714         OP_MEMORY_BARRIER.
9715         
9716         * mini.c (mono_init_exceptions): Fix build breakage.
9717
9718 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
9719
9720         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
9721         of instructions. Use the new ia64_unw_op macros for emitting unwind
9722         info.
9723
9724         * mini.c (mono_init_exceptions): Initialize exception handling
9725         related trampolines at startup.
9726
9727 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
9728
9729         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
9730
9731 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
9732
9733         * mini.c: Handle type loading errors gracefully during compilation and
9734         throw the appropriate exception.
9735
9736 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
9737
9738         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
9739         for the mono binary.
9740
9741 2005-09-09  Martin Baulig  <martin@ximian.com>
9742
9743         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
9744         the release.
9745
9746 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9747
9748         * mini-arm.h: use emulation for conv.r.un for the release.
9749
9750 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9751
9752         * mini-arm.c, objects.cs: more fixes and tests for them.
9753
9754 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9755
9756         * mini-arm.c: align structures to at least 4 bytes to be able
9757         to keep our current optimized memcpy.
9758
9759 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
9760
9761         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
9762
9763 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9764
9765         * mini.c: ignore SIGPIPE.
9766
9767 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
9768
9769         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
9770
9771         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
9772
9773 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
9774
9775         * mini.h: Add prototype for mono_allocate_stack_slots_full.
9776
9777 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9778
9779         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
9780         exception handling support.
9781         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
9782         patch by Brian Koropoff <briank@marakicorp.com>).
9783
9784 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
9785
9786         * mini.c: revert another 'optimization' which breaks when
9787         items on the eval stack need to be saved at a basic block end
9788         (bug #75940).
9789
9790 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9791
9792         * jit-icalls.c: for arrays, ensure we always provide
9793         lower bounds.
9794
9795 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
9796
9797         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
9798         
9799         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
9800
9801 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
9802
9803         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
9804         arguments in their original register.
9805
9806 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
9807
9808         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
9809         memset/memcpy.
9810
9811         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
9812         when ssapre is enabled.
9813
9814         * inssel-long.brg: Fix bug in previous patch.
9815
9816         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
9817         multiplication by a constant.
9818
9819 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
9820
9821         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
9822         icc.
9823
9824         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
9825         saving registers.
9826
9827 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
9828
9829         * inssel-arm.brg: apply changes tested by Brian Koropoff
9830         <briank@marakicorp.com>.
9831
9832 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
9833
9834         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
9835         
9836 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
9837
9838         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
9839         to the same register if dreg is just a base register.
9840         (print_ins): Improve printing of membase opcodes.
9841
9842         * inssel-x86.brg: Add optimized ldind(reg) rules.
9843
9844         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
9845
9846 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
9847
9848         * mini.c: when running under valgrind, set the stack bottom for
9849         the GC at the actual approximate stack for the app (fixes running
9850         mono with valgrind).
9851
9852 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
9853
9854         * mini.c: do no break at the first valuetype to init found
9855         (fixes bug #75791).
9856
9857 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
9858
9859         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
9860
9861 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
9862
9863         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
9864
9865 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
9866
9867         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
9868
9869 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9870
9871         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
9872
9873         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
9874         code.
9875
9876         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
9877         code.
9878
9879         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
9880         methods.
9881
9882 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
9883
9884         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
9885
9886 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9887
9888         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
9889         in the tail recursion optimization.
9890
9891         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
9892         debug info into the assembly file.
9893
9894         * iltests.il: Add test for filter regions.
9895
9896         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
9897         initial stack of filter regions. Fixes #75755.
9898
9899 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
9900
9901         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
9902         stack requirements.
9903
9904 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9905
9906         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
9907         the check for an already compiled method on non-ia64 platforms.
9908         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
9909         proper domain.
9910
9911         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
9912
9913         * inssel-x86.brg: Add some optimized call rules.
9914
9915 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
9916
9917         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
9918         method here.
9919
9920         * mini.h mini-trampolines.c: Pass the trampoline argument to 
9921         mono_arch_patch_delegate_trampoline.
9922
9923         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
9924
9925         * mini-trampolines.c: Fix build.
9926
9927         * mini-amd64.h: Add delegate trampolines.
9928
9929         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
9930
9931         * inssel-amd64.brg: Add optimized call rules.
9932         
9933         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
9934
9935         * inssel-ia64.brg: Add optimized ldind(reg) rules.
9936
9937 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
9938
9939         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
9940         change.
9941
9942         * mini-ia64.c: Remove LMF fixmes.
9943
9944         * mini-ia64.h: Remove most fields from LMF.
9945
9946         * inssel-ia64.brg (stmt): Fix unaligned access errors.
9947
9948         * mini-trampolines.c: Add support for IA64 function descriptors.
9949
9950         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
9951         for IA64 function descriptors.
9952
9953 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
9954
9955         * tramp-arm.c: patch the vtable for virtual calls. Added
9956         support code to register/unregister the LMF.
9957         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
9958         more LMF work.
9959
9960 2005-08-19  Dick Porter  <dick@ximian.com>
9961
9962         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
9963         bit value if needed.
9964
9965 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
9966
9967         * mini.c (mini_get_method): Move handling of wrapper data here.
9968
9969         * mini.c (mono_method_to_ir): Add support for dynamic methods.
9970
9971         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
9972         virtual.
9973
9974         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
9975         bblock->code does not remain empty.
9976
9977 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
9978
9979         * arrays.cs: Add regression test for #75832.
9980
9981         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
9982         rules. Fixes #75832.
9983
9984         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
9985         instruction scheduling.
9986
9987 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
9988
9989         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
9990
9991 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
9992
9993         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
9994
9995         * mini-codegen.c: Fix VC build.
9996
9997         * cpu-pentium.md: Increase length of atomic_exhange_i4.
9998
9999 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10000
10001         * mini.h: fix signature for mono_register_opcode_emulation.
10002
10003 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
10004
10005         * mini.c: Get rid of most of the helper_sig_... constants using
10006         mono_create_icall_signature ().
10007
10008 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
10009
10010         * jit-icalls.c (helper_ldstr): New helper function.
10011
10012         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
10013
10014         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
10015         throw, load the string using a helper call instead of creating a string object.
10016
10017         * aot.c: Update after LDSTR changes.
10018
10019         * mini.h: Bump AOT file version.
10020         
10021         * aot.c: Save class size info into the AOT file. Print more statistics during
10022         compilation.
10023
10024         * mini.h: Bump AOT file version.
10025
10026         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
10027         ordering of disasm cases. Fixes #74957.
10028
10029 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
10030
10031         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
10032         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
10033         the generic code needed for the ARM port.
10034
10035 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
10036
10037         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
10038         inssel-arm.brg: more ARM features and fixes.
10039
10040 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
10041
10042         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
10043         ARM port work in progress.
10044
10045 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
10046
10047         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
10048
10049         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
10050
10051         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
10052
10053         * inssel.brg (mini_emit_memset): Add support for unaligned access.
10054
10055         * *-ia64.*: Ongoing IA64 work.
10056         
10057         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
10058
10059 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
10060
10061         * TODO: Remove out-of-data todo stuff.
10062
10063         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
10064         dead code.
10065
10066         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
10067
10068         * mini.h: Bump corlib version.
10069
10070 2005-07-27  Martin Baulig  <martin@ximian.com>
10071
10072         * mini-codegen.c
10073         (create_copy_ins): Added `const unsigned char *ip' argument; set
10074         `copy->cil_code' from it.
10075
10076 2005-07-27  Martin Baulig  <martin@ximian.com>
10077
10078         * mini-exceptions.c (mono_handle_exception): Don't call
10079         mono_debugger_handle_exception() for filters.
10080
10081 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
10082
10083         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
10084         as well.
10085
10086 2005-07-26  Martin Baulig  <martin@ximian.com>
10087
10088         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
10089
10090         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
10091         helper_compile_generic_method() if the method is actually virtual
10092         and non-final.
10093
10094 2005-07-26  Martin Baulig  <martin@ximian.com>
10095
10096         * mini.c
10097         (trampoline_code): Renamed to `mono_trampoline_code' and made it
10098         public; this is now accessed directly by the debugger.
10099         (mono_generic_trampoline_code): Removed.
10100
10101         * debug-mini.c
10102         (mono_debug_init_method): Also add interncalls and wrappers.
10103
10104 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
10105
10106         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
10107
10108 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
10109
10110         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
10111
10112 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
10113
10114         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
10115
10116 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10117
10118         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
10119         getting TLS offsets on AMD64 too.
10120
10121 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
10122
10123         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
10124
10125 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
10126
10127         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
10128         inssel-arm.brg, mini-arm.h: ARM port work in progress.
10129
10130 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10131
10132         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
10133
10134         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
10135         to mini.c.
10136
10137         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
10138         mono_sparc_is_virtual_call ().
10139         
10140         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
10141
10142         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
10143         trampoline parameters.
10144
10145         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
10146         
10147         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
10148         to mono_arch_get_vcall_slot_addr.
10149
10150         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
10151         trampoline code.
10152
10153         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
10154
10155 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10156
10157         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
10158
10159 2005-07-19  Martin Baulig  <martin@ximian.com>
10160
10161         * exceptions-amd64.c (throw_exception): Call
10162         mono_debugger_throw_exception() here like we're doing it on i386.
10163
10164 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10165
10166         * mini-ia64.c: Add optimized TLS access support.
10167
10168 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
10169
10170         * mini-exceptions.c: Ongoing IA64 work.
10171
10172         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
10173
10174         * mini.c: Use the default optimization set when embedding. Fixes
10175         #75194.
10176
10177 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
10178
10179         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
10180         of trampolines to a separate file.
10181
10182         * mini-trampolines.c: New file.
10183
10184         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
10185         separate file.
10186         
10187         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
10188         amd64/ia64 code.
10189
10190         * mini-codegen.c: Fix cygwin build.
10191
10192 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
10193
10194         * mini.c: Add some minor changes needed by the IA64 port.
10195
10196         * *-ia64.*: Ongoing IA64 work.
10197
10198 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
10199
10200         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
10201         trampolines into arch-independent and arch-dependent parts.
10202
10203         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
10204
10205 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
10206
10207         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
10208
10209         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
10210         the xp-regalloc-branch for amd64.
10211
10212         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
10213         xp-regalloc-branch for x86.
10214
10215 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
10216
10217         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
10218
10219 2005-07-06  Martin Baulig  <martin@ximian.com>
10220
10221         * mini.c
10222         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
10223         (mono_jit_runtime_invoke): Likewise.
10224
10225 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
10226
10227         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
10228         on x86 too.
10229         
10230         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
10231         without loading their metadata. Reorganize the file format so exception handling+
10232         debug info is kept separate from normal method info. Create MonoJitInfo 
10233         structures for methods lazily.
10234
10235         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
10236         loading metadata.
10237         (x86_class_init_trampoline): Patch AOT class init trampolines too.
10238
10239         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
10240
10241         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
10242         in AOT code.
10243
10244         * mini.h: Bump AOT file version.
10245
10246 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
10247
10248         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10249
10250 2005-07-01  Raja R Harinath  <rharinath@novell.com>
10251
10252         * Makefile.am (check-local): Call semdel-wrapper.
10253
10254 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
10255
10256         * mini-x86.c: Revert the last change as it seems to break the build..
10257
10258 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
10259
10260         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10261         
10262         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
10263
10264 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
10265
10266         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
10267         outside of the macro, so strange stuff doesn't happen with gcc4
10268         (NEW_AOTCONST_TOKEN): Likewise.
10269
10270 2005-06-28  Martin Baulig  <martin@ximian.com>
10271
10272         * mini.c (mini_class_is_system_array): New static method; use this
10273         instead of `klass->parent == mono_defaults.array_class' everywhere
10274         since this also works for the new generic array class.
10275
10276 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
10277
10278         * inssel.brg: Remove warnings.
10279
10280 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
10281
10282         * mini-ia64.c: Ongoing IA64 work.
10283
10284         * basic-float.cs: Add float->i1 conversion test.
10285
10286         * iltests.il: Add conv.u4 test.
10287
10288 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
10289
10290         * inssel-long.brg: Fix bug caused by last change.
10291
10292 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
10293
10294         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
10295         BSDs.  Allows the x86 JIT to work on OSX86
10296
10297 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
10298
10299         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
10300         u4->i8 conversion.
10301
10302         * mini-ia64.c: Ongoing IA64 work.
10303
10304 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
10305
10306         * mini-ia64.c: Ongoing IA64 work.
10307
10308         * driver.c: Clean up jit_code_hash as well when using --regression.
10309
10310         * inssel-long.brg: Fix long->i4/u4 conversion rules.
10311
10312         * basic-long.cs: Add tests for long->u4 conversion.
10313
10314 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
10315
10316         * mini.c: Take mono_get_domainvar out of macros. This makes sure
10317         that we do not depend on undefined C behavior: the order stuff
10318         gets evaluated within an expression. Fixes mono when compiled on
10319         GCC 4.
10320
10321 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
10322
10323         * *-ia64.*: Ongoing IA64 work.
10324
10325         * aot.c: Lower memory usage while loading AOT methods.
10326
10327         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
10328
10329         * mini.h: Bump AOT file format version.
10330
10331 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
10332
10333         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
10334
10335 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
10336
10337         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
10338         not on callee assembly). Fixed some comments.
10339
10340 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
10341
10342         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
10343         it gets proper disassembly.
10344         (emit_method_info): Remove some dead code.
10345
10346         * mini.c (mini_method_compile): Allways allocate the GOT var in
10347         mono_method_to_ir for emulating opcodes.
10348
10349 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
10350
10351         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
10352         before freeing the code memory. Fixes #74990.
10353
10354         * objects.cs: Add regression test for #74992.
10355
10356         * liveness.c: Extend live ranges of arguments to the beginning of the
10357         method. Fixes #74992.
10358
10359         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
10360         so it points into the faulting instruction.
10361
10362 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
10363
10364         * jit-icalls.c (mono_imul_ovf): Add exception handling.
10365
10366         * *-ia64.*: Ongoing IA64 work.
10367
10368         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
10369
10370 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
10371
10372         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
10373
10374         * *-ia64.*: Ongoing IA64 work.
10375
10376 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
10377
10378         * basic-long.cs: Add tests for add/sub.ovf.
10379
10380         * basic.cs: Add tests for sub.ovf.
10381
10382         * *-ia64.*: Ongoing IA64 work.
10383
10384 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
10385
10386         * *-ia64.*: Ongoing IA64 work.
10387
10388         * basic.cs: Add conv.ovf.i4.un test.
10389
10390 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
10391
10392         * mini.c: (remove_block_if_useless) Fixed bug 75061.
10393         
10394 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10395
10396         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
10397
10398 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
10399
10400         * *-ia64.*: Ongoing IA64 work.
10401
10402 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10403
10404         * trace.[ch]:
10405         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
10406
10407 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
10408
10409         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
10410
10411 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
10412
10413         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
10414
10415         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
10416         of a call is callable by a near call.
10417
10418 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
10419
10420         * mini-ia64.c: Ongoing IA64 work.
10421
10422 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
10423
10424         * genmdesc.c: Make the generated array non-static.
10425
10426         * inssel-long.brg: Fix LSHR_IMM rule.
10427
10428         * *-ia64.*: Ongoing IA64 work.
10429
10430         * *-ia64.*: Ongoing IA64 work.
10431
10432 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10433
10434         * *-ia64.*: Ongoing IA64 work.
10435
10436         * *-ia64.*: Ongoing IA64 work.
10437         
10438         * mini-ia64.c: Ongoing IA64 work.
10439
10440         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
10441
10442 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10443
10444         * objects.cs basic-calls.cs: Move some tests to objects.cs.
10445         
10446         * objects.cs basic-long.cs: Move some tests to objects.cs.
10447
10448 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
10449
10450         * *-ia64.*: Ongoing IA64 work.
10451
10452         * iltests.il: Add a new test.
10453
10454         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
10455         newobj. Fixes #75042.
10456
10457 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
10458
10459         * *-ia64.*: Ongoing IA64 work.
10460         
10461         * *-ia64.*: Ongoing IA64 work.
10462         
10463         * *-ia64.*: Ongoing IA64 work.
10464
10465         * basic.cs objects.cs: Move tests accessing static variables as well.
10466
10467         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
10468
10469 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
10470
10471         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
10472
10473         * driver.c: Always print failed tests.
10474
10475         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
10476         frame pointer.
10477
10478         * *ia64*: Ongoing IA64 work.
10479
10480 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
10481
10482         * basic.cs: Add tests for add.ovf. Fix warnings.
10483
10484 2005-05-18  Miguel de Icaza  <miguel@novell.com>
10485
10486         * driver.c (mono_main): Avoid crash if no argument is passed to
10487         --break;  Do not use g_error, but f_printf.   And fix all other
10488         ocurrences of the same crash.
10489
10490 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
10491
10492         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
10493         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
10494         Fixes #74742.
10495
10496 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
10497
10498         * *-ia64.*: Add beginnings of IA64 backend.
10499
10500         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
10501
10502 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
10503
10504         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
10505         Fixes #74925.
10506
10507         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
10508
10509         * mini-amd64.c: Fix a warning.
10510
10511 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
10512
10513         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
10514         in float_neg. Fixes #74897.
10515
10516         * mini-amd64.c (emit_call): Fix another near call bug.
10517
10518 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
10519
10520         * declsec.c: Keep the appdomain information in the structure. Added a 
10521         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
10522         value gets overwritten).
10523         * declsec.h: Set the default MonoArray for the the stack to 6. Added
10524         an MonoAppDomain member to MonoSecurityFrame.
10525         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
10526         used in the stack walk. Now use a MonoArray which grow (double) when
10527         it gets full.
10528
10529 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
10530
10531         * mini.c: Re-enabled runtime cleanup, since running threads should
10532         now properly stop when exiting.
10533
10534 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
10535
10536         * mini-codegen.c: New file contaning the arch-independent local
10537         register allocator. Not used by any architectures yet.
10538
10539         * mini.h linear-scan.c: Merge some changes from the 
10540         mini-xp-local-regalloc branch.
10541
10542 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
10543
10544         * mini-amd64.c (emit_call): Fix calls to native functions when the
10545         runtime is compiled as a shared library. Fixes #74756.
10546
10547         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
10548         on a literal field. Fixes #74751.
10549
10550 2005-04-25  Raja R Harinath  <rharinath@novell.com>
10551
10552         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
10553
10554 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
10555
10556         * objects.cs: Add missing null casting test.
10557
10558 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
10559
10560         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
10561         in wrapper methods. Also rename 'address' variable to 'offset'.
10562
10563 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
10564
10565         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
10566         warnings.
10567         
10568         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
10569
10570         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
10571         work on windows.
10572
10573 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10574
10575         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
10576
10577 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10578
10579         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
10580         just the last bytes.
10581
10582 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
10583
10584         * aot.c (mono_compile_assembly): Fix warning.
10585
10586         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
10587         by the _MSC_VER stuff.
10588
10589 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
10590
10591         * inssel-long.brg: Fix #74588.
10592
10593         * cpu-amd64.md: Fix #74591.
10594
10595         * iltests.il: Add new regression tests.
10596
10597 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
10598
10599         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
10600         valuetype.
10601
10602 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
10603
10604         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
10605
10606         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
10607         from Bill Middleton <flashdict@gmail.com>.
10608
10609 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
10610
10611         * arrays.cs: Add new regression test. Fix warnings.
10612
10613 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
10614
10615         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
10616         and leakage in CKFINITE.
10617
10618         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
10619         this to a null op since it is called on amd64 too.
10620
10621         * exceptions-amd64.c (get_throw_trampoline): Align stack.
10622
10623         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
10624         body since this is not used on amd64.
10625         
10626         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
10627
10628         * mini-amd64.c: Remove obsolete fixmes.
10629
10630         * mini.c (print_method_from_ip): Fix debugging support.
10631
10632 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10633
10634         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
10635         so that expressions that don't give much gain are not reduced.
10636         * ssapre.h: Likewise.
10637
10638 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
10639
10640         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
10641
10642         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
10643
10644         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
10645
10646 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
10647
10648         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
10649
10650         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
10651
10652 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
10653
10654         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
10655         stack touching.
10656
10657         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
10658
10659         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
10660
10661         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
10662
10663         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
10664         MONO_ARCH_USE_SIGACTION. Fixes #74252.
10665
10666         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
10667
10668         * mini-x86.c: Fix up stack overflow handling.   
10669
10670         * exceptions.cs: Add new regression test.
10671
10672 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
10673
10674         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
10675         mono_jit_thread_attach.
10676
10677         * mini.c (mono_method_to_ir): Verify called method is not abstract.
10678
10679 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10680
10681         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
10682         avoid calling constructors using callvirt.
10683
10684         * inssel.brg: Fix #74073.
10685
10686 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
10687
10688         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
10689         compilation with non-GCC compilers.
10690         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
10691         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
10692
10693 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
10694
10695         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
10696         klass->interface_offsets (will likely fix bug#74073).
10697
10698 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10699
10700         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
10701
10702 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
10703
10704         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
10705         to amd64_div_reg_size ().
10706         
10707         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
10708
10709 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
10710
10711         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
10712
10713 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10714
10715         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
10716
10717 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10718
10719         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
10720         
10721         * mini.c (mono_precompile_assembly): Load and precompile referenced
10722         assemblies as well. Fixes #74015.
10723
10724 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
10725
10726         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
10727
10728 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
10729
10730         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
10731         a lot of checks and (anyway) permissions cannot work until corlib is 
10732         loaded.
10733
10734 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
10735
10736         * mini-ppc.c: fixed ABI issue on sysv/ppc.
10737
10738 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
10739
10740         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
10741         calls (fixes bug#72824).
10742
10743 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10744
10745         * mini.c: fix tail recursion elimination (see test in bug#73936).
10746
10747 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
10748
10749         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
10750         some fp functions in sse2 mode.
10751
10752 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
10753
10754         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
10755
10756 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
10757
10758         * mini.h mini.c: Add mono_get_jit_tls_key ().
10759
10760         * mini-x86.c: Enable fast TLS support on windows.
10761
10762 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
10763
10764         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
10765         * mini.c: Check for p/invoke method when generating code. If a
10766         p/invoke method, or it's class, isn't decorated with [Suppress
10767         UnmanagedCodeSecurity] then generate code to call System.Security.
10768         UnmanagedDemand (only if the security manager is active).
10769
10770 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10771
10772         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
10773         last change as it seems to cause strange crashes.
10774         
10775 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10776
10777         * *.c: handle unsafe function pointers where needed.
10778
10779 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10780
10781         * mini.c (mono_jit_free_method): Remove the fixme too.
10782
10783 2005-03-15  Miguel de Icaza  <miguel@novell.com>
10784
10785         * mini.c: As discussed, make the code actually free the delegate
10786         thunk now, to enable the debugging of delegate problems, use
10787         MONO_DEBUG=1 when running Mono. 
10788
10789         This takes also care of parts of the leaks as seen by Joe.
10790
10791 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
10792
10793         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
10794         thread_tls_offset calculation.
10795
10796 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
10797
10798         * declsec.c: Reworked linkdemand checks for icall. The previous code
10799         was using the declaration code (untrusted) and didn't work as expected
10800         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
10801         specific case.
10802
10803 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
10804
10805         * iltests.il: Add new localloc test.
10806
10807         * mini-amd64.c: Handle large stack allocations the same way as on
10808         windows if stack overflow handling is working.
10809         
10810         * mini-amd64.c: Allocate the signal stack using mmap.
10811
10812         * mini.c (sigsegv_signal_handler): Fix reading of context.
10813
10814         * mini-exceptions.c: Fix up stack overflow handling.
10815
10816         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
10817
10818         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
10819
10820         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
10821
10822         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
10823
10824         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
10825         tramp_init functions as they are no longer needed.
10826
10827 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
10828
10829         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
10830         
10831         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
10832
10833         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
10834         
10835         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
10836         support that now.
10837
10838         * mini-ops.h: Add OP_LMUL_IMM.
10839
10840         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
10841         long mul/div opcodes as intrinsic.
10842
10843         * mini-amd64.c (emit_call): Handle the case when the callee might be
10844         an AOT method.
10845
10846 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
10847
10848         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
10849         extra safe.
10850         
10851         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
10852
10853         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
10854
10855 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
10856
10857         * mini.c (mono_codegen): Don't leak here, to help people running
10858         monogrind.
10859
10860 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
10861
10862         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
10863         conversions in sse2 mode.
10864
10865         * basic-float.cs: Add regression test.
10866         
10867         * mini-amd64.c: Reenable sse2.
10868
10869 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10870
10871         * mini-amd64.c: Disable sse2 until some regressions are fixed.
10872
10873 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
10874
10875         * driver.c: Copyright text should include 2005.
10876         
10877 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10878
10879         * cpu-amd64.md (load_membase): Fix more max lengths.
10880
10881 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
10882
10883         * cpu-amd64.md (load_membase): Fix max length.
10884
10885         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
10886
10887         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
10888
10889         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
10890         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
10891
10892         * basic-float.cs: Add rounding regression test.
10893
10894         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
10895
10896 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
10897
10898         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
10899         structures in registers for pinvoke wrappers.
10900
10901 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
10902
10903         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
10904
10905 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
10906
10907         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
10908         wrapper to mono_jit_thread_attach.
10909
10910         * mini.c (mini_jit_thread_attach): New jit icall.
10911
10912         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
10913         native->managed wrappers.
10914
10915         * exceptions.cs: Add new regression test.
10916
10917         * mini.c (optimize_branches): Check regions in the cbranch to throw
10918         block case as well. Fixes #73242.
10919
10920 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10921
10922         * mini.c: thread safety fixes.
10923
10924 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
10925
10926         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
10927         patching stuff, since delegates use jump trampolines so there is
10928         no caller.
10929
10930         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
10931         jump trampolines.
10932         
10933         * tramp-amd64.c: Fix build.
10934
10935         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
10936         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
10937
10938         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
10939         Rename this to mono_arch....
10940         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
10941
10942         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
10943
10944         * mini-amd64.c (emit_call): If both the caller and the callee is
10945         guaranteed to have 32 bit addresses, emit a normal call.
10946
10947         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
10948
10949         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
10950         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
10951         method_ptr inside delegates.
10952
10953 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
10954
10955         * mini.c (mono_jit_free_method): Free the method info even if the native code is
10956         invalidated. Fixes #73001.
10957
10958         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
10959
10960         * mini-x86.c: Only use stdcall for pinvokes on windows.
10961
10962 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10963
10964         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
10965         * mini-x86.c: remove unreliable __thread var offset detection,
10966         use the correct accessors and enable by default.
10967
10968 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
10969
10970         * mini.c (mono_jit_free_method): Fix memory leak.
10971
10972 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
10973
10974         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
10975
10976 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
10977
10978         * cpu-amd64.md: Fix lengths of atomic opcodes.
10979
10980 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10981
10982         * driver.c: try to not imply using ICU is any good.
10983
10984 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
10985
10986         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
10987         functions as inline ops.
10988
10989         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
10990         some Interlocked functions as inline ops.
10991
10992         * mini.c (move_basic_block_to_end): Fix bug in last patch.
10993
10994         * mini.h (MonoBasicBlock): Reorganize fields a bit.
10995
10996         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
10997
10998         * mini.c: Add support for OP_NOT_TAKEN.
10999
11000         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
11001         structures in registers for pinvoke wrappers.
11002
11003         * mini-amd64.c: Fix warnings.
11004
11005 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
11006
11007         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
11008
11009         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
11010
11011         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
11012         address instead of loading the address from it.
11013
11014         * mini-x86.c: Add support for returning small structs in registers
11015         on Win32. Fixes part of #70864.
11016         
11017 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
11018
11019         * trace.c (get_token): Improve error checking.
11020
11021 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
11022
11023         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
11024
11025 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
11026  
11027         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
11028         it can be reused for MonoClass.
11029         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
11030         _LINKDEMAND.
11031
11032 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
11033
11034         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
11035         instead of a MonoReflectionMethod. The method information wasn't used
11036         when displaying SecurityException details (but will be now).
11037
11038 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
11039
11040         * Makefile.am : windows build fix.
11041
11042 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
11043
11044         * iltests.il: Add new regression test.
11045
11046         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
11047         #72522.
11048
11049 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
11050  
11051         * mini.c: Moved linkdemand check into helper function check_linkdemand
11052         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
11053         LDFTN, LDVIRTFTN).
11054
11055 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
11056
11057         * declsec.c: Added statistics counter for different kinds of 
11058         LinkDemands.
11059         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
11060         (and commented) declaration.
11061         * mini.c: Added statistics counter for security Demand code 
11062         generation. Added display of security statistics.
11063
11064 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
11065
11066         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
11067         Fix compilation errors under gcc-2.95.
11068
11069 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
11070
11071         * mini.c, driver.c: Use the new jit trampoline hashtable
11072
11073 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11074
11075         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
11076
11077 2005-02-11  Martin Baulig  <martin@ximian.com>
11078
11079         * debug-mini.c (mono_debug_close_method): Free the line number array.
11080
11081 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
11082
11083         * aot.c: Break up large methods into smaller ones. Share GOT slots for
11084         icalls.
11085
11086         * mini.h: Bump AOT file format version. 
11087
11088 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
11089
11090         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
11091         APTC and P/Invoke.
11092         * declsec.h: Added macros to get/set lazyly initialized security 
11093         informations about assemblies. Added new enum for different type of
11094         possible LinkDemand violation. Added function to check LinkDemands.
11095         * mini.h: Added a field to MonoCompile to hold any security violation
11096         detected when JITting a method (so it can be thrown later).
11097         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
11098         and CEE_CALLVIRT. Added code to throw exception at the end of
11099         mini_method_compile (note: the exception is unhandled right now).
11100
11101 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
11102
11103         * mini.c, jit-icalls.c: use the managed implementation of
11104         memset for initobj and memset, to avoid managed <-> unmanaged
11105         transitions.
11106
11107 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
11108
11109         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
11110         optimization if it would need a GOT var.
11111
11112         * basic.cs: Add tests for constant propagation and switch statements.
11113
11114         * ssa.c: Fix out-of-range constant propagation and switch statements.
11115
11116 2005-02-09    <vargaz@freemail.hu>
11117
11118         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
11119
11120 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
11121
11122         * cpu-amd64.md (load_membase): Fix max length of load_membase.
11123
11124 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11125
11126         * mini.c: update to new signature of mono_class_get_allocation_ftn().
11127
11128 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
11129
11130         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
11131         arithmetic operations.
11132
11133 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
11134
11135         * mini-ppc.c: add a workaround for broken user code that
11136         DllImports vararg functions with non-vararg signatures.
11137
11138 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
11139
11140         * mini.c (mono_jit_compile_method_inner): Add detection and a 
11141         meaningfull error message for assemblies written in Managed C++.
11142
11143         * tramp-amd64.c mini-amd64.h: Add support for 
11144         create_trampoline_from_token ().
11145
11146         * aot.c mini-x86.c abcremoval.c: Applied patch from
11147         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
11148
11149 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
11150
11151         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
11152         which takes a MonoImage/token as parameter instead of a MonoMethod.
11153
11154         * aot.c: Use the new trampoline for initializing vtables.
11155
11156         * aot.c: Add support for ldfld/stfld_remote wrappers.
11157
11158         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
11159         rules for compare <MEM>, IMM.
11160
11161         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
11162
11163         * aot.c: Handle inherited finalizers correctly.
11164
11165 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
11166
11167         * inssel.brg (stmt): Add a missing _setup_... ().
11168
11169         * aot.c: Save some parts of the class state to the AOT file and use it
11170         to recompute that state when a class is initialized.
11171
11172         * mini.c: Install AOT hooks into the runtime.
11173
11174         * mini.h: Bump AOT file format version.
11175         
11176         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
11177         Fixes #72148.
11178
11179         * iltests.il: Add new test.
11180
11181 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
11182
11183         * mini.c: fix typo.
11184
11185 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
11186
11187         * mini.c: setup the statistical profiler in the thread attach
11188         callback to cope with the new single thread code.
11189
11190 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
11191
11192         * mini-ppc.c: ensure we have enough room for the profiler
11193         calls (fixed bug#72084).
11194
11195 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
11196
11197         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
11198         it.
11199
11200 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11201
11202         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
11203
11204 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11205
11206         * ssapre.c: Fixed an issue with down safety (this allows IronPython
11207         to succesfully execute parrotbench).
11208         * ssapre.h: Likewise.
11209
11210 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11211
11212         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
11213         variable for stores to method arguments (fixes a SSAPRE issue).
11214
11215 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11216
11217         * mini.c: handle value types in dup, fixes gen-112.cs.
11218
11219 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
11220
11221         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
11222         sequence for calls in dynamic methods to avoid thunks.
11223
11224 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
11225
11226         * mini.c: correctly remove dynamic methods from the hashtable.
11227
11228 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11229
11230         * driver.c: Disabled SSAPRE until fix the bug that appears
11231         in IronPython's parrotbench.
11232
11233 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
11234
11235         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
11236
11237         * mini.c (mono_method_to_ir): Revert the previous change.
11238         
11239         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
11240         when AOT compiling.
11241
11242         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
11243         mono_jit_info_table_find () etc. when running under valgrind.
11244
11245         * inssel.brg: Fix warnings.
11246
11247         * mini-exceptions.c: Fix warnings.
11248
11249 2005-01-31  Martin Baulig  <martin@ximian.com>
11250
11251         * driver.c (compile_all_methods_thread_main): Don't try to compile
11252         generic methods or anything which has type parameters.
11253
11254 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
11255
11256         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
11257
11258         * TestDriver.cs: Add --verbose flags.
11259
11260         * graph.c ssa.c: Fix 64 bit warnings.
11261         
11262         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
11263         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
11264         Fix 64 bit warnings.
11265
11266         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
11267         variable not spotted by gcc.
11268         
11269         * mini-amd64.c inssel-amd64.brg: Applied patch from  
11270         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
11271         X86_COMPARE_MEMBASE opcodes.
11272
11273         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
11274
11275 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
11276
11277         * *: MonoMethod->signature might be NULL now. You *MUST* use
11278         mono_method_signature.
11279
11280 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
11281
11282         * driver.c (compile_all_methods_thread_main): Compile the methods
11283         without invoking cctors.
11284
11285 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11286
11287         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
11288         * basic-calls.cs: test for the above.
11289
11290 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
11291
11292         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
11293         MonoJitInfo changes.
11294
11295 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
11296
11297         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
11298         eagerly if it contains dynamic methods.
11299         
11300         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
11301
11302         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
11303         trace, it is now computed by an icall from trace_ips.
11304         
11305         * mini-exceptions.c: Fix a warning.
11306
11307 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
11308
11309         * mini-exceptions.c: don't bother getting stack trace info if
11310         it's not going to be used.
11311
11312 2005-01-27  Raja R Harinath  <rharinath@novell.com>
11313
11314         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
11315         ssapre-mini-ops.h.
11316
11317 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
11318
11319         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
11320
11321         * aot.c: Avoid calling mono_method_get_header () if not needed.
11322
11323         * mini.h: Bump AOT file format version.
11324         
11325         * mini.c (mono_emit_native_call): Allocate a GOT var here.
11326
11327         * mini.c (mono_print_tree): Print more info for calls.
11328
11329 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
11330
11331         * declsec.h: Remove warning by adding missing include for marshal.h
11332
11333 2005-01-26  Martin Baulig  <martin@ximian.com>
11334
11335         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
11336         `ip' twice.
11337
11338 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
11339
11340         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
11341         flags.
11342
11343         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
11344
11345         * aot.c (mono_compile_assembly): Fix a warning.
11346
11347 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
11348
11349         * declsec.c: Look for security attributes on the original MonoMethod 
11350         (and not the wrapped one). This fix permissions on icalls.
11351
11352 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
11353
11354         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11355
11356         * mini.c (mono_allocate_stack_slots): Add a fixme.
11357
11358         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11359
11360 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11361
11362         * inssel.brg: optimize casts of sealed types (more
11363         optimizations waiting for fixes in remoting).
11364
11365 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
11366
11367         * inssel.brg (stmt): Add another dummy rule.
11368
11369         * driver.c: Fix warnings.
11370
11371         * driver.c (mono_main): If running under valgrind, instruct glib to use
11372         the system allocation functions so valgrind can track the memory
11373         allocated by the g_... functions.
11374
11375         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
11376
11377         * mini-ops.h: Add OP_DUMMY_STORE opcode.
11378
11379         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
11380
11381         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
11382         variables in try regions.
11383
11384         * mini.c (mini_method_compile): Don't disable optimizations on large
11385         methods when AOT compiling.
11386
11387         * mini.c (mono_allocate_stack_slots): New arch independent method to 
11388         allocate stack slots. Not yet used.
11389
11390 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
11391
11392         * debug-mini.c (mono_debug_close_method): Plug some leaks.
11393
11394 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
11395
11396         * mini-ppc.c: make the branch info relative as the code
11397         buffer can be reallocated.
11398
11399 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
11400
11401         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
11402         * driver.c: Removed the AOT/security restriction. Now initialize the
11403         security manager (in metadata) if --security is used.
11404         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
11405         rather than the pointer to declarative security, when AOT is used.
11406
11407 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
11408
11409         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
11410         basic blocks, reduced intrinsic exception throwing code size.
11411
11412 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
11413
11414         * driver.c (mini_usage): Reorder the usage screen.
11415
11416 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
11417
11418         * mini.c (mono_resolve_patch_target): Fix warning.
11419
11420 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
11421
11422         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
11423         previous patch.
11424
11425         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11426
11427         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
11428         breaks the amd64 build.
11429
11430         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
11431         register allocation. Fixes #71454.
11432
11433         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11434
11435         * arrays.cs: Add new regression test.   
11436
11437 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11438
11439         * ssapre.c: Turned usage of snprintf to GString.
11440         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
11441         (I left it on by mistake in my previous commit).
11442
11443 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
11444
11445         * mini.c, cfold.c, basic-calls.cs: preserve side effects
11446         on cond branch optimization (fixes bug# 71515).
11447
11448 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11449
11450         * abcremoval.c: Fixed bug 71062.
11451         * abcremoval.h: Likewise.
11452
11453 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11454
11455         * mini.c: Added a new functionality to optimize_branches, the removal
11456         of useless basic blocks, and fixed some problem in the removal of
11457         critical edges; some utility functions added for both purposes.
11458         * ssapre.c: Added complex expression support, and fixed bug 70637.
11459         * ssapre.h: Likewise.
11460         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
11461         enabled in SSAPRE.
11462         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
11463         * driver.c: Re-enabled SSAPRE.
11464
11465 2005-01-19  Martin Baulig  <martin@ximian.com>
11466
11467         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
11468         the result of mono_get_method_constrained().
11469
11470 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
11471
11472         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
11473         manager.
11474
11475 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
11476
11477         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
11478         be detected.  Fixes #59296.
11479
11480 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
11481
11482         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
11483         which can happen. Fixes #71361.
11484
11485 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
11486
11487         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
11488         manager.
11489
11490 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
11491
11492         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
11493         appdomain-unload.exe to fail.
11494         
11495         * mini.c: Fix some memory leaks.
11496
11497 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
11498
11499         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
11500         Fixed bug and sped up some codepaths.
11501
11502 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
11503
11504         * mini.c: Fix some memory leaks.
11505
11506         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
11507         conversion.
11508
11509         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
11510
11511         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
11512         #71320.
11513
11514         * iltests.il: Add regression test for #71320.
11515
11516 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
11517
11518         * mini.c (mono_codegen): Fix installation of profiler hooks.
11519
11520         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
11521
11522 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
11523
11524         * mini.h, mini.c, cfold.c: optimize access to enum
11525         readonly fields, too. Eval conditional branches if possible
11526         to perform unreachable code removal in more cases.
11527
11528 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
11529
11530         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
11531
11532         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
11533         code manager.
11534
11535         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
11536         WinXP DEP. Fixes #71244.
11537
11538 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
11539
11540         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
11541
11542 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
11543
11544         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
11545
11546 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
11547
11548         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
11549         changes.
11550
11551         * mini.h: Bump AOT version.
11552
11553         * mini.h (MonoCompile): Change exvar to a hash table.
11554
11555         * mini.c: Allocate a separate exvar for each handler block.
11556
11557         * mini.c: Get rid of the computation of filter_lengths, its not needed.
11558
11559         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
11560         ex var with the pending exception and only throw if the two are equal.
11561         Fixes #68552.
11562         
11563         * exceptions.cs: Add tests for rethrow and nested catch clauses.
11564
11565         * mini-x86.c: Fix warnings.
11566
11567         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
11568         used by all the ports now.
11569
11570         * aot.c: Add write-symbols and save-temps options.
11571
11572 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11573
11574         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
11575
11576 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
11577
11578         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
11579         operations.
11580
11581         * tramp-s390.c: Check vtable slot belongs to the domain.
11582
11583         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
11584         as per other platforms.
11585
11586         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
11587
11588 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
11589
11590         * driver.c: we don't run the Main() code in a subthread anymore.
11591
11592 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
11593
11594         * mini.c: added experimental rtc support in the statistical
11595         profiler: if the user has the permission, more accurate statistics
11596         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
11597         The MONO_RTC value must be restricted to what the linux rtc allows:
11598         power of two from 64 to 8192 Hz.
11599
11600 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11601
11602         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
11603
11604 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
11605
11606         * mini-ppc.c: better icache flush for smp.
11607
11608 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
11609
11610         * mini-amd64.c (emit_move_return_value): Fix memory leak.
11611
11612         * mini-x86.c (get_call_info): Add the get_call_info () code from the
11613         amd64 port, not yet used.
11614
11615 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11616
11617         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
11618         a struct type.
11619
11620 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
11621
11622         * driver.c: Added --security option to activate the security manager.
11623         Right now this will allow code generation for declarative demands and
11624         is disabled when AOT is specified.
11625         * mini.c: Add code generation for declarative security demands.
11626         * mini.h: Add mono_use_security_manager as an extern gboolean.
11627
11628 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11629
11630         * aot.c (mono_compile_assembly): Speed up compilation a bit by
11631         emitting more dense assembly code.
11632
11633         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
11634         exception throwing stuff.
11635
11636 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
11637
11638         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
11639         dead code.
11640
11641         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
11642         left in by mistake.
11643
11644         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
11645         fixed.
11646
11647         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
11648
11649         * tramp-*.c: Only patch vtable slots if the object is in the current
11650         domain. Fixes appdomain-unload.exe.
11651
11652         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
11653         
11654         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
11655         x86 branch.
11656
11657 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11658
11659         * mini.c (reverse_branch_op): New helper function.
11660
11661         * mini.c (optimize_branches): Run the new optimization only on 
11662         platforms which support it. Also reverse all kinds of branches.
11663
11664         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
11665
11666         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
11667         a throw statement.
11668
11669         * mini.c (optimize_branches): Reverse not-equals branches if the false
11670         bblock is a throw. This happens a lot of time with argument checking in
11671         corlib.
11672
11673         * mini.c (mono_codegen): Add support for placing basic blocks after
11674         the function epilogue.
11675
11676         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
11677         function epilogue.
11678         
11679 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
11680
11681         * mini.c (setup_stat_profiler): Only set this up if the platform
11682         supports ITIMER_PROF.
11683
11684 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11685
11686         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
11687         previous patch.
11688
11689         * inssel.brg: Fix a warning.
11690
11691 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11692
11693         * mini.c: added support for statistical profiler 
11694         (run with: --profile=default:stat).
11695
11696 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
11697
11698         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
11699
11700         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
11701
11702         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
11703         related to global registers from the amd64 port.
11704
11705 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
11706
11707         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
11708
11709         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
11710         with global registers.
11711         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
11712
11713         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
11714
11715 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
11716
11717         * debug-mini.c (encode_value): Fix off-by-one.
11718
11719         * aot.c (encode_value): Likewise.
11720
11721         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
11722
11723 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
11724
11725         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
11726         AOT.
11727
11728         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
11729         
11730         * aot.c (emit_method_info): Increase size of temp buffer.
11731
11732         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
11733         the AOT case.
11734
11735 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
11736
11737         * aot.c (emit_method_info): Fix build.
11738         
11739         * aot.c: Further rework of the AOT file format to reduce the size of
11740         the method info data.
11741
11742         * mini.h: Bump AOT file format version.
11743
11744 2004-12-27  Martin Baulig  <martin@ximian.com>
11745
11746         * mini.c (mini_get_method): New static method; call
11747         mono_get_method_full() and mono_get_inflated_method().
11748         (mono_method_to_ir): Use mini_get_method() instead of
11749         mono_get_method_full(). 
11750
11751 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
11752
11753         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
11754
11755 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
11756
11757         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
11758
11759         * inssel-amd64.brg: Add some optimization rules.
11760
11761 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
11762
11763         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
11764         standard not GC'd stuff is fine.
11765
11766 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
11767
11768         * aot.c: Rework the AOT file format to get rid of most of the global
11769         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
11770
11771         * mini.h: Bump AOT file format version.
11772         
11773 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
11774
11775         * mini.h: Bump AOT file format version.
11776
11777         * aot.c (mono_aot_is_got_entry): New function to determine if an 
11778         address is inside a GOT.
11779
11780         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
11781
11782         * cpu-pentium.md: Increase the maximum size of some instructions which
11783         might involve a got access.
11784         
11785         * mini.c (get_method_from_ip): Another debug helper function.
11786
11787         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
11788         when got var accesses are created during the decompose phase.
11789
11790         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
11791
11792         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
11793         argument mini_compile_method and to MonoCompile, and use this to
11794         determine whenever a given method is compiled for AOT. This allows the
11795         other methods compiled during AOT compilation to be free of AOT stuff,
11796         so the backends does not need to add special support for them by
11797         creating a fake GOT etc.
11798
11799         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
11800         longer needed.
11801
11802 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11803
11804         * mini.c (mono_method_to_ir): It turns out that some of the
11805         x-appdomain wrappers are lax with types, so just ignore this for
11806         all wrappers.
11807
11808         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
11809         at the vtable->klass. If it is non-shared code we can just use the
11810         vtable.
11811
11812 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
11813
11814         * mini-ppc.c: access MonoDomain from tls, too.
11815
11816 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
11817
11818         * declsec.c: Removed unused variable (and related warning ;-)
11819
11820 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11821
11822         * iltests.il: New test for LDELEMA on an array of ref types.
11823
11824         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
11825         all ldelema's on reftypes.
11826         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
11827         it was the wrong place to put it.
11828
11829         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
11830         register to pop to make this cleaner, at the request of Paolo.
11831
11832 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11833
11834         * mini-ops.h (OP_GETHASHCODE): New op.
11835
11836         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
11837
11838         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
11839         operation.
11840
11841         For a microbenchmark, this reduces the cost of Hashtable.get_Item
11842         by 25%.
11843         
11844         * mini-x86.c (mono_arch_output_basic_block): Rather than
11845
11846         add ebp, 4
11847
11848         Emit
11849
11850         pop edx
11851
11852         The first is 3 bytes while the second is 1. This saves 36 kb on
11853         mscorlib, quite a big saving. When bootstraping mcs, I was able to
11854         see a small boost because of icache locality.
11855
11856         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
11857
11858 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
11859
11860         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
11861         started code sharing with the generic code.
11862
11863 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
11864
11865         * mini-ppc.c, cpu-g4.md: added code for direct access to
11866         tls data slots.
11867
11868 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
11869
11870         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
11871          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
11872         to OP_TLS_GET.
11873
11874 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
11875
11876         * declsec.c|h: Added functions to cache the declarative stack modifiers
11877         in MonoJitInfo and to create a security frame from a MonoJitInfo 
11878         structure.
11879         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
11880         created. Register internal calls for System.Security.SecurityFrame::
11881         _GetSecurityFrame and _GetSecurityStack.
11882         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
11883         the definitions for the new stack walk/callback mechanism.
11884         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
11885         first security frame for LinkDemands and InheritanceDemands) and
11886         GetSecurityStack for Demands. Both use the new mono_walk_stack code
11887         from lupus.
11888         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
11889         walk initialization (lupus).
11890
11891 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11892
11893         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
11894         idiom.
11895         (handle_loaded_temps): Do not create a temporary variable for
11896         things that we know are temps. They will never be modified.
11897         (mono_spill_call): Set MONO_INST_IS_TEMP
11898         (mono_emulate_opcode): ditto
11899         (emit_tree): ditto
11900         (mono_method_to_ir.CEE_DUP): ditto
11901
11902 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
11903
11904         * mini.c (type_to_eval_stack_type): Make this handle the void type
11905         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
11906         (emit_tree): use ip_in_bb to special case some common idioms
11907         Update all callers to pass in the IP.
11908         (mono_method_to_ir): Make CEE_CALL* do the above as well.
11909
11910         This gives us a nice 2% speedup in mcs bootstrap.
11911
11912         * mini-x86.c (peephole_pass): Peephole pass to make
11913         mov  [foo], eax
11914         push [foo]
11915
11916         into
11917
11918         mov [foo], eax
11919         push eax
11920
11921         * mini.c (ip_in_bb): new method.
11922         (mono_method_to_ir): use this method rather than doing the hash
11923         lookup ourselves.
11924
11925         * linear-scan.c (mono_linear_scan): When expiring actives, you
11926         don't need to keep around variables that expire on this
11927         instruction. This makes it so that:
11928              a = b + 1
11929         will turn into:
11930              store (ebx add (ebx, 1))
11931         which will become
11932              add ebx, 1
11933
11934 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
11935
11936         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
11937         combination to avoid doing two copies. Fix up problems with previous
11938         patch.
11939
11940         * mini.c: Fix 64 bit warnings.
11941
11942         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
11943
11944 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
11945
11946         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
11947         changes from the x86 code.
11948
11949         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
11950
11951 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
11952
11953         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
11954         throwing code to reduce its size, unify the AOT and non-aot code and 
11955         get rid of relocations in the AOT case.
11956
11957         * mini-x86.h mini.c exceptions-x86.c 
11958         (mono_arch_get_throw_corlib_exception): New arch specific function to 
11959         raise corlib exceptions which doesn't require relocations in the 
11960         caller.
11961
11962         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
11963
11964 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
11965
11966         * mini.c (mono_emit_method_call): Only allocate the got var when it is
11967         needed.
11968
11969         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
11970         in the AOT case.
11971
11972 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11973
11974         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
11975         with add function when used from Inc/dec atomic 
11976         functions. Re-enabled optimization on x86.
11977         * mini-ops.h: renamed atomic_add functions to
11978         allow _add to match the Interlocked::Add and
11979         _add_next to match Interlocked::Inc/Dec.
11980
11981 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
11982
11983         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
11984         linking of BBs to the end BB, and enabled SSAPRE also with
11985         consprop and copyprop (which was prevented by that bug).
11986
11987 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11988
11989         * mini-x86.c: disabling the Interlocked optimizing code. 
11990
11991 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11992
11993         * aot.c (load_aot_module): Move reading of got_addr after the AOT
11994         file version check.
11995         
11996 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11997
11998         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
11999         interlocked optimization due lack of support on x86, rewrote 
12000         exchange to take into account that base may be in eax.
12001         
12002         xsp works again; activated Interlocked optimizing code.
12003         
12004 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
12005
12006         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12007
12008 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
12009
12010         * mini-ops.h: Add new opcodes.
12011
12012         * mini.h: Add new patch types. Add got_var to MonoCompile.
12013
12014         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
12015         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
12016         make it work with all kinds of patchable code.
12017
12018         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
12019         address of the GOT, and referencing entries in the GOT.
12020
12021         * mini.c: Add code to load the GOT address if needed by an opcode.
12022
12023         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
12024         independent AOT code on the x86 using an elf-style Global Offset Table.
12025
12026 2004-12-14  Raja R Harinath  <rharinath@novell.com>
12027
12028         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
12029
12030 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12031
12032         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
12033         when running xsp.
12034
12035 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
12036
12037         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
12038         of Interlocked:Increment/Decrement/Add as inline ops.
12039         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
12040
12041 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
12042
12043         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
12044         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
12045
12046 2004-12-12  Duncan Mak  <duncan@ximian.com>
12047
12048         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
12049         again. `patch_info->table_size' is no longer valid after Zoltan's
12050         commit #37636.
12051
12052 2004-12-12  Martin Baulig  <martin@ximian.com>
12053
12054         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
12055         if we are the "real" method, ie. not an inlined method inside it.
12056
12057 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
12058
12059         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
12060         before we look in the special fields table. This fixes
12061         ../tests/thread-static-init.cs.
12062
12063 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12064
12065         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
12066         for Array get_Rank and get_Length. Fixes bug #70465.
12067
12068 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
12069
12070         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
12071         separate structure to reduce the size of MonoJumpInfo.
12072
12073 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
12074
12075         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
12076
12077 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
12078
12079         * mini.c (mini_get_inst_for_method): Changed to allow ports
12080         to return a MonoInst instead of opcode 
12081         (renamed mini_get_opcode_for_method to better reflect the new functionality)
12082         
12083         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
12084         Allow ports to return a created MonoInst instead of op-code, will enable
12085         new optimizations.
12086         (renamed mini_get_opcode_for_method to better reflected the functionality)
12087
12088 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
12089
12090         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
12091
12092 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
12093
12094         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
12095         Fixes #69985.
12096
12097 2004-12-08  Martin Baulig  <martin@ximian.com>
12098
12099         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
12100         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
12101
12102 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
12103
12104         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
12105         correctly.
12106
12107         * exceptions.cs: Disable some tests which depend on properties of x86 fp
12108         arithmetic.
12109
12110 2004-12-08  Raja R Harinath  <rharinath@novell.com>
12111
12112         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
12113
12114 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
12115
12116         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
12117         bug introduced by the previous patch.
12118
12119 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12120
12121         * mini-ppc.c, objectc.cs: handle large structs passed by value
12122         (fixes bug #69972).
12123
12124 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
12125
12126         * mini-ppc.c: OP_ARGLIST implementation from
12127         Geoff Norton  <gnorton@customerdna.com>.
12128
12129 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12130
12131         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
12132         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
12133
12134 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12135
12136         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
12137
12138 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12139
12140         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
12141         support.
12142
12143 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
12144
12145         * mini-sparc.c: Zero out localled-ed memory.
12146
12147         * iltests.il: Add tests for zeroing out localloc-ed memory.
12148
12149 2004-12-04  Martin Baulig  <martin@ximian.com>
12150
12151         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
12152         mono_method_get_signature_full().       
12153
12154 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
12155
12156         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
12157         and some utility functions (always for SSAPRE), integrated SSAPRE.
12158         * mini.h: Likewise.
12159         * driver.c: Added ssapre option.
12160         * ssa.c: Small fix on OP_ARG handling.
12161         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
12162         * Makefile.am: Likewise.
12163
12164 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
12165
12166         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
12167         now in the xp code.
12168
12169         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
12170         icall.
12171
12172 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12173
12174         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
12175         
12176         * cpu-s390.md : Increase instruction length of oparglist.
12177
12178         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
12179
12180 2004-11-30  Martin Baulig  <martin@ximian.com>
12181
12182         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
12183         virtual generic methods.  We call a special helper_compile_generic_method()
12184         icall to retrieve the method from the vtable, inflate and compile
12185         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
12186
12187         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
12188
12189 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
12190
12191         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
12192
12193 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
12194
12195         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
12196         Fixes #69929.
12197
12198 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
12199
12200         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
12201         platforms with PIC aot.
12202
12203 2004-11-28  Martin Baulig  <martin@ximian.com>
12204
12205         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
12206         Fixes gen-112.cs.
12207
12208 2004-11-28  Martin Baulig  <martin@ximian.com>
12209
12210         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
12211         the result of mono_type_get_underlying_type() to check whether
12212         we're byref.
12213
12214 2004-11-26  Martin Baulig  <martin@ximian.com>
12215
12216         * mini.c
12217         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
12218         in the g_assert().
12219
12220 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
12221
12222         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
12223         the same way as the other arguments so they won't get clobbered.
12224
12225         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
12226         calls through R11 since it is clobbered by the trampoline code.
12227
12228 2004-11-26  Raja R Harinath  <rharinath@novell.com>
12229
12230         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
12231         pick up in-tree mscorlib.dll.
12232
12233 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
12234
12235         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
12236
12237         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
12238         runtime data/code are now stored in a table similar to the GOT in ELF. 
12239         This allows the code itself to be position independent.
12240
12241         * aot.c: Fix loading of referenced assemblies after the lazy assembly
12242         loading changes.
12243
12244         * aot.c: Attach ELF type (object/function) directives to all global
12245         symbols.
12246
12247         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
12248
12249         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
12250
12251         * mini-amd64.h: Turn on PIC AOT code.
12252
12253         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
12254         returning the offset within an OP_AOTCONST instruction where the GOT
12255         offset needs to be added.
12256
12257         * mini.h: Bump AOT file format version.
12258
12259 2004-11-25  Martin Baulig  <martin@ximian.com>
12260
12261         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
12262         uninflated generic methods.
12263
12264 2004-11-25  Martin Baulig  <martin@ximian.com>
12265
12266         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
12267
12268 2004-11-24  Martin Baulig  <martin@ximian.com>
12269
12270         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
12271         original klass (this only applies for generic instances).
12272
12273 2004-11-24  Martin Baulig  <martin@ximian.com>
12274
12275         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
12276         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
12277         that array).
12278
12279 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
12280
12281         * mini.c (mono_method_to_ir): Disable inlining for methods containing
12282         localloc. Fixes #69678.
12283
12284         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
12285         
12286 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
12287
12288         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
12289         used SSE registers on pinvoke calls. Fixes #69774.
12290
12291 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
12292
12293         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
12294         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
12295
12296 2004-11-23  Raja R Harinath  <rharinath@novell.com>
12297
12298         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
12299         Refer directly to the mcs/ tree.
12300
12301 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12302
12303         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
12304         Check if a trampoline for a synchronized method is required. 
12305
12306 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
12307
12308         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
12309         with localloc if needed. Throe arithmetric exception in
12310         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
12311         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
12312
12313 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
12314
12315         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
12316         types before switching on type.  Fixes #69622.
12317
12318 2004-11-19  Raja R Harinath  <rharinath@novell.com>
12319
12320         * Makefile.am (check-local): New.  Integrate into 'make check'.
12321         (MCS,RUNTIME): Define using in-tree mono and mcs.
12322         (ILASM): New.
12323         (%.exe): Use $(ILASM).
12324
12325 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
12326
12327         * mini-ppc.c: adjust initial prolog size (bug #69691).
12328
12329 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
12330
12331         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
12332         #69664.
12333
12334 2004-11-17  Raja R Harinath  <rharinath@novell.com>
12335
12336         * Makefile.am (clean-local): Rename from 'clean'.
12337
12338 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12339
12340         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
12341         to mono_arch_is_int_overflow. 
12342         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
12343         SIGFPE events.
12344
12345 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
12346
12347         * declsec.c|h: New files to support declarative security attributes.
12348         Added function to check if a method has (applicable) security.
12349         * mini.c|h: Add check for declarative security attributes in
12350         mono_method_check_inlining.
12351         * Makefile.am: Added declsec.c and declsec.h to the build.
12352
12353 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
12354
12355         * mini.c, mini.h: update to keep dynamic code info per-domain.
12356
12357 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
12358
12359         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
12360         (mini_init): Get rid of it from here too.
12361
12362 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
12363
12364         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
12365         implemented OP_RETHROW (patch by Geoff Norton
12366         <gnorton@customerdna.com>).
12367
12368 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
12369
12370         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
12371         between appdomains.  Fixes appdomain-unload on PPC.
12372
12373 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
12374
12375         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12376         mini-exceptions.c: handle the new wrapper types.
12377         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
12378         token value as a MonoClass* when compiling a wrapper.
12379         mono_jit_create_remoting_trampoline now takes an additional
12380         MonoRemotingTarget parameter.
12381         
12382 2004-11-10  Martin Baulig  <martin@localhost>
12383
12384         * mini.c (mono_method_to_ir): Use `generic_container->context'
12385         rather than creating a new one.
12386
12387 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12388
12389         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
12390
12391         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
12392
12393 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
12394
12395         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
12396         the experimental aot cache stuff.
12397
12398 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
12399
12400         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12401         mini-exceptions.c: update to exception clause structure changes.
12402
12403 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
12404
12405         * exceptions-x86.c (throw_exception): Fix warnings.
12406
12407         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
12408         for OP_RETHROW.
12409
12410 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
12411
12412         * exceptions-sparc.c (get_throw_exception): Really fix this.
12413
12414 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
12415
12416         * tramp-*.c: we no longer support icalls without wrappers, so
12417         a bit of code can be removed here
12418
12419 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
12420
12421         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
12422         patch.
12423
12424         * cpu-sparc.md: Add op_rethrow.
12425
12426         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
12427
12428         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
12429
12430         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
12431         * mini-ops.h: Add OP_RETHROW.
12432
12433         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
12434
12435         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
12436
12437 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
12438         
12439         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
12440         Makes the output much easier to read
12441
12442 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
12443
12444         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
12445         prevents another huge leak when compiling with ssa. Secondly, the
12446         performance of doing this rather than freeing the lists is much
12447         better. GList does a lock every time you allocate a list link,
12448         so that it can use a memory pool. So, it is better to just use
12449         a memory pool of our own.
12450         
12451         * ssa.c, linear-scan.c: replace g_list_remove_link with
12452         g_list_delete.  The remove one does not free the GList, so we were
12453         leaking memory. On -O=all --compile-all with corlib, this cut down
12454         3 MB of allocations.
12455
12456 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
12457
12458         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
12459
12460         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
12461
12462         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
12463         into a new function mono_create_jit_trampoline ().
12464
12465 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
12466
12467         * trace.c (get_spec): Allow tracing of classes without a namespace.
12468
12469 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
12470
12471         * mini.c: Fix pointer overwrite in mini_method_compile.
12472
12473 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
12474
12475         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
12476         The darwin ABI needs some special handling for 1 and 2 byte structs
12477         Lets use lbz/lhz instead of lwz everywhere.
12478         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
12479         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
12480         Use stb/sth for the former, and put the latter always on stack instead of in
12481         argument registers.
12482
12483 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
12484
12485         * trace.c (is_filenamechar): Add '_'.
12486
12487 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
12488
12489         * mini-s390.c: Fix prolog length to allow for large trace requirements.
12490
12491         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
12492
12493 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
12494
12495         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
12496         depends on libmonogc. Fixes #68805.
12497
12498 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
12499
12500         * mini.c (mono_jit_free_method): Provide extra information for
12501         this error.  Currently this leaks, but will be turned into a
12502         developer option in the future.
12503
12504 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
12505
12506         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
12507
12508 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
12509
12510         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
12511         boundary. Fixes reading of PATCH_INFO_R4 and R8.
12512         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
12513
12514 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
12515
12516         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
12517         trampolines for AOT code.
12518
12519 2004-10-22    <vargaz@freemail.hu>
12520
12521         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
12522         constructed types. Fixes #68136.
12523
12524 2004-10-21  Martin Baulig  <martin@ximian.com>
12525
12526         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
12527         if it returns true, unwind the stack to the call instruction.
12528
12529 2004-10-21    <vargaz@freemail.hu>
12530
12531         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
12532
12533         * mini.h: Bump AOT version number.
12534
12535         * objects.cs: Add another test for unbox trampolines.
12536
12537         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
12538         valuetype methods.
12539
12540 2004-10-20    <vargaz@freemail.hu>
12541
12542         * driver.c: Add SHARED to the set of optimizations tested.
12543
12544         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
12545
12546         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
12547         used by CEE_NEWARR.
12548
12549         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
12550
12551 2004-10-20  Martin Baulig  <martin@ximian.com>
12552
12553         * mini-exceptions.c (mono_handle_exception): Call
12554         mono_debugger_handle_exception() to tell the debugger about
12555         catch/finally clauses.
12556
12557 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
12558
12559         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
12560
12561         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
12562         #68447.
12563
12564 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
12565
12566         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
12567         methods as their native size, fixed bug #57543, #57545.
12568         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
12569         This saves a temporary register and mullw call down into 1 (minor perf
12570         increase for cases like sum = sum * 5;  This use to translate into:
12571             li r11,5
12572             mullw r28,r28,r11
12573         It now translates to
12574             mulli r28,r28,5
12575
12576 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
12577
12578         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
12579         #68388.
12580
12581 2004-10-11  Martin Baulig  <martin@ximian.com>
12582
12583         * mini.c (mono_method_to_ir): If we're a generic method, get the
12584         MonoGenericContainer from our MonoMethodNormal and create a
12585         MonoGenericContext from it.
12586
12587 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
12588
12589         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
12590
12591         * basic-long.cs: Add test for checked i8->i2 cast.
12592
12593 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12594
12595         * inssel-ppc.brg: added a couple of speedup rules.
12596
12597 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
12598
12599         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
12600         to speed up rebuilds.
12601
12602 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12603
12604         * mini-s390.c: Minor fix to OP_OR_IMM.
12605
12606 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
12607
12608         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
12609         better. Fixes appdomain-unload.exe on sparc.
12610
12611 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
12612
12613         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
12614         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
12615         see bug 67324.
12616
12617 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
12618
12619         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
12620
12621 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
12622
12623         * mini.c: Always generate a field read/write wrapper for members
12624         of the class MarshalByRefObject since the actual instance could
12625         be a CBO.
12626
12627 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
12628
12629         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
12630
12631 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
12632
12633         * driver.c mini.h trace.c: Move the setting of the main assembly into
12634         a separate function called mono_trace_set_assembly () and call it after
12635         actually loading the main assembly. Fixes #66872.
12636
12637 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
12638
12639         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
12640         using the code manager.
12641
12642 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
12643
12644         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
12645
12646 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
12647
12648         * cpu-amd64.md: Fix bug in previous patch.
12649         
12650         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
12651         #66650.
12652
12653 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
12654
12655         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12656         mini-exceptions.c: updates for changed stack walk interface.
12657
12658 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12659
12660         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
12661
12662 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
12663
12664         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
12665
12666 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
12667
12668         * driver.c (mini_regression_list): Do not call mono_assembly_close 
12669         since assemblies can't be unloaded.
12670         
12671 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12672
12673         * cpu-amd64.md: Fix more instruction lengths.
12674
12675         * cpu-amd64.md: Fix lengths of some instructions.
12676
12677 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
12678
12679         * inssel.brg: Make the array ldelema check aot friendly.
12680
12681 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12682
12683         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
12684
12685         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
12686
12687 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
12688
12689         * mini-x86.c: Fix build.
12690
12691         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
12692         mono_type_get_underlying_type () helper function to simplify code.
12693         
12694 2004-09-09  Martin Baulig  <martin@ximian.com>
12695
12696         * mini-amd64.c: Don't access `type->data.klass' directly, call
12697         mono_class_from_mono_type() instead since the type may be a
12698         generic instance.
12699
12700 2004-09-09  Martin Baulig  <martin@ximian.com>
12701
12702         * mini-amd64.c (get_call_info): Fix support for generic instances.
12703         (add_valuetype): Use mono_class_from_mono_type() to get the class
12704         since we can be a generic instance.
12705
12706 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
12707
12708         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
12709
12710 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
12711
12712         * liveness.c: reset spill costs on each scan: bug 62107
12713
12714 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
12715
12716         * exceptions-sparc.c (mono_arch_find_jit_info): remove
12717         unnecessary line that doesn't compile
12718
12719 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12720
12721         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
12722         trampolines, make them call an error function so people can fix their
12723         code.
12724
12725 2004-09-06  Martin Baulig  <martin@ximian.com>
12726
12727         * mini.c (mono_method_to_ir): When initializing locals, handle a
12728         generic instances like a valuetype if it's a valuetype and like a
12729         class if it's a class.
12730
12731 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12732
12733         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
12734         stack. Fixes #64674.
12735
12736         * exceptions.cs: Add test for unwinding of call arguments.
12737
12738 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
12739
12740         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
12741         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
12742         set the carry/borrow flag). The sparc and s390 implementations
12743         can now use optimized versions (and simplify the code). ppc bugfixes.
12744
12745 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12746
12747         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
12748
12749 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
12750
12751         * inssel-amd64.brg: Remove leftover 32 bit rule.
12752
12753         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
12754
12755 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
12756
12757         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
12758         mono_arch_find_jit_info functions into a new function. Fix a memory
12759         leak.
12760
12761         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
12762         refactored code.
12763         
12764 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12765
12766         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
12767         as well.
12768         
12769         * exceptions.cs: Add array size tests.
12770
12771         * mini.c: Allocate a separate icall wrapper for each arity of 
12772         mono_array_new_va. Fixes #59509.
12773
12774         * exceptions.cs: Add testcase for 64578.
12775
12776         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
12777
12778         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
12779         
12780 2004-09-02  Martin Baulig  <martin@ximian.com>
12781
12782         * mini.c (mono_method_to_ir): When initializing the locals, call
12783         handle_initobj() on the generic instance itself, not its
12784         underlying type.
12785
12786 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12787
12788         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
12789         MonoJitInfo for dynamic methods.
12790
12791         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
12792
12793         * mini.c: Add support for freeing JIT data for dynamic methods.
12794         
12795 2004-09-01  Martin Baulig  <martin@ximian.com>
12796
12797         * mini-x86.c (is_regsize_var): Added support for generic
12798         instances.
12799         (mono_arch_emit_prolog): Make this compile again, use
12800         `x86_push_imm_template (code)'.
12801
12802 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
12803
12804         * mini-x86.c: make all push_imm instructions that get
12805         patched always emit the long form
12806
12807 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
12808
12809         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
12810         in a per-domain hash.
12811
12812         * mini-amd64.c (merge_argument_class_from_type): Handle generic
12813         types.
12814
12815 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
12816
12817         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
12818         work.
12819         
12820         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
12821         work.
12822
12823         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
12824         Beginnings of SSE2 support.
12825
12826         * exceptions.cs: Add more tests for checked int<->uint casts.
12827
12828 2004-08-28  Martin Baulig  <martin@ximian.com>
12829
12830         * mini-x86.c (mono_arch_instrument_epilog): Added support for
12831         generic instances.
12832
12833         * mini.c
12834         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
12835         Handle generic instances recursively.
12836
12837 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12838
12839         * iltests.il: test for conv.u8 on a constant
12840
12841 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12842
12843         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
12844         LCONV_x4 (shrun_32 (membase)).
12845
12846 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12847
12848         * inssel-x86.brg: c&p rules for push/setret of long
12849
12850 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12851
12852         * inssel-x86.brg: c&p rules for compare (base, regvar) and
12853         compare (regvar, base)
12854
12855         * inssel-x86.brg: more burg love
12856
12857         * inssel.brg: more cleanup
12858
12859         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
12860
12861 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12862
12863         * basic-long.cs, basic-calls.cs: new tests for optimization.
12864
12865 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
12866
12867         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
12868         patch.
12869
12870 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12871
12872         * mini-amd64.c (read_tls_offset_from_method): Add another case.
12873         
12874 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
12875
12876         * inssel.brg (mini_emit_memcpy): use 
12877         NO_UNALIGNED_ACCESS to disable memcpy optimization
12878
12879 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12880
12881         * mini-amd64.c: Handle generic types in various places.
12882
12883         * mini.c (mono_method_to_ir): Handle generic types in init locals.
12884
12885 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
12886
12887         * mini.c (handle_box): Fix warning.
12888
12889         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
12890
12891         * mini-amd64.h: Enable the emit_state optimization.
12892
12893         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
12894
12895         * mini-amd64.c: Add some new 64 bit peephole opts.
12896
12897         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
12898
12899         * cpu-amd64.md: sreg1 of div instructions must be %rax.
12900
12901         * mini-amd64.c: Register allocator fixes.
12902
12903         * mini.c: Add an optimization to emit_state to avoid allocation of new
12904         registers on some platforms.
12905
12906 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
12907
12908         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
12909
12910         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
12911         allocation. Fixes #63085.
12912
12913         * basic-long.cs: Add new regression test.
12914
12915         * mini-amd64.c: Register allocator improvements.
12916
12917 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
12918
12919         * mini-amd64.c (read_tls_offset_from_method): Add another code
12920         sequence.
12921
12922         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
12923         instruction sequence for nullifying class init trampolines.
12924
12925         * objects.cs: Add new regalloc test.
12926
12927         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
12928
12929 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12930
12931         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
12932         
12933         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
12934         arguments.
12935
12936         * driver.c: Fix profiling after TLS changes.
12937         
12938         * driver.c (mono_main): Set mono_stats.enabled if needed.
12939
12940         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
12941         CEE_BOX.
12942
12943 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
12944
12945         * mini-x86.c: use a 1 op rather than a 2 op tls access
12946         instruction -> faster.
12947
12948 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12949
12950         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
12951         x86 backend.
12952
12953 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
12954
12955         * exceptions-sparc.c (throw_exception): fix typo
12956
12957 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
12958
12959         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
12960         set tree->dreg correctly with tls. Allow any
12961         register to be used.
12962
12963         * mini-x86.c (read_tls_offset_from_method): add new code
12964         generation pattern seen with GCC.
12965
12966
12967 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12968
12969         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
12970         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12971         exceptions-sparc.c: fix some performance issues in exception
12972         handling and setting of the stack trace for exceptions that were
12973         already thrown.
12974
12975 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12976
12977         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
12978         x86 backend.
12979         
12980         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
12981         registers.
12982
12983 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
12984
12985         This patch inlines tls access, when possible.
12986         
12987         * mini.h: new arch functions for TLS intrinsics.
12988         All platforms updated with a stub.
12989
12990         * mini.c: use the new intrinsics
12991
12992         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
12993         arch specific intrinsic for tls variables
12994
12995 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12996
12997         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
12998         under windows.
12999
13000 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13001
13002         * mini.c: thread local allocation
13003
13004 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
13005
13006         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
13007
13008         * Makefile.am: Link against the static version of libmonogc.
13009         
13010         * Makefile.am: Link the static versions of the convenience libraries
13011         into the mono executable.
13012
13013         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
13014
13015 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
13016
13017         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
13018         on integer overflow.
13019
13020         * mini-amd64.c: Reorganize function call code.
13021
13022         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
13023
13024 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13025
13026         * inssel-x86.brg: use xor eax,eax.
13027         
13028         * basic.cs: new tests
13029
13030 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13031
13032         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
13033         in exception throwing code.
13034         
13035 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13036
13037         * inssel-x86.brg: use xor esi,esi.
13038
13039 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13040
13041         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
13042         can trace methods compiled during mini_init () too.
13043
13044         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
13045         CEE_CONV_U4.
13046
13047 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13048
13049         * Makefile.am: static link on x86 (r=zoltan)
13050
13051 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13052
13053         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
13054         code since it causes some programs to fail.
13055
13056 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
13057
13058         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
13059
13060 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
13061
13062         * mini.c: ovfops_op_map - add STACK_OBJ case for
13063         CONV_I 
13064         * basic.cs: add test_0_pin_string as test
13065         case for above.
13066
13067 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
13068
13069         * Makefile.am: build C# if srcdir != builddir
13070
13071 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13072
13073         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
13074         fall-through blocks.
13075
13076 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13077
13078         * driver.c: enable loop by default again and include abcrem in -O=all.
13079
13080 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
13081
13082         * iltests.il: Add some localloc tests.
13083
13084         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
13085
13086         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
13087         Fixes #62574.
13088
13089         * inssel-amd64.brg: Add some optimizations.
13090
13091         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
13092         for gcc-3.4.
13093
13094         * Makefile.am: Statically link mono against libmono on AMD64.
13095         
13096         * mini-amd64.c inssel-amd64.brg: Optimizations.
13097
13098 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
13099
13100         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
13101
13102         * tramp-amd64.c: Patch calling code in trampolines.
13103
13104 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
13105
13106         * mini-amd64.c: pinvoke struct passing fixes.
13107
13108 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
13109
13110         * mini-sparc.c: redo change, make mono_arch_cpu_init call
13111         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
13112
13113 2004-08-05  Duncan Mak  <duncan@ximian.com>
13114
13115         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13116         CEE_LDELEM_ANY.
13117
13118 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13119
13120         * mini-amd64.c (emit_move_return_value): Move return value for normal
13121         calls too.
13122
13123 2004-08-05  Martin Baulig  <martin@ximian.com>
13124
13125         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
13126         `type->type'; just modify `type' itself when dealing with enums
13127         and generic instances.
13128         (check_call_signature): Make `simple_type' a `MonoType *'.
13129
13130 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13131
13132         * mini.c: Use OP_PADD to add offsets to addresses.
13133
13134         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
13135
13136 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
13137
13138         * mini-sparc.c (mono_arch_emit_epilog): fix check
13139         for folding last op into restore instruction
13140
13141 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13142
13143         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
13144         helper methods using the code manager.
13145         
13146         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
13147
13148         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
13149
13150 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13151         
13152         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
13153           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
13154
13155         * mini-s390.c: fix tail processing
13156
13157 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
13158
13159         * mini-ppc.c: mul.ovf.un exception name fix.
13160
13161 2004-08-03  Martin Baulig  <martin@ximian.com>
13162
13163         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
13164         instances; before jumping to `handle_enum', also modify `ptype'.
13165
13166 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
13167
13168         * cpu-sparc.md: fcall maximal length too small.
13169
13170 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
13171
13172         * mini-amd64.c mini.h: Add initial support for passing/returning 
13173         structures to/from pinvoked methods.
13174
13175 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
13176
13177         * mini-ppc.c: reg allocator fix.
13178
13179 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
13180
13181         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
13182
13183         * inssel.brg: Optimize memset on 64 bit machines.
13184
13185         * mini-amd64.c: Fix some vararg cases.
13186
13187 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13188
13189         * mini-s390.c: Corrected macro in emit_float_to_int
13190
13191         * s390-abi.cs: Tests to exercise the s390 ABI
13192
13193 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13194
13195         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
13196         caller saved regs.
13197
13198         * basic.cs: Add a test for add.ovf.un.
13199
13200 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
13201
13202         * mini-sparc.c: add case for OP_IDIV_UN
13203
13204 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13205
13206         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
13207         
13208         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
13209
13210 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
13211
13212         * basic.cs: regression tests.
13213
13214         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
13215         regressions.
13216
13217 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13218
13219         * basic.cs: Add a new test.
13220
13221         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
13222         and AOT. Various fixes and optimizations.
13223
13224         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
13225
13226 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13227
13228         * mini-ppc.c: make sure temp regs are not used for global reg
13229         allocation.
13230
13231 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
13232
13233         * cpu-sparc.md: conv_i8 fix for 64bits
13234
13235         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
13236
13237 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
13238         
13239         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
13240         add opcode for cmp BYTE PTR [eax], imm.
13241
13242         * inssel.brg: Make memcpy and memset takes bases.
13243
13244 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13245
13246         * *-amd64.*: More AMD64 work.
13247         
13248 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13249
13250         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
13251         add a compare-not-equal opcode.
13252         
13253 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
13254
13255         * mini.c: Use mono_init_from_assembly instead of mono_init.
13256         
13257 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13258
13259         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
13260
13261         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
13262
13263         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
13264
13265         * inssel.brg: 64 bit fixes.
13266
13267         * mini.h (MonoCallInst): Add some AMD64 specific data.
13268
13269         * mini.h: Add some OP_P opcodes.
13270
13271 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13272
13273         * basic.cs: tests for 61797 and 61740
13274
13275 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13276
13277         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
13278         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
13279
13280 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
13281
13282         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
13283
13284         * *-amd64*.*: Ongoing AMD64 work.
13285
13286 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
13287
13288         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
13289
13290         * *-amd64*: Ongoing AMD64 work.
13291
13292         * mini-arch.h: Add AMD64 support.
13293
13294         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
13295
13296         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
13297
13298         * mini-ops.h: Add new opcodes.
13299
13300         * Makefile.am: Add AMD64 support.
13301
13302         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
13303         rules into the inssel-long*.brg files.
13304
13305         * *-amd64.*: Add beginnings of AMD64 backend.
13306
13307 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
13308
13309         * mini.c (print_dfn): commenting out the code that prints
13310         the cil. With -O=deadce, this makes -v -v crash.
13311         
13312         * cpu-pentium.md: make checkthis have a length of 2
13313
13314 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
13315
13316         * mini-sparc.h: fix implementations of __builtin
13317         functions for Sun compiler for V9.
13318
13319 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
13320
13321         * mini.c: use the new stelem.ref wrapper
13322         * exceptions.cs, arrays.cs: new stelem.ref tests
13323
13324 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13325
13326         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
13327         new XSP should work with these changes).
13328
13329 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
13330         
13331         * inssel-{long32,x86,}.brg: trivial optimizations.
13332         
13333 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
13334
13335         * mini.c: load value when emitting box operation in
13336         constrained calls.
13337
13338 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
13339
13340         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
13341         is one byte shorter than cmp DWORD PTR [eax], 0.
13342
13343 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13344
13345         * inssel-ppc.brg: arguments on the stack are always
13346         relative to the stack pointer (spotted by Neale Ferguson).
13347
13348 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13349
13350         * exceptions-x86.c: delay appending the method name to the trace until
13351         after mono_jit_info_table_find is called, as this gets the real
13352         MonoMethod.
13353
13354 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
13355
13356         * aot.c: register roots
13357
13358 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13359
13360         * aot.c : I could just use PLATFORM_WIN32 flag.
13361
13362 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13363
13364         * aot.c : Reverting the previous fix. This time it broke linux build.
13365
13366 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13367
13368         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
13369
13370 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
13371
13372         * mini.c (handle_stack_args): Remove some more debugging code.
13373         
13374         * mini.c (handle_stack_args): Remove debug output left in by mistake.
13375
13376         * driver.c mini.h aot.c: Allow additional options to be specified with
13377         --aot and pass them to mono_compile_assembly.
13378
13379         * aot.c: Add experimental code to AOT compile all loaded assemblies
13380         on demand and save the code into a cache in the filesystem.
13381
13382         * aot.c: Add support for more wrapper methods.
13383         
13384         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
13385         58863.
13386
13387         * cpu-*.md: Remove removed opcodes.
13388
13389         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
13390         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
13391         related icalls to marshal.c.
13392
13393 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
13394
13395         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
13396
13397         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
13398
13399         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
13400
13401 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
13402         * liveness.c: If liveness is recomputated we need to reset the information
13403         for each variable. This way, if the liveness range has been narrowed
13404         by optimizations that happened after the last computation, we can return
13405         a smaller range.
13406         
13407         For example, if you have
13408         
13409         {
13410                 int i = 0;
13411                 
13412                 // Tons of code that does not affect i
13413                 
13414                 i = foo ();
13415                 ...
13416         }
13417         
13418         i = 0 is dead code and will be removed by SSA. However, when
13419         linear scan gets to the code, i will still appear to be live
13420         throughout the entire block. This prevents good register allocation.
13421
13422 2004-07-06  Martin Baulig  <martin@ximian.com>
13423
13424         * debug-mini.c (mono_debug_init_method): Allow
13425         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
13426         (mono_debug_add_icall_wrapper): New method.
13427
13428         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
13429
13430 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
13431
13432         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
13433         optimization.
13434
13435 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
13436
13437         * aot.c (mono_aot_load_method): Fix loading of debug info.
13438
13439 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13440
13441         * aot.c: Add logging support.
13442
13443 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13444
13445         * mini.h: Add prototype for mono_print_method_from_ip.
13446
13447         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
13448
13449         * inssel.brg: 64 bit fixes.
13450
13451         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
13452         inssel-long32.brg.
13453
13454         * Makefile.am: Add SPARC64 support.
13455
13456 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13457
13458         * aot.c: Fix alignment problems on 32 bit platforms.
13459
13460 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13461
13462         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
13463         SPARC64.
13464
13465         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
13466         problems.
13467
13468         * mini.h: Bump AOT file version. Some 64 bit fixes.
13469
13470 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13471
13472         * inssel-sparc.brg: Add new rule to avoid register moves.
13473
13474         * inssel.brg: Add ldind_to_load_membase helper function.
13475
13476 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
13477
13478         * mini.c: OffsetToStringData intrinsic.
13479         
13480 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13481
13482         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
13483
13484         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
13485         regression tests.
13486
13487         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
13488 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13489
13490         * mini.c: reinstated mono_compile_get_interface_var()
13491         on x86, too, since the change breaks the Gtk# build there as well.
13492
13493 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13494
13495         * driver.c: remove loop from the default optimizations: it seems to
13496         interact badly with some of the other options (see bug #60613).
13497
13498 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
13499
13500         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
13501         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
13502
13503 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
13504
13505         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
13506         vararg-using methods.
13507
13508 2004-06-21  Martin Baulig  <martin@ximian.com>
13509
13510         * mini/mini-exceptions.c
13511         (mono_handle_exception): Added `gpointer original_ip' argument.
13512         After calling mono_unhandled_exception(), call
13513         mono_debugger_unhandled_exception() and if that returns true,
13514         restore the context and return.
13515
13516 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13517
13518         * mini-ppc.c: prefer the use of relative branches so
13519         they won't need to be patched in aot code (patch from Patrick Beard).
13520
13521 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13522
13523         * aot.c: patch from Patrick Beard to make the output assembly
13524         more correct for the MacOSX assembler. Small tweak to
13525         generate sane images on Linux/PPC, too.
13526
13527 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13528
13529         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
13530         case until bug #59509 is fixed (shows up in #60332).
13531
13532 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13533
13534         * mini.c: make sure the needed wrappers are compiled, too, with
13535         precomp.
13536
13537 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
13538
13539         * driver.c: remove NPTL reference in --version output.
13540
13541 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13542
13543         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
13544         generate valid assembly for the Mach-O assembler.
13545
13546 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13547
13548         * driver.c: don't include abcrem in the all optimization specifier
13549         since it slows down jit compilation too much for now.
13550
13551 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
13552
13553         * mini.c: use BIGMUL only if both operands have the same signage.
13554         * iltests.il: Test for bug 60056. (errors related to signage in
13555         BIGMUL).
13556
13557         r=lupus.
13558
13559 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
13560
13561         * mini.c, aot.c: memory leak fixes.
13562
13563 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13564
13565         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
13566
13567 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
13568
13569         * Makefile.am: remove the -static hack completely, it links in
13570         statically glib as well.
13571
13572 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
13573
13574         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
13575         * exceptions.cs: make it compile with new mcs/csc.
13576
13577 2004-06-03 Massimiliano Mantione <massi@ximian.com>
13578         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
13579         and added relevant test case.
13580
13581 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13582
13583         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
13584         regressions in gtk-sharp.
13585
13586 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
13587
13588         * exceptions.cs: New regression tests.
13589
13590         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
13591
13592 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13593
13594         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
13595
13596 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
13597
13598         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
13599
13600         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
13601
13602 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
13603
13604         * mini.c (mono_jit_runtime_invoke): Init class in this
13605         method instead of trusting mono_jit_compile_method to
13606         do the work (because wrappers can be in object class)
13607
13608 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
13609
13610         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
13611
13612         * basic-long.cs: New regression test.
13613
13614 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
13615
13616         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
13617         and div/rem checks.
13618
13619 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13620
13621         * Makefile.am: fix miguel's change to build mono statically against
13622         libmono (track build dependencies).
13623
13624 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13625
13626         * cfold.c: Some glib versions do not have G_MININT32.
13627
13628 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
13629
13630         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
13631         with precision of tan, atan, sin and cos, and implemented related
13632         regressions tests (fixes bug 54467, but one new problem appeared and
13633         is not fixed yet).
13634
13635 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13636
13637         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
13638
13639         * exceptions.cs: Add test for constant folding && division by zero.
13640
13641         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
13642         since driver.c is in libmono too, so the optimization was useless.
13643
13644         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
13645         variable to driver.c so the compiler can emit more efficient code to
13646         access them.
13647
13648 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13649
13650         * Makefile.am: don't distribute generated inssel.[ch] files.
13651
13652 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
13653
13654         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
13655         into the default appdomain. Fixes #58707.
13656
13657         * jit-icalls.c: Remove the broken approximation for truncl, doing
13658         no conversion is better.
13659
13660         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
13661         Fixes #58863.
13662
13663 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13664
13665         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
13666         of the mcrxr instruction which is not available on some processors
13667         even if it's documented to be. Implement add and sub overflow correctly
13668         (still not complete for long unsigned). Speed up icalls a bit.
13669
13670 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
13671
13672         * mini.c (mono_jit_compile_method_with_opt): Make sure that
13673         we run .cctor in the current domain instead of target_domain.
13674         
13675         Fixes bug #58558, .cctor not being called in -O=shared.
13676
13677 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13678
13679         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
13680
13681 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
13682
13683         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
13684         which can be done with an imm8, do it that way.
13685         (mono_arch_output_basic_block): ditto for a jmp
13686         (mono_arch_emit_prolog): Computate maximum offset of a label.
13687
13688 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
13689
13690         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
13691         now tries to allocate prefered physical reg's for virtual
13692         regs. This reduces the number of emited spills/loads with
13693         20-30% on our core assemblies.
13694
13695 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13696
13697         * jit-icalls.c: truncl() is not needed and trunc() is
13698         the correct thing to do anyway (bug #58287).
13699
13700 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
13701
13702         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
13703         if available.
13704
13705 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13706
13707         * driver.c: enable loop optimizations by default.
13708
13709 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13710
13711         * mini-x86.c: fix calc of max loop size when aligning loops start.
13712
13713 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
13714
13715         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
13716         the stack.
13717
13718 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
13719
13720         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
13721         should set carry.
13722
13723         * basic-long.cs: Add tests for add/subtract of immediates with carry.
13724
13725         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
13726         
13727         * mini.c (inline_method): Allways inline some wrappers even if the cost
13728         is too large. Fixes #58785.
13729
13730         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
13731         
13732 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
13733
13734         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
13735         (crichton@gimp.org). Beginning of support for sparc/linux.
13736
13737         * mini-sparc.c: Optimize retrieval of LMF address.
13738
13739 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
13740
13741         * exceptions-ppc.c:  handle alloca in methods with clauses.
13742
13743 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
13744
13745         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
13746
13747 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
13748
13749         * mini.c: Delegate most of the abort signal work to 
13750           mono_thread_request_interruption, which also handles Stop and Suspend
13751           states.
13752
13753 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
13754
13755         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
13756         supports the save/restore lmf opcodes.
13757
13758 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
13759
13760         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
13761         by gcc-3.4 as well.
13762
13763         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
13764
13765 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13766
13767         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
13768         methods which contain array accesses.
13769
13770         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
13771         boundaries. Fixes #58537.
13772
13773         * iltests.il: Add regression test for #58537.
13774
13775 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13776
13777         * mini-x86.c (mono_arch_local_regalloc): Last part of
13778         fix for bug #58633 (releasing register to early).
13779
13780 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
13781
13782         * basic-long.cs: Add new regression test.
13783
13784 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13785
13786         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
13787         register too early on the chain.
13788
13789 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13790
13791         * mini.c (create_helper_signature): Use a helper function to reduce
13792         the code which needs to be written. Also set the calling convention of
13793         icalls on windows. Fixes #57840.
13794
13795 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13796
13797         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
13798         exceptions-ppc.c: added helper function to get the instruction address
13799         from a signal handler context.
13800
13801 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13802
13803         * helpers.c: use g_get_tmp_dir. Invokes happyness 
13804         from gonzalo.
13805
13806 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13807
13808         * helpers.c: Add new env variable to pass args to objdump.
13809         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
13810
13811 2004-05-17  Radek Doulik  <rodo@ximian.com>
13812
13813         * Makefile.am (common_sources): added abcremoval.h so it get
13814         disted and daily mono packages on go-mono.com will build again
13815
13816 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
13817
13818         * abcremoval.c: Fixed coding style, added copyright header.
13819
13820         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
13821
13822         * mini.h: Added prototype for abc removal main function.
13823
13824         * build_relations_propagation_table.pl: Added copyright header.
13825
13826 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13827
13828         * basic-long.cs: reg test for complex ceq_long bug.
13829
13830 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13831
13832         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
13833         reg in long and clob case (bug #58343). Fixed/added comments.
13834
13835 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
13836
13837         * mini.c (mono_jit_runtime_invoke): Follow new convention
13838         of calling the invoke method with an function pointer.
13839
13840 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
13841
13842         * ChangeLog: Fix author of memory leak patch.
13843
13844 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
13845
13846         * Makefile.am: fix make dist as well...
13847
13848
13849 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
13850
13851         * cfold.c: Made so that conversions from pointer to int4 are no-ops
13852         on archs where pointers are 4 bytes long.
13853
13854         * Makefile.am: Added abcremoval.c source file.
13855
13856         * abcremoval.c: Added abcremoval.c.
13857
13858         * abcremoval.h: Added abcremoval.h.
13859
13860         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
13861
13862         * inssel.brg: Enabled bounds check removal.
13863
13864         * mini.c: Added support for abcrem optimization.
13865
13866         * mini.h: Added abcrem optimization label.
13867
13868         * driver.c: Added support for abcrem optimization.
13869
13870         * propagated_relations_table.def: Added propagated_relations_table.def.
13871
13872 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
13873
13874         * mini.c, cfold.c: fix style.
13875
13876 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13877
13878         * mini.c: handle issue with the low-level implementation of
13879         some long opcodes (bug #54209).
13880
13881 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
13882
13883         * basic.cs: test for my new cmov stuff.
13884
13885 2004-05-13      Patrik Torstensson
13886
13887         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
13888         opt and added peephole documentation.
13889
13890 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
13891
13892         * tramp-ppc.c: rewrote the generic trampoline code.
13893
13894 2004-05-11      Patrik Torstensson
13895
13896         * mini-x86.c: optimize long shl/shr asm code (one less branch)
13897
13898 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
13899
13900         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
13901
13902         * mini.h mini.c dominators.c: Applied patch from Derek Woo
13903         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
13904
13905         * mini.c: Add new icalls for AsAny marshalling.
13906
13907 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13908
13909         * tramp-ppc.c, mini-ppc.c: more cleanups.
13910
13911 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13912
13913         * mini.c: no warnings.
13914
13915 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13916
13917         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
13918
13919 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
13920
13921         * mini.c: In the thread abort signal handler, if the thread is in the
13922         process of being stoped, don't throw the Abort exception, just stop the
13923         thread.
13924
13925 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
13926
13927         * tramp-ppc.c: removed old code.
13928
13929 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13930
13931         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
13932         do some simple speed optimizations on ppc.
13933
13934 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13935
13936         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
13937         and large offsets in load/store.
13938
13939 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13940
13941         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
13942         it causes regressions.
13943
13944 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13945
13946         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
13947         support.
13948
13949 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13950
13951         * jit-icalls.c: remove warnings.
13952         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
13953         speedups for unsafe code.
13954
13955 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
13956
13957         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
13958
13959 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
13960
13961         * basic-calls.cs: Add new regression test.
13962
13963         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
13964         more portable.
13965
13966         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
13967
13968         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
13969         is no longer used.
13970
13971 2004-05-06      Patrik Torstensson
13972
13973         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
13974         long reg allocation in any reg (not only eax:edx) and implemented 
13975         long shl/shr ops in asm instead of helpers.
13976
13977 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
13978
13979         * mini-sparc.h: Fix warnings.
13980
13981         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
13982         stack.
13983
13984         * mini-exceptions.c (mono_handle_exception): Call the filter in a
13985         separate statement for clarity.
13986
13987         * mini-sparc.c: Update status.
13988
13989 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
13990
13991         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
13992         here.
13993
13994 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13995
13996         * inssel-ppc.brg: another small pre-release workaround:
13997         we don't do overflow detection for long_sub_un.
13998
13999 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14000
14001         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
14002         (also works around a weird ppc bug: 57957).
14003
14004 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
14005
14006         * tramp-ppc.c: trampoline fixes.
14007
14008 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
14009
14010         * mini-ppc.c: fixed typos.
14011
14012 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14013
14014         * mini-ppc.c, exceptions-ppc.c: more code saves registers
14015         at the top of the stack. Fixed typos. Use a frame registers
14016         for all the methods with exception clauses.
14017
14018 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14019
14020         * exceptions-ppc.c: restore fp registers.
14021
14022 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14023
14024         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
14025         order from the stack top (moved the stack room to save the
14026         return value for trace after the param area). Fixed corruption
14027         in restoring registers on unwind.
14028
14029 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14030
14031         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
14032
14033 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14034
14035         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
14036         and prolog/epilog for methods that use it. Allow
14037         enough param area room for varargs methods. Fix miguel's
14038         breakage in exception handling.
14039
14040 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14041
14042         * Makefile.am: run genmdesc only on current arch.
14043
14044 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14045
14046         * exceptions-x86.c:
14047         * mini-x86.h: fix the build on windows.
14048
14049 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
14050
14051         * 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.
14052
14053         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
14054
14055         * mini-exceptions.c: New file.
14056         
14057         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
14058         Move some parts of the x86 exception handling code to an 
14059         arch-independent file so it can be shared with other ports.
14060
14061 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
14062
14063         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
14064
14065 2004-04-26  David Waite  <mass@akuma.org>
14066
14067         * driver.c: remove comma from end of enumeration declaration
14068
14069 2004-04-26  Jackson Harper  <jackson@ximian.com>
14070
14071         * driver.c: parse config file before loading first assembly. This
14072         allows the user gac to be enabled/disabled. 
14073         
14074 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
14075
14076         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
14077         simpler mechanism: we do not care what is encoded initially
14078         (branch absolute or relative), we care about the code and its
14079         target.  I kept the old code for reference for now.
14080
14081         The new code tries first to determine if the jump is anywhere in
14082         the -/+32 absolute meg range, if it succeeds, it encodes using the
14083         absolute branch;  If not, it tried to find something in the
14084         relative range, if not, it uses the handle_thunk code. 
14085
14086 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
14087
14088         * exceptions-ppc.c: use the correct ip register on macosx.
14089
14090 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
14091
14092         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
14093
14094 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
14095
14096         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
14097         Raise exception on integer divide by zero by hand since the hw
14098         doesn't support it. Handle NaNs in FP compares.
14099
14100 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
14101
14102         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
14103         code reducing duplication between the platforms and enabled
14104         signal exception handling (on linux for now).
14105
14106 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
14107
14108         * exceptions-ppc.c: more macosx support.
14109
14110 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14111
14112         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
14113
14114 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
14115
14116         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
14117
14118 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
14119
14120         * iltests.il: more tests.
14121
14122 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14123
14124         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
14125         vars as well.
14126
14127 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14128
14129         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
14130
14131 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14132
14133         * liveness.c: Mark variables as volatile in all basic blocks reachable
14134         from exception clauses.
14135
14136 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
14137
14138         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
14139         inlining.
14140
14141 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
14142
14143         * iltests.il, basic.cs: more tests for regalloc.
14144
14145 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14146
14147         * iltests.il: Some tests for register allocation modifications
14148         I have locally.
14149
14150 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
14151
14152         * exceptions.cs: Add regression test for bug #56782.
14153
14154         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
14155         original stack trace if an exception is rethrown. Fixes #56782. Oh,
14156         the beauty of fixing the same thing in 5 different files...
14157
14158 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
14159
14160         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
14161         methods.
14162
14163 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
14164
14165         * mini.c: Add support for STRWLPARRAY marshalling convention.
14166
14167 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
14168
14169         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
14170         to init the context to setup the regs pointer).
14171
14172 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14173
14174         * exceptions-ppc.c: more exceptions work.
14175
14176 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14177
14178         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
14179         not allowed.
14180
14181 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14182
14183         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
14184         can use the memory directly.
14185
14186         * cpu-pentium.md: Update documentation from a post from Zoltan. 
14187
14188         add x86_add_membase, x86_sub_membase, x86_mul_membase
14189
14190 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14191
14192         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
14193         GENERAL_REGS they were also hardcoded for all PPC ports.
14194
14195         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
14196
14197         Remove hard-coded limit for floating point registers, use
14198         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
14199
14200         Notice that in MacOS X calling conventions you can fit a lot more
14201         floating point values in registers, so I should update the PInvoke
14202         test to excercise the passing of floating point values on the
14203         stack (currently broken).
14204         
14205 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
14206
14207         * tramp-ppc.c (create_trampoline_code): Added
14208         JUMP_TRAMPOLINE_SIZE. 
14209         (ppc_magic_trampoline): Follow the pattern from
14210         x86_magic_trampoline: if code is set to zero, return. 
14211         (create_trampoline_code): Always pass MonoMethod to the jump
14212         trampoline, before it was passing a null.
14213         (mono_arch_create_jump_trampoline): Implement the jump stub, could
14214         share the code with mono_arch_create_jit_trampoline. 
14215
14216         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
14217         implemented.
14218         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
14219         implemented.  
14220
14221         * cpu-g4.md: Added length for jmp instruction, the worst case
14222         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
14223         for save_lmf).
14224
14225 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
14226
14227         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
14228
14229 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
14230
14231         * mini.c: Only set bblock->real_offset when adding a new bblock, and
14232         before each IL instruction.
14233
14234         * mini.c (CEE_BOX): Fix warnings.
14235
14236 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14237
14238         * mini.c: removed a few unused vars and extra whitespace.
14239
14240 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
14241
14242         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
14243         checks.
14244         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
14245         index.
14246         (OP_GETCHR): use the above
14247         (CEE_LDELEMA): use the above.
14248
14249         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
14250         version of the generic impl.
14251         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
14252         (CEE_LDELEMA): use the above.
14253
14254 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14255
14256         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
14257         Fixes #56317.
14258
14259         * iltests.il: Added new regression test for #56317.
14260
14261 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14262
14263         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
14264         under NetBSD. Fixes #56450.
14265
14266         * liveness.c (update_gen_kill_set): Fix previous patch.
14267
14268 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14269
14270         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
14271
14272 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
14273
14274         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
14275         ldsfld and ldsflda.
14276
14277         * inssel-sparc.brg: Add more optimizations.
14278
14279         * mini-sparc.c: Replace multiply/divide with shifts if possible.
14280
14281 2004-04-01  Martin Baulig  <martin@ximian.com>
14282
14283         * mini.c (handle_box): New static function; moved the
14284         implementation of CEE_BOX here.
14285         (mono_method_to_ir): Added `constrained_call' variable.
14286         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
14287         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
14288         mono_method_get_constrained() to get the method.
14289
14290 2004-04-01  Martin Baulig  <martin@ximian.com>
14291
14292         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
14293         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
14294         (mono_method_to_ir): We don't need these macros anymore since
14295         mono_class_get_full() already takes care of it. 
14296
14297 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14298
14299         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
14300         use @function (as doesn't accept #function here) and check the return
14301         value of system and stop if fails.
14302
14303 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14304
14305         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
14306
14307 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
14308
14309         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
14310
14311         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
14312
14313         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
14314         #56223.
14315
14316         * basic-long.cs: Add test for negation of Int64.MinValue.
14317
14318 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
14319
14320         * mini-sparc.c: Update status.
14321
14322         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
14323
14324         * exceptions-sparc.c: Fix return value in filters.
14325
14326         * inssel-sparc.brg: Fix register allocation in some rules.
14327
14328 2004-03-28  Martin Baulig  <martin@ximian.com>
14329
14330         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
14331         if neccessary.  
14332
14333 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
14334
14335         * mini-x86.c (mono_arch_patch_code): Fix warnings.
14336         
14337         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
14338         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
14339         remove unused conv_u4 opcode.
14340
14341         * mini-x86.c: Remove valgrind workaround since it slows down things
14342         even when mono is not run under valgrind.
14343
14344 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
14345
14346         * mini-sparc.c: Update status.
14347
14348         * inssel-sparc.brg: Add some optimizations.
14349
14350         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
14351         future delay slot filling. Add support for varargs, tail calls and JMP.
14352
14353         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
14354         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
14355
14356         * inssel.brg: Fix register allocation in OP_ARGLIST.
14357
14358         * inssel.brg: Fix warnings.
14359
14360 2004-03-25  Martin Baulig  <martin@ximian.com>
14361
14362         * mini.c (inflate_generic_field): Removed.
14363         (mini_get_method): Removed, use mono_get_method_full(),
14364         (mini_get_class): Removed, use mono_class_get_full().
14365         (mono_method_to_ir): Pass our generic context to
14366         mono_field_from_token().        
14367
14368 2004-03-25  Martin Baulig  <martin@ximian.com>
14369
14370         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
14371         of a `MonoMethod *'.
14372         (mini_get_method): Take a `MonoGenericContext *' instead
14373         of a `MonoMethod *'.
14374         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
14375         a new local variable called `generic_context' which holds the
14376         current `MonoGenericContext *'; use it to lookup things.
14377
14378 2004-03-24  Martin Baulig  <martin@ximian.com>
14379
14380         * mini.c (mini_get_class): New static method; if we're inside a
14381         generic instance, inflate the class if neccessary.
14382         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
14383
14384 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
14385
14386         * iltests.il: New regression test for #55976.
14387
14388         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
14389         #55976.
14390
14391 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
14392
14393         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
14394         output.
14395
14396 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
14397
14398         * liveness.c: Consider SSA stores as well as loads when making vars
14399         volatile.
14400
14401         * exceptions.cs: New regression tests for register allocation.
14402         
14403 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
14404
14405         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
14406         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
14407           domain lock only to protect puntual access to data structures.
14408           Added access lock for sighash, jit_icall_hash_name, 
14409           jit_icall_hash_addr and domain->code_mp.
14410
14411 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
14412
14413         * driver.c: Print SIGSEGV handling method.
14414
14415         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
14416
14417         * mini.c (setup_jit_tls_data): Handle case when this is called
14418         multiple times for a thread.
14419
14420         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
14421         is different from fbxx_un. Fixes #54303. Also use constants instead of
14422         magic numbers in a lot of places.
14423
14424 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
14425
14426         * exceptions.cs: Fix cctor test when --regression is used.
14427
14428 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
14429
14430         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
14431         for Linux/ppc.
14432
14433 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14434
14435         * inssel-ppc.brg: fixed register assignments for some rules.
14436
14437 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14438
14439         * exceptions.cs: Add test for exceptions in static constructors.
14440
14441         * mini.c (mono_jit_compile_method_with_out): Move the calling of
14442         static constructors outside the domain lock. Fixes #55720.
14443
14444 2004-03-17  Martin Baulig  <martin@ximian.com>
14445
14446         * mini.c (get_generic_field_inst): Removed, this'll never happen.
14447         (inflate_generic_field): Take the `MonoMethod *' instead of the
14448         `MonoClass *' and added support for generic method.
14449         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
14450         have a `field->parent->gen_params', only inflate the field if it's
14451         an open constructed type.
14452
14453 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14454
14455         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
14456         exception object instead of the preconstructed ones.
14457
14458 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14459
14460         * mini.c: reverted changed to sigsegv_signal_handler commited
14461         accidentally in the previous patch.
14462
14463 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14464
14465         * mini.c:
14466         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
14467         running --aot with an old assembly.
14468
14469 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
14470
14471         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
14472         point values.
14473
14474         * mini-sparc.c: Add support for v9 branches with prediction.
14475
14476 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
14477
14478         * mini.c (mini_init): #warning is GNUC only
14479
14480         * mini-sparc.h: implement __builtin_frame_address
14481         and __builtin_return_address for Sun C compiler
14482
14483 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
14484
14485         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
14486
14487 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
14488
14489         * basic-calls.cs: Add test for unaligned byref long argument passing.
14490
14491         * mini-ops.h: Add sparcv9 compare and branch instructions.
14492
14493         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
14494         v9 instructions if we have a v9 cpu.
14495
14496         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
14497         registers for global allocation.
14498
14499         * exceptions-sparc.c: Fixes.
14500         
14501 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
14502
14503         * liveness.c (mono_analyze_liveness): Optimized version.
14504
14505         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
14506
14507         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
14508         sparc work.
14509
14510         * basic-float.cs basic-calls.cs: New regression tests.
14511
14512 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
14513
14514         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
14515         sigaltstack implementation.
14516
14517         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
14518         
14519         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
14520         stuff if SIGSEGV_ON_ALTSTACK is not defined.
14521
14522 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
14523
14524         * mini.c: Fix warnings.
14525         
14526         * mini.c (mono_resolve_patch_target): New function which contains the
14527         arch independent part of the patching process.
14528
14529         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
14530         patching code to a separate function.
14531
14532 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
14533
14534         * mini.c (add_signal_handler): ifdef out on Windows
14535
14536 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
14537
14538         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
14539         cpu-sparc.md: Add exception handling support + other fixes.
14540
14541         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
14542         typed GC detection in --version.
14543
14544         * basic.cs exceptions.cs: New regression tests.
14545
14546         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
14547         the arch specific code can store data during a compilation.
14548
14549         * mini-ops.h: Add OP_SETFRET.
14550
14551         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
14552         function, register a separate icall for each arity, so the icalls can
14553         get a wrapper.
14554         
14555         * mini.c (mono_print_tree): Print negative offsets in a more readable
14556         form.
14557         
14558         * mini.c: Make signal handling work on sparc.
14559         
14560         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
14561
14562         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
14563
14564         * jit-icalls.c: Emulate truncl by aintl on solaris.
14565
14566         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
14567
14568 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
14569
14570         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
14571
14572 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
14573
14574         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
14575         a MarshalByRef type, inline a method that performs the check, taking into
14576         account that the object can be a proxy. Also implemented tow new opcodes:
14577         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14578         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
14579         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14580
14581 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
14582
14583         * mini-ppc.c: if a relative branch displacement is too big
14584         but it points to and area reachable with an absolute branch, 
14585         avoid the thunks.
14586
14587 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
14588
14589         * mini.c: optimize small copies in cpblk.
14590
14591 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
14592
14593         * basic-calls.cs basic-float.cs: New regression tests.
14594
14595         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
14596         negative offsets from %fp. Implement localloc. Fix local register 
14597         allocation. Fix the case when the this argument needs to be saved to
14598         the stack. Implement some missing opcodes.
14599
14600 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
14601
14602         * mini.c (mini_method_compile): Reenable global regalloc in methods
14603         with exception handlers.
14604
14605         * linear-scan.c (mono_varlist_sort): Fix warning.
14606
14607         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
14608
14609         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
14610         regalloc costs.
14611
14612         * liveness.c: Make all variables uses in exception clauses volatile, to
14613         prevent them from being allocated to registers. Fixes #42136.
14614
14615 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
14616
14617         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
14618         causes regressions.
14619
14620         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
14621         argument to mono_arch_regalloc_cost.
14622
14623         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
14624         precisely.
14625
14626 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
14627
14628         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
14629         Make the cost of allocating a variable to a register arch dependent.
14630
14631         * basic-calls.cs: Fix compilation of tests.
14632         
14633         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
14634         helper function to cut back on the number of #ifdefs needed.
14635
14636         * mini-ppc.c: Fix compilation.
14637
14638         * basic-calls.cs: New regression tests.
14639
14640         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
14641
14642         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
14643         of l0 since that is callee saved.
14644
14645         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
14646         to virtual calls.
14647
14648         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
14649         of delay instruction.
14650
14651         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
14652
14653         * mini.h (MonoCallInst): Add 'virtual' flag.
14654
14655         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
14656
14657 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
14658
14659         * *.cs: New regression tests.
14660
14661         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
14662         work.
14663
14664         * mini.c (mono_runtime_install_handlers): Fix build.
14665
14666         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
14667         'signal_stack_size' members.
14668
14669         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
14670         alternate signal stack.
14671
14672         * exceptions-x86.c: Add stack overflow handling.
14673
14674         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
14675         functions to arch independent code.
14676
14677         * mini.c (mono_print_tree): Print more detailed info for load_membase
14678         opcodes.
14679         
14680 2004-02-23  Martin Baulig  <martin@ximian.com>
14681
14682         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
14683
14684 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14685
14686         * mini-x86.c: fixed reg allocation for div/rem.
14687
14688 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
14689
14690         * driver.c (mono_main): Report some configuratio options on --version.
14691
14692 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
14693
14694         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
14695         low in the address space. Correctly flush memory in thunks where we
14696         output native code.
14697
14698 2004-02-20  Martin Baulig  <martin@ximian.com>
14699
14700         * mini.c (mini_get_method): New static method; inflate all generic
14701         methods and methods in open generic instances.
14702         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
14703         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
14704
14705 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14706
14707         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
14708
14709         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
14710
14711 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
14712
14713         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
14714
14715         * mini-sparc.c (flushi mono_arch_output_basic_block): make
14716         it compile using Sun's compiler.
14717
14718 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14719
14720         * 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.
14721
14722         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
14723
14724 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14725
14726         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
14727         code.
14728         * mini-ppc.c: handle calls outside of the allowed range with thunks
14729         allocated using the code manager.
14730         * tramp-ppc.c: use the code manager to hold generated native code.
14731         Fixed the magic trampoline to just patch vtable entries.
14732
14733 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
14734
14735         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
14736         independent file.
14737
14738 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
14739
14740         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
14741         PPC.
14742
14743         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
14744         if we have a working __thread implementation.
14745
14746         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
14747         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
14748
14749 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
14750
14751         * mini-x86.c: Fix compilation under gcc 2.
14752         
14753 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
14754
14755         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
14756         contains a call to the wrapped function.
14757
14758         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
14759         OP_<CALL>_IMM opcodes, and use them under X86.
14760         
14761         * mini.c (mono_jit_find_compiled_method): Fix warning.
14762
14763         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
14764
14765         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
14766
14767         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
14768         functionality to mini.c.
14769
14770         * mini.c (mono_create_jump_trampoline): New function to create a jump
14771         trampoline. Return a compiled method instead of a trampoline if it
14772         exists. Add a cache for jump trampolines.
14773
14774         * mini.c (mono_jit_find_compiled_method): New function to return a
14775         compiled method if it exists.
14776
14777         * mini-x86.c: Call mono_create_jump_trampoline instead of 
14778         mono_arch_create_jit_trampoline.
14779
14780         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
14781         a jump trampoline. Fixes #52092.
14782         
14783 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
14784
14785         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
14786         which is not up-to-date. Add check_corlib_version () instead.
14787
14788         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
14789         have to call it.
14790         
14791         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
14792         since newer valgrind versions do not need it.
14793
14794         * mini.c (mono_jit_compile_method_with_opt): New helper function to
14795         compile a method with a given set of optimizations.
14796
14797         * mini.c: Compile icall wrappers on-demand instead of at startup.
14798
14799         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
14800         wrapper for an icall.
14801
14802 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
14803
14804         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
14805         #54063.
14806
14807         * iltests.il: Add test for non-empty stack before switch instruction.
14808
14809 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
14810
14811         * mini.c: Add support for new stringbuilder marshalling conventions.
14812
14813         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
14814
14815 2004-02-01  Martin Baulig  <martin@ximian.com>
14816
14817         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
14818         in `ginst->mtype_argv'.
14819
14820 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
14821
14822         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
14823         facilitate grepping.
14824
14825 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
14826
14827         * mini.c: fixed buglet in initobj generic implementation for references.
14828
14829 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
14830
14831         * Makefile.am: make the version script conditional.
14832         * jit-icalls.c: handle missing truncl().
14833
14834 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
14835
14836         * exceptions.cs: Add more tests for double->int conversion.
14837
14838         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
14839         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
14840
14841 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
14842
14843         * driver.c: make --verbose --version emit an error
14844         if the loaded corlib doesn't match the runtime version.
14845
14846 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
14847
14848         * mini-ppc.h: export ppc_patch().
14849         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
14850         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
14851         on par or better than on MacOSX.
14852
14853 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
14854
14855         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
14856         mono_lookup_pinvoke_call.
14857
14858         * mini-x86.c: Under windows, the default pinvoke calling convention is
14859         stdcall. Fixes #52834.
14860
14861         * mini.c (optimize_branches): Add an upper bound to the number of
14862         iterations to prevent infinite loops on strange loops. Fixes #53003.
14863
14864 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
14865
14866         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
14867         and ISINST. Fixes #52093.
14868
14869         * objects.cs (test_0_vector_array_cast): New tests.
14870         
14871 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
14872
14873         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
14874         checking in Array.Set ().
14875
14876         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
14877         #52590.
14878
14879         * object.cs (test_0_multi_array_cast): New regression test.
14880
14881 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
14882
14883         * exceptions-ppc.c: fix build on Linux/PPC.
14884
14885 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
14886
14887         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
14888         running under valgrind.
14889         (x86_magic_trampoline): Fix build bustage.
14890
14891         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
14892         negative values as well. This is needed for the encoding of the line number
14893         info, since sometimes the line numbers are not in increasing order.
14894
14895 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
14896
14897         * cpu-pentium.md (localloc): Increase the size of the localloc 
14898         instruction since it is a loop under Win32.
14899
14900         * debug-mini.c (record_line_number): Get rid of unneccesary memory
14901         allocation.
14902
14903 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
14904
14905         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
14906         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
14907         Max Horn (max@quendi.de). Fix file names in comments.
14908
14909 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
14910
14911         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
14912         avoid stack overflow.
14913         (replace_usage): Avoid uninitialized variable warnings.
14914
14915         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
14916         and taking the address of valuetype variables.
14917
14918 2004-01-03  Patrik Torstensson
14919
14920         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
14921         for other purposes than FP later on.
14922
14923 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
14924
14925         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
14926         of tail calls.
14927
14928 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14929
14930         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
14931
14932 2003-12-30  Patrik Torstensson <p@rxc.se>
14933
14934         * mini-x86.h: Decreased number of availiable fp regs.
14935         Solves corner cases with FP spilling.
14936
14937 2003-12-23  Patrik Torstensson <p@rxc.se>
14938
14939         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
14940         for floating point stack tracking / spilling on x86. 
14941         Fixes bug #49012.
14942         
14943         * basic-float.cs: added float mul overflow test.
14944
14945 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
14946
14947         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
14948
14949 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14950
14951         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
14952         supports for cond branches that overflow the immediate
14953         overflow offset. mcs can compile simple programs.
14954
14955 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14956
14957         * exceptions-ppc.c: exception handling support wip:
14958         finally handlers get run on exception.
14959
14960 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
14961
14962         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
14963         profiling.
14964
14965 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14966
14967         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
14968         initial support for stack walking and unwinding.
14969
14970 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
14971
14972         * driver.c (mono_main): Make corlib-out-of-sync message more 
14973         descriptive. Also remove verify_corlib call.
14974
14975 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14976
14977         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
14978         not overlap with other call's arguments, too.
14979
14980 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
14981
14982         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
14983         move to arch-specific code the choice of arch-specific
14984         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
14985         * mini.c: ensure emulation calls will not interleave
14986         with other calls.
14987
14988 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
14989
14990         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
14991         the magic trampoline stack frame is dropped before executing
14992         the new method.
14993
14994 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14995
14996         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
14997         and integer to fp conversions. Added support for overflowing
14998         arguments on the stack. Reserve a couple more registers as temps.
14999         Added support for aot compilation (as output still needs to be
15000         tweaked, though).
15001
15002 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15003
15004         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
15005         Don't overwrite return register in some corner cases.
15006
15007 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
15008
15009         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
15010         static constructors when AOT compiling.
15011
15012         * driver.c (mono_main): Call mono_check_corlib_version.
15013
15014 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15015
15016         * cpu-g4.md, basic.cs: fixed div target register.
15017
15018 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
15019
15020         * mini-ppc.c, basic.cs: shl_imm fix with test.
15021
15022 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15023
15024         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
15025         structures by value. Misc fixes.
15026         * objects.cs: more tests.
15027
15028 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
15029
15030         * mini-ppc.c: lconv.ovf.i implemented.
15031
15032 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15033
15034         * mini.c:
15035         (mini_init): don't error out if someone already called g_thread_init.
15036
15037 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15038
15039         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
15040         to be any type per the spec. Fix abnormal memory usage when
15041         the same object is repeatedly thrown.
15042
15043 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
15044
15045         * mini.c: check for overruns in IL code.
15046
15047 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
15048
15049         * TODO: Add/remove some todo entries.
15050
15051 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
15052
15053         * driver.c (mono_main): Call mono_verify_corlib.
15054
15055 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
15056
15057         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
15058         This has been moved to mini.c
15059         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
15060         type being casted is marshalbyref it could be a proxy, so instead of
15061         emitting the type check code, emit a call to a runtime method that will
15062         perform the check by calling CanCastTo if needed.
15063
15064 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
15065
15066         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
15067         methods with large stack frames under Win32.
15068
15069 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
15070
15071         * Makefile.am: Distribute regression tests.
15072
15073         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
15074         at the end instead of inserting each variable into the sorted list.
15075
15076         * linear-scan.c (mono_varlist_sort): New helper function.
15077         
15078 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15079
15080         * mini.c: ensure arguments and locals are within bounds.
15081
15082 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15083
15084         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
15085         related fixes.
15086
15087 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
15088
15089         * mini.c (mono_cprop_copy_values): Fix crash.
15090
15091         * aot.c: Set verbosity back to 0.
15092         
15093 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15094
15095         * regalloc.c: complete memory leak fix by Laurent Morichetti
15096         (l_m@pacbell.net).
15097
15098 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
15099
15100         * driver.c (main_thread_handler): Revert the previous patch.
15101
15102         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
15103         under valgrind.
15104
15105         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
15106         memory from the memory pool.
15107
15108         * driver.c (main_thread_handler): Turn on all optimizations when
15109         --aot is used.
15110
15111         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
15112         an array for better performance.
15113
15114         * regalloc.c (mono_regstate_assign): Fix memory leak.
15115
15116         * debug-mini.c (mono_debug_serialize_debug_info): New function to
15117         serialize the debug info.
15118
15119         * debug-mini.c (mono_debug_add_aot_method): New function to load the
15120         debug info from the serialized representation.
15121
15122         * aot.c: Save debug info into the generated file and load it when 
15123         loading a method.
15124
15125         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15126
15127 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15128
15129         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
15130         More FP-related fixes.
15131
15132 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15133
15134         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
15135         and register allocation buglet. Hello world now runs.
15136
15137 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15138
15139         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
15140         * tramp-ppc.c: fixed class init trampoline.
15141         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
15142
15143 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15144
15145         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
15146         mini.c: more ppc changes/fixes.
15147
15148 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15149
15150         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
15151         Also optimize the case when the arguments are the same in the caller 
15152         and in the callee.
15153
15154         * iltests.il: Add tests for tail calls with valuetype arguments.
15155
15156 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15157
15158         * mini-ppc.c: fixes for struct return type.
15159
15160 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
15161
15162         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
15163         mono_spillvar_offset() to arch-specific code.
15164
15165 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15166
15167         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
15168
15169 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15170
15171         * exceptions-x86.c: Fix stack space leaks.
15172         
15173         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
15174         registers from the lmf if the method has save_lmf set.
15175
15176 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
15177
15178         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
15179         of icall wrappers into InvokeInDomain, since these are now per-domain.
15180
15181 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
15182
15183         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
15184         make some opcode emulation and intrinsic ops enabled/disabled 
15185         according to the architecture. More fixes.
15186
15187 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15188
15189         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
15190
15191 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15192
15193         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
15194         arch-specific handling for 'this' and struct return type to
15195         arch-specific code.
15196
15197 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15198
15199         * aot.c: prevent divide by zero error when reporting (it happened with
15200         Accessibility.dll).
15201
15202 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
15203
15204         * mini.h (inst_switch): Remove unused macro.
15205
15206 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15207
15208         * aot.c:
15209         (load_aot_module): free 'info->methods' and 'info' properly. No more
15210         "free(): invalid pointer blah" messages when you have an old aot
15211         compiled assembly.
15212
15213 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
15214
15215         * jit-icalls.c, mini.c: Added support for context static fields.
15216
15217 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15218
15219         * mini.c (mono_method_blittable): Methods which set LastError are not 
15220         blittable either. Fixes #51108.
15221         
15222 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15223
15224         * mini.c: flush icache.
15225         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
15226
15227 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15228
15229         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
15230
15231 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
15232
15233         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
15234         safe on IA32.
15235
15236         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
15237         vararg calls.
15238
15239         * inssel.brg (CEE_MKREFANY): Fix AOT case.
15240
15241 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
15242
15243         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
15244         instruction when the result is discarded.
15245
15246         * iltests.il (test_0_div_regalloc): New regression test.
15247
15248         * arrays.cs: Fix compilation error.
15249
15250 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
15251
15252         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
15253         float rules to inssel-x86.brg: sane architectures with FP registers
15254         don't need to implement these rules.
15255
15256 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15257
15258         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
15259
15260 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15261
15262         * mini.h, inssel-long32.brg: fixed endianess issues in int64
15263         implementation of 32 bit systems.
15264
15265 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15266
15267         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
15268         (Jeroen Zwartepoorte).
15269
15270 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
15271
15272         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
15273         the caller and the callee matches.
15274         
15275         * mini.c (mono_method_to_ir): Add comment.
15276
15277         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
15278         signbit is missing on some platforms.
15279
15280 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
15281
15282         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
15283
15284         * mini.c (setup_jit_tls_data): Call the new function.
15285         
15286         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
15287
15288         * mini-x86.c: Add experimental support for fast access to the lmf
15289         structure under NPTL/Linux 2.6.x.
15290
15291 2003-11-06  Martin Baulig  <martin@ximian.com>
15292
15293         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
15294         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
15295         the debugger.
15296
15297 2003-11-02  Martin Baulig  <martin@ximian.com>
15298
15299         * mini.c (inflate_generic_field): New static method.
15300         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
15301         generic instance and the field is declared in a generic type, call
15302         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
15303
15304 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
15305
15306         * mini.h mini.c (mono_method_same_domain): New function to return
15307         whenever the caller and the callee are in the same domain.
15308
15309         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
15310
15311 2003-10-30  Martin Baulig  <martin@ximian.com>
15312
15313         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
15314         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
15315         method parameters.
15316         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
15317         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
15318
15319 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
15320
15321         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
15322         propagation.
15323
15324         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
15325         object here, so it is in the correct appdomain etc.
15326
15327 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
15328
15329         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
15330         already done.
15331         (mono_method_to_ir): Avoid freeing the type created returned from
15332         mono_type_create_from_typespec, since it is put into an internal cache
15333         by the function. Fixes pointer.exe.
15334
15335         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
15336         trampolines for icalls and pinvokes as well. Fixes #33569.
15337
15338 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
15339
15340         * mini.c: Update after appdomain changes.
15341
15342         * mini.c (mono_jit_compile_method_inner): Allways compile native
15343         method wrappers in the root domain, since there can only be one
15344         instance of them, whose address is stored in method->info.
15345
15346 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
15347
15348         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
15349         environment variable. Instead detect automatically whenever running
15350         under valgrind using the magic macro RUNNING_ON_VALGRIND from
15351         valgrind.h.
15352
15353 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
15354
15355         * trace.c, trace.h: New files that implement the new trace option
15356         parsing. 
15357
15358         * driver.c: Document new --trace options.
15359
15360         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
15361         mini-x86.c: Apply:
15362
15363         -       if (mono_jit_trace_calls)
15364         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
15365
15366         * mini.h: prototypes.
15367         
15368 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
15369
15370         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
15371
15372         * mini.c inssel.brg: Implement typedefbyref opcodes.
15373
15374         * mini.c (mono_jit_compile_method): Remove unused local variable.
15375
15376         * mini.c (mono_jit_compile_method_inner): Ditto.
15377         
15378 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
15379
15380         * tramp-x86.c (x86_class_init_trampoline): Fix build.
15381         
15382         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
15383
15384 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
15385
15386         * mini.c (mono_no_aot): Remove unused global variable.
15387
15388         * mini.c: Thread safety fixes.
15389
15390 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
15391
15392         * mini.c (mono_create_class_init_trampoline): Add a lock around
15393         class_init_hash_addr.
15394
15395         * arrays.cs (test_0_newarr_emulation): Add new regression test for
15396         #30073.
15397
15398         * mini.c: Decompose the NEWARR instruction before decomposing its
15399         arguments. Fixes #30073.
15400
15401 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
15402
15403         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
15404         convention.
15405
15406 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
15407
15408         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
15409
15410         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
15411
15412         * driver.c: Add support for compiling icall wrappers to --compile.
15413
15414 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
15415
15416         * inssel.brg: The empty value in class->interface_offsets is -1, not
15417         0. Fixes #49287.
15418
15419 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
15420
15421         * objects.cs: New test for 'is' operator on an array of interfaces.
15422
15423 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15424
15425         * tramp-ppc.c: update trampoline code to support jumps
15426         and class initialization.
15427
15428 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
15429
15430         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
15431
15432         * inssel.brg (OP_UNBOXCAST): Fix #46027.
15433
15434         * inssel.brg (OP_UNBOX): Remove unused rule.
15435
15436         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
15437         region instead of one for each method. Fixes #47813.
15438
15439 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
15440
15441         * exceptions.cs (test_0_nested_finally): New regression test for
15442         nested exception handlers.
15443
15444         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
15445
15446         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
15447
15448         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
15449         inlining.
15450
15451         * mini.c (mono_method_check_inlining): Make the inlining limit 
15452         configurable by an environment variable.
15453         
15454         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
15455
15456         * mini.h: Bump AOT file version.
15457
15458         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
15459         token, store the image along with the token, since the token might not 
15460         refer to the same image as the method containing the relocation, 
15461         because of inlining.
15462
15463 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
15464
15465         * mini.c (mono_precompile_assemblies): New function to compile
15466         all methods in all loaded assemblies.
15467
15468         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
15469
15470         * regalloc.h regalloc.c (MonoRegState): Change the type of 
15471         iassign and fassign to int*, since they can contain large negative
15472         values if the register is spilled. Also added some comments. Fixes
15473         #45817.
15474
15475         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
15476         under Win32. Fixes #42964.
15477
15478 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
15479
15480         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
15481
15482         * aot.c: Added support for AOT compiling methods which contain calls
15483         to wrappers. Currently, only remoting-invoke-with-check wrappers are
15484         handled.
15485         
15486         * driver.c (compile_all_methods): Run the compilation in a thread
15487         managed by mono. Fixes #44023.
15488
15489         * mini.c (mono_codegen): Print full method name in verbose output.
15490
15491         * mini-x86.c (mono_arch_patch_code): Fix warning.
15492         
15493         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
15494         jumps, since the method we are jumping to might be domain-specific.
15495
15496         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
15497
15498 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15499
15500         * inssel.brg: string chars are unsigned.
15501
15502 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
15503
15504         * TODO: New todo item.
15505
15506         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
15507         which calls mono_runtime_class_init and patches the call site to
15508         avoid further calls.
15509         (mono_arch_create_class_init_trampoline): New arch specific function 
15510         to create a class init trampoline.
15511         (create_trampoline_code): Generalized so it can create
15512         class init trampolines as well.
15513
15514         * mini.c (helper_sig_class_init_trampoline): New helper variable.
15515         (mono_create_class_init_trampoline): New function to create and cache
15516         class init trampolines.
15517         (mono_find_class_init_trampoline_by_addr): New function to lookup the
15518         vtable given the address of a class init trampoline. Used by the
15519         patching process.
15520         (mono_codegen): Generate a call to a trampoline instead of
15521         mono_runtime_class_init in LDSFLD[A].
15522         (mono_codegen): Add relocations for the new trampoline.
15523         
15524         * mini.h mini-x86.c aot.c: Added a new relocation type: 
15525         MONO_PATCH_INFO_CLASS_INIT.
15526
15527         * mini.h: Bump AOT version number.
15528
15529         * aot.c: Create a copy of the loaded code instead of using the original
15530         so methods which call each other will be close in memory, improving
15531         cache behaviour.
15532         
15533         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
15534         patch since it breaks the regression tests.
15535         
15536         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
15537         for the register saving instruction sequence since the 
15538         frame_state_for function in glibc 2.3.2 don't seem to detect it.
15539
15540 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
15541
15542         * TODO: Fix todo item && remove another.
15543
15544 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
15545
15546         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
15547         previous checkin.
15548
15549         * aot.c: Moved the check for MONO_LASTAOT into the initialization
15550         function of the module.
15551
15552         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
15553         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
15554         --no-aot command line option.
15555
15556 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
15557
15558         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
15559         by Bernie Solomon (bernard@ugsolutions.com).
15560
15561         * inssel.brg: Refactor the interface offset table related code into
15562         its separate functions and add support for the AOT case.
15563
15564 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
15565
15566         * aot.c (mono_aot_get_method_inner): Fix memory leak.
15567         
15568         * aot.c: Added mono_aot_verbose variable and made all debugging
15569         output depend on the value of this variable.
15570
15571         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
15572         method_label and info_label.
15573
15574         * mini.h mini-x86.c aot.c: Added a new relocation type 
15575         MONO_PATCH_INFO_IID for klass->interface_id.
15576
15577         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
15578         the MonoJitInfo structure.
15579
15580         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
15581         a non-root appdomain in shared mode.
15582
15583 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15584
15585         * aot.c: make aot loader less verbose. Remove free of unused variable.
15586
15587 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
15588
15589         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
15590
15591         * .cvsignore: Added *.dll.
15592
15593         * mini.c (mono_print_tree_nl): New function callable while debugging.
15594
15595         * mini.c (mono_print_code): Export this.
15596
15597         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
15598         patched code.
15599
15600 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
15601
15602         * mini.h (MonoCompile): Added 'jit_info' field.
15603
15604         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
15605         the cfg structure, since it is needed by the AOT compiler.
15606
15607         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15608
15609         * aot.c: A major rewrite. Changes include:
15610         - save exception tables for methods which have them.
15611         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
15612         to g_module_symbol.
15613         - reworked the file format so it is now much smaller and needs
15614         fewer relocation entries.
15615         
15616 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15617
15618         * aot.c (load_aot_module): Fix build bustage on platforms without
15619         Boehm GC.
15620
15621 2003-09-04  Martin Baulig  <martin@ximian.com>
15622
15623         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
15624
15625 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15626
15627         * TODO: Some new optimization ideas.
15628
15629         * aot.c: Move AOT module loading logic here from mono_assembly_open.
15630
15631         * aot.c: Save the optimization flags used to compile the code into
15632         the AOT module.
15633
15634         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
15635         support emitting domain specific code.
15636         
15637         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
15638         no longer domain neutral. It can be made domain neutral by compiling 
15639         with --optimize=shared.
15640
15641         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
15642         between appdomains.
15643
15644         * driver.c mini.h mini.c: New --no-aot debugging option which disables
15645         loading of AOT code.
15646
15647         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
15648         
15649         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
15650         if there is no domain neutrality information.
15651
15652 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
15653
15654         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
15655         format version into the generated library.
15656
15657         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
15658         callee method into the caller since one of them could be shared.
15659
15660         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
15661         system exceptions from AOT code now works.
15662
15663         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
15664         method if it is domain neutral and the callee is not.
15665
15666         * graph.c (cfg_emit_one_loop_level): Fix warning.
15667
15668 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
15669
15670         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
15671         last checkin.
15672
15673 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
15674
15675         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
15676         is needed  by code which is executed before mono_runtime_init ().
15677         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
15678         
15679         * mini.c (mono_thread_abort): Fix warning.
15680         (mono_jit_compile_method): Call static constructor in the AOT case too.
15681
15682         * aot.c (mono_compile_assembly): Fix warning.
15683
15684 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15685
15686         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
15687
15688 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
15689
15690         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
15691
15692         * cpu-pentium.md: Fix the length of call opcodes so they include the
15693         ESP restoring instruction. Fixes #47968.
15694
15695 2003-08-28  Martin Baulig  <martin@ximian.com>
15696
15697         * mini-x86.c (mono_arch_call_opcode): Added support for
15698         MONO_TYPE_GENERICINST.
15699
15700         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
15701
15702 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
15703
15704         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
15705         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
15706
15707         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
15708         metadata_section.
15709
15710 2003-08-26  Martin Baulig  <martin@ximian.com>
15711
15712         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
15713         when reporting an error, set this to the actual error location.
15714         (mono_method_to_ir): Report the correct error location if
15715         get_basic_blocks() returned an error.
15716
15717 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
15718
15719         * mini.c (mono_type_blittable): OBJECT is not blittable.
15720         (mono_method_blittable): Methods which have marshalling descriptors
15721         are not blittable either. Fixes #47842.
15722
15723 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
15724
15725         * driver.c mini.c: Use an environment variable instead of a global 
15726         variable. Also fix the build.
15727
15728         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
15729         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
15730         reporting this. 
15731
15732         * driver.c mini.c: Added --with-valgrind option to turn off some
15733         code which prevents mono from running under valgrind.
15734
15735         * mini.c (mono_emit_call_args): Fixed warning.
15736
15737         * mini.c (mono_emulate_opcode): Fixed warning.
15738
15739 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15740
15741         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
15742         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
15743         regalloc.c, regalloc.h: specify available registers in arch-specific
15744         code and support floats in the regallocator (patch by Laurent Morichetti 
15745         <l_m@pacbell.net>)
15746
15747 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15748
15749         * mini.c: mono_thread_current() can be called only after
15750         mono_runtime_init(): rearrange code to not call it early on.
15751
15752 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15753
15754         * mini.c: allocate jump tables in the code mempools.
15755
15756 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15757
15758         * mini.c, mini.h: make sure per-thread data allocated by the jit is
15759         freed.
15760
15761 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
15762
15763         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
15764         12 to 16.  This fixes bug #47453.
15765
15766
15767 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15768
15769         * mini-ppc.c: fixed indexed load and unsigned compares.
15770
15771 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
15772
15773         * mini.c: reenabled installation of handler for
15774           thread abort signal.
15775
15776 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15777
15778         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
15779         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
15780         until it's fixed and actually useful.
15781
15782 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15783
15784         * inssel-long32.brg: couple more opcodes implemented.
15785
15786 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15787         
15788         * mini-sparc.c: Even more opcodes implemeted.
15789
15790 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
15791
15792         * mini-sparc.c: More opcodes implemented.
15793
15794 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
15795
15796         * mini-sparc.c: More opcodes implemented.
15797
15798 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15799
15800         * inssel-sparc.brg: Add some needed rules.  Direct
15801         copy from PPC.
15802         * Makefile.am: Use inssel-sparc.brg
15803         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
15804         an assert happy for now.
15805
15806 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
15807
15808         * mini-sparc.c: Fixed compile errors.
15809         * exceptions-sparc.c: Same.  We now produce a mono binary 
15810         on sparc-linux.  Yea.
15811
15812 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
15813
15814         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
15815         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
15816         They compile, but do not work.
15817
15818 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15819
15820         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
15821         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
15822         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
15823         (ct@gentoo.org).
15824
15825 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15826
15827         * mini.c: more opcodes implemented and better support for generics.
15828
15829 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15830
15831         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
15832         * mini.c, mini.h: first cut at generics support: some new instructions 
15833         added and changed the behaviour of some of the existing ones.
15834
15835 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
15836
15837         * mini.c: Removed definition of metadata_shared mutex here.
15838
15839 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15840
15841         * mini-x86.c: make vararg calls work for instance methods.
15842
15843 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15844
15845         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
15846         returns the arguments in a separte list, now.
15847
15848 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15849
15850         * aot.c, mini.c: updates for array type representation changes.
15851
15852 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
15853
15854         * mini.c: register function to perform jit shutdown.
15855
15856 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15857
15858         * mini.c: use a faster allocator if possible.
15859
15860 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15861
15862         * aot.c: some cleanups and portability changes.
15863
15864 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15865
15866         * mini.c: use faster allocation for CEE_BOX if possible.
15867
15868 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15869
15870         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
15871         Moved inlined mempcy code to its own function so that is can be
15872         reused. Added an inline memset function as well (optimized initobj).
15873         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
15874
15875 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15876
15877         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
15878
15879 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15880
15881         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
15882         arch code can setup the cpu for CLR execution, if needed.
15883         We use it on x86 to set the precision of FP operations.
15884
15885 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15886
15887         * mini.c: disable some optimizations if we can guess they'll cost too
15888         much for a given method.
15889
15890 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15891
15892         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
15893         
15894 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15895         * mini.h mini.c mini-x86.c: Added instruction level coverage 
15896         info collection support.
15897
15898 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15899
15900         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
15901         is now implemented in the profiling API. Get rid of a couple of
15902         unnecessary global variables.
15903
15904 2003-06-15  Nick Drochak <ndrochak@gol.com>
15905
15906         * basic-long.cs: tests for negative values for bigmul, and unsigned.
15907         * cpu-g4.md: add op_bigmul and op_bigmul_un
15908         * cpu_pentium.md: add op_bigmul_un
15909         * inssel-long32.brg: add rule for unsigned bigmul
15910         * mini-ops.h: define OP_BIGMUL_UN
15911         * mini-x86.c: THE BUG: handle (un)signed properly
15912         * mini.c: choose unsigned opcode if needed.
15913         This set of patches fixes bug #44291
15914
15915 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
15916
15917         * mini.c (optimize_branches): improved to handle all kinds of
15918         conditional branches.
15919
15920 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15921
15922         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
15923         don't raise exceptions.
15924
15925 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15926
15927         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
15928         to arch-specific files.
15929
15930 2003-06-09  Martin Baulig  <martin@ximian.com>
15931
15932         * Makefile.am (libs): Added $(LIBGC_LIBS).
15933
15934 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
15935
15936         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
15937         and OP_ATAN (fixes bug#44293).
15938
15939 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
15940
15941         * Makefile.am, mini-x86.c: rename cpu description array to
15942         pentium_desc, since some compilers define the 'pentium' preprocessor
15943         symbol.
15944
15945 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
15946
15947         * mini.c (mini_select_instructions): add explicit branch if the
15948         following block is not the false target of a conditional branch -
15949         we need this with any optimization that reorder or remove bblocks
15950
15951         * mini.c (optimize_branches): bug fixes
15952
15953 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
15954
15955         * mini.c (mono_method_to_ir): inline static readonly fields
15956
15957         * ssa.c (fold_tree): start cfold support for long (very simple
15958         cases only)
15959
15960         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
15961
15962 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15963
15964         * inssel.brg: fixed memcpy (bug #44219).
15965
15966 2003-06-05  Dick Porter  <dick@ximian.com>
15967
15968         * driver.c: Set the glib log levels to not abort if g_message
15969         recurses.
15970
15971         g_set_prgname() has to happen before mini_init() so that the
15972         process handle gets the info.
15973         
15974 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15975
15976         * driver.c: add intrins to the default optimizations to get wider
15977         exposure.
15978
15979 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15980
15981         * mini.h: some large basic blocks will overflow a 16-bit
15982         integers for symbolic registers.
15983
15984 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15985
15986         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
15987         (mono_arch_output_basic_block): fix bug 43499 
15988
15989 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15990
15991         * mini.c: kill duplicated definition of mono_debug_format.
15992
15993 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15994
15995         * mini-x86.c, arrays.cs: fixed register allocation bug.
15996
15997 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15998
15999         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
16000
16001         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
16002
16003 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16004
16005         * mini.c:
16006         (print_method_from_ip): also print source location information if
16007         available.
16008
16009 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
16010
16011         * mini.c (mono_find_block_region): bug fix in region code
16012         (mini_method_compile): enable removing unreachable code again, but
16013         only in methods without exception clauses.
16014
16015 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16016
16017         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
16018         Implemented arglist opcode and handling of TypedReference type.
16019         Fixed x86 call convention when a structure is returned.
16020         Minimal support for calling static vararg methods.
16021
16022 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
16023
16024         * mini.c (mini_method_compile):  always remove unreachable code,
16025         because the code in them may be inconsistent  (access to dead
16026         variables for example).
16027
16028 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16029
16030         * driver.c, debug-mini.c: warning fixes.
16031
16032 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
16033
16034         * Makefile.am, jit.h, mini.h: install header for embedding mono.
16035
16036 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
16037
16038         * mini.c: thread-static fields are registered in mono_class_vtable(),
16039         so ensure the function is called before checking for them.
16040
16041 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
16042
16043         * mini.c (optimize_branches): fix for bug 43586
16044
16045         * jit-icalls.c (mono_llmult_ovf): added an additional check for
16046         overflow (fixes Bug #43639)
16047
16048 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16049
16050         * mini.c, objects.cs: allow the use of stobj for primitive types.
16051
16052 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16053
16054         * mini.c: be less strict about argument checking until we support
16055         running the verifier.
16056
16057 2003-05-27  Nick Drochak <ndrochak@gol.com>
16058
16059         * basic-long.cs: tests for (ulong)int * (ulong)int also
16060         * mini.c: use the same trick for (ulong)int * (ulong)int
16061
16062 2003-05-27  Nick Drochak <ndrochak@gol.com>
16063
16064         * basic-long.cs: add regression test for (long)int * (long)int
16065         * cpu-pentium.md: add op_bigmul specification
16066         * inssel-long32.brg: add OP_BIGMUL rule
16067         * mini-ops.h: add OP_BIGMUL
16068         * mini-x86.c: register allocator: handle case where src1 needs to be
16069         in EAX.
16070         * mini.c: substitute special BIGMUL opcode in the tree for 
16071         (long)int * (long)int
16072
16073 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16074
16075         * jit-icalls.c: call the type ctor on field access if needed.
16076
16077 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16078
16079         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
16080         to a method (including results of ldelema, bug#43207).
16081
16082 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
16083
16084         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
16085         colors to show exception handler blocks.
16086
16087         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
16088         (fix for pinvoke7.cs).
16089
16090 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16091
16092         * mini.h, mini.c: ensure correct initialization order for types that
16093         require it. Prepare for lazy compilation of jit icall wrappers.
16094         Provide a name for opcode emulation to reduce unneeded mallocing.
16095
16096 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
16097
16098         * mini-x86.c: better register restoring code and profiling
16099         support for tail calls.
16100
16101 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16102
16103         * mini.h, driver.c: prepare for leaf methods optimization.
16104
16105 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16106
16107         * mini.c: get targets of branches before converting a method.
16108
16109 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
16110
16111         * mini.c (optimize_branches): added some experimental code (disbaled) 
16112
16113 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
16114
16115         * mini.c (optimize_branches): fix branch to branch optimization 
16116
16117         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
16118
16119         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
16120
16121         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
16122
16123         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
16124         if needed.
16125
16126 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
16127
16128         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
16129         enable use of interface variables again.
16130
16131         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
16132         I1 to registers because there is no simply way to sign extend 8bit
16133         quantities in caller saved registers on x86.
16134
16135         * inssel-float.brg: set costs of some rules to 2 so
16136         that monobure always select the arch. specific ones if supplied,
16137         regardless of the order we pass the files to monoburg.
16138
16139 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16140
16141         * mini.c, mini-x86.c: since the magic trampoline for jumps
16142         can't patch the code directly, we do it as soon as the
16143         method gets compiled.
16144
16145 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16146
16147         * mini-x86.c, mini.h: introduce a new patching method
16148         to support CEE_JMP and tail calls.
16149         * mini.c: obey tail.call. Don't precompile methods target
16150         of CEE_JMP.
16151         * tramp-x86.c: new trampoline code to handle methods
16152         reached through a jump.
16153
16154 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
16155
16156         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
16157         bit values to registers
16158
16159 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
16160
16161         * mini.c (mono_compile_get_interface_var): share interface
16162         variables if possible.
16163
16164 2003-05-16  Martin Baulig  <martin@ximian.com>
16165
16166         * debug-mini.c (mono_init_debugger): New function to initialize
16167         the debugger.  This is not in the debugger since it needs to
16168         access some of mini's internals.
16169
16170 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16171
16172         * mini.c (mono_method_to_ir): inlining fixes/cleanups
16173
16174 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
16175
16176         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
16177         for value type handling.
16178
16179 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16180
16181         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
16182         (mono_method_check_inlining): enable inlining of all kinds of wrappers
16183
16184 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
16185
16186         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
16187           the constructor through a proxy.
16188
16189 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16190
16191         * jit-icalls.c, inssel.brg: fixes to array element address
16192         calculations.
16193
16194 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
16195
16196         * mini-x86.c (is_regsize_var): allocate pointer to registers
16197
16198 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16199
16200         * driver.c: fixed typo, added intrins to the set of optimizations
16201         tested with regressions.
16202
16203 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16204
16205         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
16206         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
16207         test case.
16208
16209 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
16210
16211         * inssel.brg: remove some common pop instructions without side effects
16212
16213 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16214
16215         * inssel-x86.brg: fixed thinko in int to double conversions.
16216
16217 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
16218
16219         * mini.c, jit-icalls.c: added runtime thread-static variable support.
16220
16221 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16222
16223         * inssel-long32.brg: two more missing instructions.
16224
16225 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
16226
16227         * mini.c (mono_emit_call_args): set the cil_code for all arguments
16228         if not already set.
16229
16230 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
16231
16232         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
16233         correctly.
16234
16235         * basic-float.cs: Added tests for negative zero.
16236
16237 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16238
16239         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
16240         a couple of missing operations for long casts, with test cases.
16241
16242 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16243
16244         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
16245
16246 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
16247
16248         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
16249         code size estimation.
16250
16251 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
16252
16253         * mini.c (mono_jit_create_remoting_trampoline): make it work with
16254         abstract methods (fix bug 42542)
16255
16256         * aot.c: add ability to handle array types
16257         
16258 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
16259
16260         * mini.c: Call the _specific versions of the object allocation
16261         functions if possible.
16262
16263 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16264
16265         * driver.c: call setlocale ().
16266
16267 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16268
16269         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
16270         windows build.
16271
16272 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
16273
16274         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
16275
16276         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
16277         wrappers (fix bug 42122)
16278
16279 2003-05-04  Martin Baulig  <martin@ximian.com>
16280
16281         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
16282
16283         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
16284         s/mini_set_defaults/mono_set_defaults/g.
16285
16286 2003-05-04  Martin Baulig  <martin@ximian.com>
16287
16288         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
16289
16290 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16291
16292         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
16293         (reported by Don Roberts).
16294
16295 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16296
16297         * mini.c: temporarily work around two bugs for this release.
16298
16299 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16300
16301         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
16302         that contains -export-dynamic and it makes using the ld script
16303         useless.
16304         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
16305
16306 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16307
16308         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
16309         specific cpu.
16310
16311 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16312
16313         * mini.c: make sure leave calls all the needed finally blocks,
16314         even when the target jumps out of multiple exception clauses.
16315
16316 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16317
16318         * ldscript, Makefile.am: add linker script to reduce the number of
16319         exported symbols (should also fix the issues with libwine defining
16320         some of the same symbols in io-layer).
16321
16322 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
16323
16324         * driver.c (mini_main): Avoid assertion when no file name is given on 
16325         the command line.
16326
16327 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
16328
16329         * driver.c: added --version/-V command line option.
16330         Added the inline optimization in the regression tests.
16331
16332 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16333
16334         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
16335         to the type in the method signature (fixes bug#42134).
16336
16337 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
16338
16339         * mini.c: when inlining, check this is not null only when needed (bug #42135).
16340
16341 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
16342
16343         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
16344
16345 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16346
16347         * driver.c: fixed bug #42100.
16348
16349 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
16350
16351         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
16352
16353 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16354
16355         * mini.c: moved most of the code required to do inlining to its own
16356         function so it can be reused. Inline also ctors if appropriate.
16357
16358 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
16359
16360         * Makefile.am: Link with -export-dynamic so shared libs loaded by
16361         the runtime can call mono API functions.
16362
16363 2003-04-27  Martin Baulig  <martin@ximian.com>
16364
16365         * debug-mini.c (mono_debug_init_method): Added
16366         `guint32 breakpoint_id' argument; if the method has a breakpoint,
16367         send a notification to the debugger.
16368
16369         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
16370         running in the Mono Debugger, just pass the breakpoint number to
16371         mono_debug_init_method().
16372
16373         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
16374
16375 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
16376
16377         * mini.c: allow some more unsafe compares.
16378
16379 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16380
16381         * mini-x86.c, Makefile.am: make distcheck works (partially from
16382         a patch by Richard Lee <r.h.lee@attbi.com>).
16383         * regset.c, regset.h: removed, they are unused.
16384
16385 2003-04-25  Dick Porter  <dick@ximian.com>
16386
16387         * driver.c: Usage reports the name as 'mono' not 'mini'
16388         * exceptions-x86.c: Build and run on freebsd
16389
16390 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
16391
16392         * Makefile.am: install the program with the 'mono' name and
16393         the library as libmono instead of mini and libmini.
16394
16395 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16396
16397         * driver.c: provide the APIs for the embedding interface of the old jit.
16398
16399 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
16400
16401         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
16402
16403 2003-04-23  Martin Baulig  <martin@ximian.com>
16404
16405         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
16406
16407         * driver.c: Added `--debug' command line argument to enable
16408         debugging support.
16409
16410 2003-04-23  Martin Baulig  <martin@ximian.com>
16411
16412         * debug.[ch]: Removed.  The code is now in
16413         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
16414
16415         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
16416         last six months.
16417
16418 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
16419
16420         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
16421
16422 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16423
16424         * mini.c:
16425         (mini_cleanup): moved mono_runtime_cleanup call after the call to
16426         mono_domain_finalize.
16427         (mini_method_compile): use mono_method_profile* if the the option is
16428         enabled.
16429
16430 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
16431
16432         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16433         methods with their wrapper.
16434
16435         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16436         methods with their wrapper.
16437
16438         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
16439         their wrapper.
16440
16441         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
16442         wrapper.
16443
16444         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
16445         methods.
16446
16447 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
16448
16449         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
16450
16451 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
16452
16453         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
16454         of the mempool. This is slightly faster and uses less memory
16455
16456 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16457
16458         * mini.c: avoid O(n) allocation for variables.
16459
16460 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16461
16462         * mini.c: handle items on the stack after inlining methods.
16463
16464 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16465
16466         * mini.c: make the method->opcode optimization dependent
16467         on MONO_OPT_INSTRINS and do it lazily.
16468
16469 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16470
16471         * driver.c: print overall results at the end of regression run.
16472
16473 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
16474
16475         * inssel.brg: don't overwrite symbolic registers.
16476
16477 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16478
16479         * inssel-x86.brg: fix conversion from long to float.
16480
16481 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
16482
16483         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
16484
16485 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
16486
16487         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
16488
16489         * driver.c: Added --print-vtable option as in the old JIT.
16490
16491 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16492
16493         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
16494
16495 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
16496
16497         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
16498
16499 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
16500
16501         * mini.c regalloc.c regalloc.h: Fix memory leak.
16502
16503 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
16504
16505         * aot.c (mono_aot_get_method): register all used strings
16506
16507 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16508
16509         * mini.c: always intern strings references with ldstr at compile time.
16510
16511 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16512
16513         * Makefile.am: add BUILT_SOURCES.
16514
16515 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16516
16517         * driver.c: give a better error message when the assembly to execute
16518         doesn't have an entry point.
16519
16520 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
16521
16522         * Makefile.am: added hack for automake
16523
16524         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
16525         correct sematics.
16526
16527         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
16528
16529 22003-04-07  Martin Baulig  <martin@ximian.com>
16530
16531         * Makefile.am: Added Makefile.am.
16532
16533         * debugger-main.c: Removed, this is now in the debugger where it
16534         belongs.
16535
16536         * mini.pc.in: Call this package `mini' for the moment.
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550