2007-11-30 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
2
3         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
4
5 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
6
7         * cpu-x86.md: Fix the length of ckfinite.
8
9 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
10
11         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
12         
13         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
14         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
15
16         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
17
18         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
19         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
20
21 2007-11-28  Martin Baulig  <martin@ximian.com>
22
23         * mini-x86.c
24         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
25         after creating the trampoline.
26
27 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
28
29         * aot-runtime.c (load_aot_module): Check runtime version if needed.
30
31         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
32         the same version.
33
34         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
35         instead of the calling method to help AOT.
36
37         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
38
39 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
40
41         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
42         is defined.
43
44 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
45
46         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
47         
48         * aot-compiler.c (compile_method): Correct check for generic method definitions.
49         (encode_method_ref): No need to handle generic method definitions specially.
50
51         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
52
53         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
54         decode_klass_info.
55
56         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
57         encode_klass_info.
58         (compile_method): Enable generic sharing.
59
60 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
61
62         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
63         (mini_method_compile): Add preliminary support for AOTing shared generic code.
64
65         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
66         generic code.
67
68         * mini-trampolines.c: Fix a warning.
69
70         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
71         NEW_PCONST.
72         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
73         (generic_class_is_reference_type): Remove unused function.
74
75         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
76         in the generic vtable trampoline case.
77
78         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
79         
80         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
81         return an AOT method based on a vtable slot.
82
83         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
84
85         * mini.c (mini_get_vtable_trampoline): Export this.
86
87 2007-11-22  Martin Baulig  <martin@ximian.com>
88
89         * debug-debugger.h
90         (MonoDebuggerInfo): Move `debugger_version' up.
91
92 2007-11-22  Martin Baulig  <martin@ximian.com>
93
94         * mini-amd64.c
95         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
96
97         * mini-trampolines.c
98         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
99         after compiling the method.
100
101 2007-11-20  Martin Baulig  <martin@ximian.com>
102
103         * debug-mini.c
104         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
105         (mono_debugger_remove_breakpoint): Likewise.
106         (mono_debugger_check_breakpoints): Likewise.
107
108         * debug-debugger.c: Implement the new breakpoint interface here.
109
110 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
111
112         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
113         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
114
115         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
116
117 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
118
119         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
120
121         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
122         mini.c.
123
124         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
125         mini.c.
126
127         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
128         returning a vtype in a register.
129
130         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
131         here from the arch specific code.
132
133         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
134         mini.c.
135
136         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
137         (mono_arch_emit_prolog): Increment maximum prolog size.
138
139         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
140         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
141
142         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
143         MonoGenericSharingContext.
144
145         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
146         MonoGenericSharingContext. Allocate memory from the cfg mempool.
147
148 2007-11-15  Mark Probst  <mark.probst@gmail.com>
149
150         * mini.c, mini.h, generic-sharing.c: Functions for producing code
151         which extract fields out of the runtime generic context.  Full
152         sharing of the NEWARR opcode.
153
154 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
155
156         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
157         --enable-minimal=ssa.
158
159 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
160
161         * mini-trampolines.c (mono_delegate_trampoline): Update after 
162         mono_marshal_get_delegate_invoke () signature change.
163
164 2007-11-13  Mark Probst  <mark.probst@gmail.com>
165
166         * mini.c: Removed the shared context in favor of the generic
167         sharing context.  Allocate the MonoJitInfo structure with room for
168         the generic sharing context if it's needed.
169
170         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
171         domain-internals.h now.
172
173         * mini-x86.c: Pass the generic sharing context to get_call_info ().
174
175         * generic-sharing.c: Several changes for working without a shared
176         context and instead operating on open types instead.
177
178 2007-11-12  David S. Miller  <davem@davemloft.net>
179
180        * inssel-sparc.brg: Fix double instruction emit.
181
182 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
183
184         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
185         Get/Set/Address methods.
186         
187         * mini.c debug-debugger.c mini-trampolines.c: Update after 
188         mono_marshal_get_delegate_invoke signature change.
189
190 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
191
192         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
193         This can happens with dynamic methods. Fixes the other bug in #322722.
194
195 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
196
197         * tramp-arm.c (mono_arch_patch_callsite): Support patching
198         BX call sequence.
199
200         * mini-arm.c (arm_patch): Implement patching of BX call
201         sequence. Fixes one of the bugs in #322722.
202
203 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
204
205        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
206        under Linux.  We only need to flush every 32-byte cache line.    
207
208 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
209
210         * mini.c:
211         move_basic_block_to_end: Add branches when needed, eventually creating
212         a new BB.
213         optimize_branches: added a parameter that tells if it's ok to create
214         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
215         and avoid calling move_basic_block_to_end when it's not ok.
216         Fixes bug 318677.
217
218 2007-11-07  Mark Probst  <mark.probst@gmail.com>
219
220         * mini.c: Abort inlining call to InitializeArray if something
221         looks wrong.  Let the icall handle it, which now has proper safety
222         checks.
223
224 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
225
226         * mini.c (mono_spill_call): add support for soft-float.
227
228         * mini.c (mono_method_to_ir): add support for soft-float
229         to inlined functions that return float.
230
231         * mini.c (mono_method_to_ir): add support for soft-float
232         to cee_stsfld opcode on float fields.
233
234 2007-11-05  Geoff Norton  <gnorton@novell.com>
235
236         * mini-x86.h: Fix the structure access for X86 Leopard.
237
238
239 2007-11-05  Martin Baulig  <martin@ximian.com>
240
241         * mini-trampolines.c
242         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
243         after compiling the method to notify the debugger.
244
245 2007-11-05  Martin Baulig  <martin@ximian.com>
246
247         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
248
249 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
250
251         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
252         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
253
254 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
255
256         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
257         native-to-managed wrappers.
258         
259 2007-11-01  Geoff Norton  <gnorton@novell.com>
260
261         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
262         members.
263
264 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
265
266         * mini.c, mini-x86.c: when getting back from unmanaged code
267         to managed via a marshaled delegate we also need to set the
268         right domain.
269
270 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
271
272         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
273         for amd64.
274
275 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
276
277         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
278         let the debugger or other external agents to tell the JIT when
279         a sw breakpoint has been inserted in the code that the JIT needs
280         to be able to inspect.
281
282 2007-10-31  Martin Baulig  <martin@ximian.com>
283
284         * debug-debugger.h
285         (MonoDebuggerInfo): Remove `runtime_class_init'.
286
287 2007-10-30  Martin Baulig  <martin@ximian.com>
288
289         * debug-mini.h
290         (mono_debugger_thread_created): Added `MonoThread *' argument.
291         (mono_debugger_extended_notification): New public method.
292         (mono_debugger_trampoline_compiled): New public method.
293
294         * debug-mini.c
295         (MonoDebuggerThreadInfo): Added `thread' and
296         `extended_notifications' fields.
297
298         * debug-debugger.c
299         (debugger_executable_code_buffer): New static variable.
300
301         * debug-debugger.h
302         (MonoDebuggerInfo): Added `executable_code_buffer',
303         `executable_code_buffer_size', `breakpoint_info_area',
304         `breakpoint_table' and `breakpoint_table_size'.
305
306 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
307
308         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
309         that IP  either is an unused value or the vtable pointer. IMT 
310         calls use vtable + offset now. Reduced by almost half the size
311         of IMT entries.
312
313 2007-10-26  Jonathan Chambers <joncham@gmail.com>
314
315         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
316         defines to access param registers. Replace long usage with
317         gsize as sizeof(long) != sizeof(void*) on Win64.
318
319         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
320         on Win64. Fix intrinsic, use _AddressOfReturnAddress
321         instead of non-existant _GetAddressOfReturnAddress.
322
323         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
324         param registers. Save/restore %rdi and %rsi in MonoLMF.
325
326         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
327         param registers. Modify (throw_exception) signature to take 
328         %rdi and %rsi on Win64. 
329
330         Code is contributed under MIT/X11 license.
331
332 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
333
334         * helpers.c: unlink debugging output files.
335
336 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
337
338         * mini.c: Move mono_create_ftnptr () to object.c.
339
340 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
341
342         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
343         optional. This function can now be used to disassemble code generated
344         outside the JIT such as trampolines and IMT thunks.
345
346         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
347
348         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
349         vtable pointer from a ldr instruction.
350
351         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
352         new IMT call sequence.
353
354         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
355         call sequence for interface invocations.
356
357         * mini-arm.c (mono_arch_emit_imt_argument): added, required
358         for imt support. This function is empty since IMT on ARM requires no
359         special handling on the IR side.
360
361         * mini-arm.c (mono_arch_find_imt_method): added, required for
362         imt support.
363
364         * mini-arm.c (mono_arch_find_this_argument): added, required
365         for imt support.
366
367         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
368         a ldr instruction to load a value stored in the code stream.
369
370         * mini-arm.c (mono_arch_build_imt_thunk):added, required
371         for imt support.
372
373
374 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
375
376         * mini.c (mini_init): Install the jump trampoline callback.
377
378 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
379
380         * mini-trampolines.c: handle synchronized methods with the common
381         vtable trampoline (bug #335601).
382
383 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
384
385         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
386
387         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
388         64 bit platforms.
389
390         * mini-ia64.h mini-ia64.c: Add support for IMT.
391
392         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
393         prolog. Fixes #331958.
394
395 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
396
397         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
398
399 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
400
401         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
402         trampoline.
403
404 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
405
406         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
407         trampoline.
408
409 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
410
411         * mini-x86.c, mini-x86.h: x86 support for the common vtable
412         trampoline.
413
414 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
415
416         * mini-trampolines.c: changed the magic rampoline to understand
417         the common vtable trampoline method: the method to invoke is
418         determined by the vtable displacement of the call.
419
420 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
421
422         * mini.c, mini.h: register the common vtable trampoline if the
423         architecture supports it.
424
425 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
426
427         * cpu-amd64.md: use the correct max length for tls_get.
428
429 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
430
431         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
432         CEE_STELEM_ANY. Fixes #333696.
433
434 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
435
436         * exceptions-x86.c: provide more graceful handling of the case where
437         we followed a bogus function pointer from managed code (bug #332866).
438
439 2007-10-11  Mark Probst  <mark.probst@gmail.com>
440
441         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
442         replaces the generic_shared flag and will carry more information
443         in the future.
444
445         * generic-sharing.c: Added mini_type_stack_size() which allows
446         allows open types if given a generic sharing context.
447         mini_get_basic_type_from_generic() takes a
448         MonoGenericSharingContext* instead of a MonoCompile* now.
449
450         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
451         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
452         mini-sparc.c, mini-x86.c: Trivial changes required by the two
453         changes above.  Just passing arguments through to the right
454         places.
455
456 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
457
458         * mini-arm.c: unify the call emission to emit_code_seq().
459
460 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
461
462         * tramp-arm.c: reduced the trampoline size.
463
464 2007-10-10  Mark Probst  <mark.probst@gmail.com>
465
466         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
467         variable handling out of arch-specific code.
468
469 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
470
471         * mini-arm.c: implemented fast delegate dispatch.
472
473 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
474
475         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
476         that fp elimination is turned off if the space required by locals is too
477         big. Fixes #331958.
478
479 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
480
481         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
482         ARM to the new style trampoline.
483
484 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
485
486         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
487
488         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
489
490 2007-10-09  Martin Baulig  <martin@ximian.com>
491
492         * debug-debugger.h
493         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
494         `field_info_offset_offset'.     
495
496 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
497
498         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
499         removed more internal usage of the r11 register and made it available
500         to the register allocator.
501
502 2007-10-08  Mark Probst  <mark.probst@gmail.com>
503
504         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
505         when sharing generics and treat type variables as references.
506
507 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
508
509         * mini-ppc.c: started removing the internal uses of register r11
510         to eventually allow the register allocator to manage it as an
511         additional available register.
512
513 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
514
515         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
516
517 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
518
519         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
520         specific trampolines as they are not performance critical as a jump
521         target (maybe align as before only for AOT code?). This saves about
522         200 KB of native code on x86 for monodevelop startup.
523
524 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
525
526         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
527         monodevelop startup.
528
529 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
530
531         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
532
533         * mini-sparc.h mini-sparc.c: Implement IMT support.
534
535         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
536         its smaller and doesn't clobber sparc_g1.
537
538         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
539
540 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
541
542         * mini-ppc.c: optimized the size of the IMT thunks a bit.
543
544 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
545
546         * mini-ppc.c: implemented fast delegate invocation.
547
548 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
549
550         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
551
552 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
553
554         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
555         code to the new style trampoline in preparation for IMT support.
556
557 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
558
559         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
560         systems already. This also reduces the specific trampiline sizes and
561         prepares for the use of r12 as the IMT identifier register.
562
563 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
564
565         * mini-mips.h: endianess fix (simplified from a patch by
566         Thomas Kunze <thommy@tabao.de>, bug #323737).
567
568 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
569
570         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
571         to access ucontext fields and enable netbsd support
572         (partially from Magnus Henoch <mange@freemail.hu>).
573
574 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
575
576         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
577         use the preprocessor from the CPP env var if it is set.
578
579 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
580
581         * mini-trampolines.c: fixed an assertion and moved it earlier in the
582         code, before interface_offset gets used.
583
584 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
585
586         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
587         mono_class_setup_vtable () before accessing klass->vtable.
588
589 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
590
591         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
592         hackish.
593
594 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
595
596         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
597         IMT slots (this saves hundreds of KB of memory in programs like
598         IronPython and Monodevelop).
599
600 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
601
602         * mini.c: print the delegate counter.
603
604 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
605
606         * mini-x86.c: make it easier to enable the debugging code for IMT
607         slots.
608
609 2007-09-28  Martin Baulig  <martin@ximian.com>
610
611         * debug-debugger.h
612         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
613         `mono_method_klass_offset' and `mono_method_token_offset'.
614
615 2007-09-20  Mark Probst  <mark.probst@gmail.com>
616
617         * mini.c: First generics sharing implementation.  Can only share
618         in very simple cases.  If sharing doesn't work it falls back to
619         dedicated compilation.
620
621         * mini.h: Flag in MonoCompile to specify whether generic
622         compilation is shared.  Flags enum for marking which generic inst
623         of a context is used.  Prototypes for helper functions.
624
625         * generic-sharing.c: Helper functions for generic method sharing.
626
627         * optflags-def.h: Optimization flag (gshared) for enabling generic
628         method sharing added.
629
630         * Makefile.am: generic-sharing.c added.
631
632 2007-09-19 Daniel Nauck <dna@mono-project.de>
633
634         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
635
636 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
637         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
638         fixes bug 325507.
639
640 2007-09-19  Martin Baulig  <martin@ximian.com>
641
642         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
643         mono_debug_cleanup() is now part of mono_cleanup().
644
645 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
646
647         * driver.c (mono_main): Fix a warning.
648
649 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
650
651         * aot-compiler.c: Optimize various parts when processing large assemblies.
652         Fixes ##325568.
653
654         * mini.c (mono_patch_info_hash): Improve hash function.
655
656 2007-09-14  Jonathan Chambers <joncham@gmail.com>
657
658         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
659         
660         Code is contributed under MIT/X11 license.
661
662 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
663
664         * mini.c (mini_init): Fix a leak.
665
666         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
667
668 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
669
670         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
671
672 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
673
674         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
675
676 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
677
678         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
679         variance tests.
680
681         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
682
683         * mini.c (handle_alloc): Enable managed allocators in AOT code.
684
685         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
686
687         * aot-runtime.c (decode_patch_info): Ditto.
688
689 2007-09-12  Jonathan Chambers <joncham@gmail.com>
690
691         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
692         static case. Cache delegates in architecture specific code, 
693         based on number of parameters.
694         
695         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
696         in architecture specific code, based on number of parameters.
697         
698         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
699         caching happen in architecture specific code now.
700         
701         Code is contributed under MIT/X11 license.
702
703 2007-09-12  Jonathan Chambers <joncham@gmail.com>
704
705         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
706         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
707         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
708
709         Code is contributed under MIT/X11 license.
710
711 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
712         * mini.c: (mono_thread_abort) Fixed bug #82416.
713
714 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
715
716         * mini.: hook the new managed GC allocation feature into the JIT.
717
718 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
719
720         * mini.c: implementation for the new runtime tls opcode.
721
722 2007-09-11  Martin Baulig  <martin@ximian.com>
723
724         * debug-debugger.h
725         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
726         `mono_method_inflated_offset'.
727
728 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
729
730         * driver.c mini.h mini.c: Add a new devel command line option for injecting
731         async exceptions into a method.
732
733         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
734         purpose of testing whenever the unwinder works at every instruction.
735
736 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
737
738         * mini.c: check accessibility of method used in ldftn (fixes
739         bug #82635).
740
741 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
742
743         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
744
745         * inssel.brg: Fix a warning.
746
747 2007-09-03  Martin Baulig  <martin@ximian.com>
748
749         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
750         now takes the `main_method' as argument.
751
752 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
753
754         * cpu-sparc.md (endfilter): Add missing src1:i argument.
755
756 2007-08-30  Jonathan Chambers <joncham@gmail.com>
757
758         * driver.c: include the cil-coff.h header on Windows.
759         
760         Code is contributed under MIT/X11 license.
761
762 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
763
764         * mini.c, driver.c: don't include the cil-coff.h header.
765
766 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
767
768         * mini.c: flag places that needs fixes fo soft-float support.
769
770 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
771
772         * mini.h, inssel-float.brg: fix soft-float constant loads on big
773         endian systems (partially from Dean Jenkins, bug #81924).
774
775 2007-08-28  Mark Probst  <mark.probst@gmail.com>
776
777         * mini.c (check_linkdemand): Remove embedded reference object in
778         call to LinkDemandSecurityException.
779         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
780         with an IntPtr instead of a reference object.
781
782 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
783
784         * mini.c (handle_initobj): Handle alignment properly.
785
786         * inssel.brg (mini_emit_memset): Ditto. 
787
788         * inssel.brg (mini_emit_memcpy): Ditto. 
789
790         * inssel-sparc.brg: Ditto.              
791
792         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
793
794 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
795
796         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
797         exceptions raised in unmanaged code. Fixes part of #82594.
798
799 2007-08-24  Mark Probst  <mark.probst@gmail.com>
800
801         * mini.c (mono_method_to_ir), declsec.c
802         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
803
804 2007-08-22  Martin Baulig  <martin@ximian.com>
805
806         * debug-mini.h
807         (MonoDebuggerThreadInfo): New typedef.
808         (mono_debugger_thread_table): New global variable.
809         (mono_debugger_thread_created): New public function.
810         (mono_debugger_thread_cleanup): New public function.
811
812         * debug-debugger.h
813         (MonoDebuggerInfo):
814         - removed `get_current_thread' and `lookup_assembly'.
815         - removed `data_table'.
816         - added `thread_table'.
817
818         * mini.c
819         (mono_thread_start_cb): Call mono_debugger_thread_created().
820         (mono_thread_attach_cb): Likewise.
821         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
822         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
823         initial domain.
824
825         * driver.c (mono_main): Move mono_debug_init() up, before calling
826         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
827
828 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
829
830         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
831         together when passing several arguments of type double (gives a small
832         speedup and saves a few bytes of generated code).
833
834 2007-08-20  Jb Evain  <jbevain@novell.com>
835
836         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
837
838 2007-08-20  Jb Evain  <jbevain@novell.com>
839
840         * mini.c (mono_method_to_ir): throw MethodAccessException
841         and FieldAccessException instead of InvalidProgramException.
842
843 2007-08-20  Mark Probst  <mark.probst@gmail.com>
844
845         * mini.c: CoreCLR security checks.
846
847         * mini.h: Removed MonoSecurityMode (moved to
848         metadata/security-manager.h) and mono_security_mode global var
849         (replaced by set/get functions in security-manager.h).
850
851         * driver.c: Added "core-clr-test" security mode for testing.  Used
852         set-function for setting security mode.
853
854 2007-08-17  Mark Probst  <mark.probst@gmail.com>
855
856         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
857         the new jit_info_table.
858
859         * driver.c: Test code for the new jit_info_table (enabled by the
860         define MONO_JIT_INFO_TABLE_TEST).
861
862 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
863
864         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
865         detection of call <REG> instruction sequence. Fixes build on freebsd.
866
867 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
868
869         * mini-exceptions.c: Fix a warning.
870
871 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
872
873         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
874         stack overflow handling code on amd64 too.
875
876         * mini-exceptions.c (mono_setup_altstack): Make this use 
877         mono_thread_get_stack_bounds ().
878
879         * mini-x86.h: Disable sigaltstack on solaris x86.
880
881 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
882
883         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
884
885 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
886
887         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
888
889 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
890
891         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
892
893         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
894
895 2007-08-03  Neale Ferguson <neale@sinenomine.net>
896
897         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
898         due to alignment.
899
900 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
901
902         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
903         to be emitted (bug #82281).
904
905 2007-08-01  Martin Baulig  <martin@ximian.com>
906
907         Merged the `debugger-dublin' branch.
908
909         * debug-debugger.h (MonoDebuggerInfo):
910         Removed the `old_*' compatibility entries.
911         Added `debugger_version' and `data_table'.
912         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
913         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
914
915         * debug-mini.c
916         (MiniDebugMethodBreakpointInfo): Add `address_list'.
917         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
918         instead of a `gconstpointer'.
919         (mono_debugger_insert_method_breakpoint): Return a
920         `MonoDebugMethodAddressList *'.
921
922 2007-06-28  Martin Baulig  <martin@ximian.com>
923
924         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
925
926 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
927
928         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
929         __builtin_frame_address () since it is broken on older gcc versions.
930
931 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
932
933         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
934         on the stack overflow handling and made the managed stack overflows
935         catchable in most cases using soft guard pages.
936         * exceptions-x86.c: added code to restore the protection in the soft
937         guard pages at the end of exception handling.
938
939 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
940
941         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
942
943 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
944
945         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
946         exception handling.
947
948 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
949
950         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
951         signal handling support until it has been ported to the new mechanism.
952         * mini.c: fixed stack overflow detection and use the new
953         architecture code  to handle signals on the altstack.
954
955 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
956
957         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
958         stack overflows on the alt stack.
959
960 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
961
962         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
963         stack overflows on the alt stack.
964
965 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
966
967         * exceptions-ppc.c: cleanup preparing for altstack support.
968
969 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
970
971         * exceptions-arm.c: cleanup preparing for altstack support.
972
973 2007-07-27  Mark Probst  <mark.probst@gmail.com>
974
975         * mini.c (print_jit_stats): Output hazard pointer stats.
976
977 2007-07-26  Mark Probst  <mark.probst@gmail.com>
978
979         * driver.c, mini.c: Replaced security mode flags with a single
980         enum variable.
981
982 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
983
984         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
985
986 2007-07-25  Mark Probst  <mark.probst@gmail.com>
987
988         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
989         (which doesn't do anything yet) for activating Core CLR
990         (Silverlight) security.
991
992 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
993
994         * mini-codegen.c: work around a possible gcc bug on arm.
995
996 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
997
998         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
999         message for platforms that don't support AOT compilation.
1000
1001 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
1002
1003         * mini.h, mini.c, driver.c: temporary smcs hack.
1004
1005 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
1006
1007         * mini-arm.h, mini-arm.c: arm EABI fixes.
1008
1009 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
1010
1011         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
1012         case.
1013
1014         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
1015         trampolines taking a method argument.
1016
1017         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
1018
1019         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
1020         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
1021
1022         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
1023         JIT compilation throws an exception. Fixes #82050.
1024
1025 2007-07-19  Mark Probst  <mark.probst@gmail.com>
1026
1027         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
1028         with the MONO_EXCEPTION_ defines.
1029
1030 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
1031
1032         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
1033         #82117.
1034         
1035         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
1036         the cause of an assertion.
1037
1038 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
1039
1040         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
1041         removed.
1042
1043 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
1044
1045         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
1046         assert. Should fix #82103.
1047
1048 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
1049
1050         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
1051         here too. Fixes #82095.
1052
1053         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
1054         addresses.
1055
1056         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
1057
1058         * mini-amd64.h: Enable IMT for amd64.
1059         
1060         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
1061
1062 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
1063
1064         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
1065
1066 2007-07-12  Mark Probst  <mark.probst@gmail.com>
1067
1068         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
1069         as soon as check_linkdemand sets an exception_type.
1070
1071 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
1072
1073         * mini-x86.c: fixed offsets for IMT call sequence.
1074         * mini-x86.h: enable IMT again.
1075
1076 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
1077
1078         * trace.c (mono_trace_enter_method): Decode MonoType too.
1079
1080         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
1081
1082         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
1083
1084         * mini-amd64.c: Add preliminary IMT implementation.
1085         
1086 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
1087
1088         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
1089         understand the new IMT-base interface invocation (thanks to
1090         Daniel Nauck for the report and the remote debugging session).
1091
1092 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
1093
1094         * mini-x86.c: size and speed optimizations for the IMT bsearch.
1095
1096 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
1097
1098         * Makefile.am (aotcheck): Make this actually use the AOTed code.
1099
1100 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
1101
1102         * mini-trampolines.c: implement AOT IMT support.
1103         * mini-x86.h: enable IMT support for wider testing.
1104
1105 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
1106
1107         * inssel.brg (emit_imt_argument): Add aot support here.
1108
1109         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
1110
1111 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
1112
1113         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
1114         of the IMT implementation, partially from massi, with my
1115         implementation of the bsearch sequence. Disabled by default until
1116         the AOT code is implemented.
1117
1118 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
1119
1120         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
1121
1122         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
1123
1124 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
1125
1126         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
1127         arch-independent IMT JIT code from Massimiliano
1128         Mantione (massi@ximian.com) with small cleanups from me.
1129
1130 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
1131
1132         * Makefile.am: fix svn invocation to get the svn revision to be
1133         independent of the local language (build fix).
1134
1135 2007-07-09  Mark Probst  <mark.probst@gmail.com>
1136
1137         * mini.c (inline_method): Reset cfg->exception_type if the
1138         inlining is aborted.  Fixes: 82049.
1139
1140 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
1141
1142         * mini.c: remove assert from exception handling code when exception_ptr
1143         is not set.
1144
1145 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
1146
1147         * mini.c (mono_codegen): Add an assert.
1148
1149         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
1150         enter and leave code.
1151         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
1152
1153 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
1154
1155         * mini-ppc.c: fixed memory corruption for localloc(0)
1156         (bug #81852).
1157
1158 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
1159         
1160         * mini.c: Fix warnings.
1161
1162 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
1163
1164         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
1165         to emit better double->int conversions.
1166
1167 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
1168
1169         * mini.c: the provided Min/Max optimizations are valid for unisgned
1170         ints.
1171
1172 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
1173
1174         * 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
1175
1176 2007-06-28  Miguel de Icaza  <miguel@novell.com>
1177
1178         * mini.c (mono_running_on_valgrind): Add support for reporting the
1179         method and  its boundaries to valgrind.
1180
1181 2007-06-28  Martin Baulig  <martin@ximian.com>
1182
1183         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
1184
1185 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
1186
1187         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
1188
1189         * generic.2.cs: Add new test case.
1190
1191 2007-06-25  Martin Baulig  <martin@ximian.com>
1192
1193         Merged the `debugger-dublin' branch.
1194
1195         * debug-mini.c
1196         (mono_debugger_insert_method_breakpoint): New public method.
1197         (mono_debugger_remove_method_breakpoint): Likewise.
1198         (mono_debugger_check_breakpoints): New static method.
1199         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
1200
1201         * debug-debugger.h (MonoDebuggerInfo):
1202         Renamed (to keep backward compatibility in the vtable):
1203         `insert_breakpoint' -> `old_insert_breakpoint'.
1204         `remove_breakpoint' -> `old_remove_breakpoint'.
1205         `create_string' -> `old_create_string'.
1206         `lookup_class' -> `old_lookup_class'.
1207         `lookup_type' -> removed; changed into a dummy field.
1208         `lookup_assembly' -> `old_lookup_assembly'.
1209         Added (same functionality, but different signature):
1210         `create_string', `lookup_class', `lookup_assembly'
1211         Added new:
1212         `get_method_addr_or_bpt', `remove_method_breakpoint',
1213         `runtime_class_init'.
1214
1215         * debug-debugger.c: Merged the `debugger-dublin' branch.
1216
1217 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
1218
1219         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
1220         well.
1221         (peephole_pass): Likewise.
1222
1223 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
1224
1225         * driver.c: hopefully make setaffinity work also for ancient
1226         versions of linux.
1227
1228 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
1229
1230         * driver.c : win32 build fix.
1231
1232 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
1233
1234         * driver.c: check for the MONO_NO_SMP env var and bind to a single
1235         processor if it is set.
1236
1237 2007-06-21  Martin Baulig  <martin@ximian.com>
1238
1239         * debug-mini.h: New file.
1240
1241         * debug-mini.c
1242         (mono_debugger_insert_breakpoint_full): Moved here from
1243         ../metadata/mono-debug-debugger.c.
1244         (mono_debugger_remove_breakpoint): Likewise.
1245         (mono_debugger_breakpoint_callback): Likewise.
1246
1247 2007-06-15  Raja R Harinath  <rharinath@novell.com>
1248
1249         * jit-icalls.c (mono_helper_compile_generic_method): Update to
1250         changes in MonoGenericClass.
1251
1252 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
1253
1254         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
1255
1256 2007-06-14  Raja R Harinath  <rharinath@novell.com>
1257
1258         * jit-icalls.c (mono_helper_compile_generic_method): Update to
1259         removal of MonoGenericMethod.
1260
1261 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
1262
1263         * mini-exceptions.c: hooks for the exception events profiling API.
1264
1265 2007-06-14  Randolph Chung  <tausq@debian.org>
1266
1267         * Makefile.ma: Add hppa target.
1268         * mini-arch.h: Include mini-hppa.h
1269         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
1270         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
1271         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
1272
1273 2007-06-14  Randolph Chung  <tausq@debian.org>
1274
1275         * inssel.brg: Add rules for "chained" compare-branch operations so that
1276         a single compare op can affect multiple branches.  Adjust cost for
1277         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
1278         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
1279         cost for some rules so that they can more easily be overridden by
1280         per-arch rules (with fixes from lupus).
1281         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
1282
1283 2007-06-13  Randolph Chung  <tausq@debian.org>
1284
1285         * mini-ops.h: Reorder branch ops so that they match the order of the
1286         corresponding CEE_* ops.  The code expects them this way.
1287         Add new ops for HPPA target.
1288         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
1289
1290 2007-06-13  Randolph Chung  <tausq@debian.org>
1291
1292         * mini-exceptions.c: Handle cases where the stack grows towards
1293         larger addresses.
1294         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
1295
1296 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
1297
1298         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
1299         counter.
1300         * driver.c: explain where a non-matching corlib is found.
1301
1302 2007-06-13  Mark Probst  <mark.probst@gmail.com>
1303
1304         * mini.c (print_jit_stats): Output dynamic code allocation stats.
1305
1306 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
1307
1308         * mini-exceptions.c: Generate a method profile leave event during
1309         an exception to ensure that the profiler gets notified.
1310
1311 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
1312
1313         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
1314         branch.
1315
1316         * cpu-amd64.md: Add long_and/or/xor opcodes.
1317
1318 2007-06-06  Wade Berrier  <wberrier@novell.com>
1319
1320         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
1321         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
1322         length of instruction shr_imm (expected 8, got 10)
1323
1324 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
1325
1326         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
1327
1328 2007-06-06  Mark Probst  <mark.probst@gmail.com>
1329
1330         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
1331         MonoInternalHashTable again (fixed bug in the internal hash table
1332         code).
1333
1334 2007-06-06  Mark Probst  <mark.probst@gmail.com>
1335
1336         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
1337         Have to figure out what makes it crash the SWF regression.
1338
1339 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
1340
1341         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
1342
1343 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
1344
1345         * mini.c: optimize out the type check when storing null in a
1346         reference array.
1347
1348 2007-06-04  Mark Probst  <mark.probst@gmail.com>
1349
1350         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
1351         MonoInternalHashTable.
1352
1353 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
1354
1355         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
1356         signed integer methods.
1357
1358 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
1359
1360         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
1361         permanently since the current approach doesn't work.
1362
1363 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
1364
1365         * inssel.brg (stmt): Only call delegate->invoke_impl if 
1366         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
1367
1368 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
1369
1370         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
1371         the sreg2==rdx case.
1372         
1373         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
1374         account if it contains a rex prefix.
1375         (peephole_pass): Handle OP_FMOVE as well.
1376
1377 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
1378
1379         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
1380         as it causes regressions.
1381
1382 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
1383
1384         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
1385         static case as well.
1386
1387         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
1388
1389         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
1390         (mono_arch_get_this_arg_from_call): Ditto.
1391
1392         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
1393
1394         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
1395         invoke_impl field.
1396
1397         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
1398         (mono_arch_get_this_arg_from_call): Ditto.
1399
1400         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
1401         
1402         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
1403         try to create optimized invoke code and use that for further invocations. 
1404         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
1405
1406         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
1407
1408 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
1409
1410         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
1411         sealed classes or methods.
1412         *devirtualization.cs: tests for the new optimization
1413
1414 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
1415
1416         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
1417         by the update_volatile () function.
1418
1419 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
1420
1421         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
1422         require it.
1423
1424         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
1425
1426 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
1427
1428         * mini.c: Add configure checks for header files.
1429         * mini-x86.c: Add configure checks for header files.
1430         * trace.c: Add configure checks for header files.
1431         * aot-runtime.c: Add configure checks for header files.
1432         * aot-compiler.c: Add configure checks for header files.
1433         * driver.c: Add configure checks for header files.
1434         * mini-codegen.c: Add configure checks for header files.
1435         
1436         Code is contributed under MIT/X11 license.
1437
1438 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
1439
1440         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
1441         icompare_imm -128 + op_iclt. Fixes #81703.
1442
1443 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
1444
1445         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
1446
1447 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
1448
1449         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
1450         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
1451         so that all isinst checks now use "interface_bitmap".
1452
1453 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
1454
1455         * cpu-amd64.md (jmp): Fix a warning.
1456
1457         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
1458
1459         * basic.cs: Add new regression test.
1460
1461         * basic.cs: Remove test which is now in basic-long.cs.
1462
1463         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
1464
1465         * basic-long.cs: Add new test.
1466         
1467 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
1468
1469         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
1470
1471 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
1472
1473         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
1474
1475         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
1476         places.
1477         
1478         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
1479         throwing code a bit.
1480
1481         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
1482         the exception throwing code a bit.
1483
1484         * mini-x86.c (get_call_info): Allocate result from a mempool.
1485
1486 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
1487
1488         * aot-compiler.c (find_typespec_for_class): Fix the assert.
1489
1490         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
1491
1492         * mini.h (MonoCompile): Add 'token_info_hash' field.
1493
1494         * mini.c: Save token->method associations during compilation so the AOT 
1495         compiler can use it.
1496         
1497         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
1498         which reference generic classes and methods.
1499
1500 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
1501
1502         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
1503
1504         * aot-compiler.c (compile_method): Fix a typo in a comment.
1505
1506         * aot-runtime.c (decode_cached_class_info): Skip generic types.
1507
1508         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
1509         everything generic.
1510
1511         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
1512
1513 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
1514
1515         * mini.h (MonoCompile): Add 'args' field.
1516
1517         * mini.c (mono_compile_create_vars): Store variables representing the arguments
1518         into cfg->args.
1519
1520         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
1521
1522 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
1523
1524         * mini.c (mono_compile_get_interface_var): Remove this unused function.
1525
1526         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
1527
1528         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
1529         opcodes for some opcodes.
1530
1531         * mini.h *.brg *.c: Use the new opcodes.
1532
1533 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
1534
1535         * mini.h: Bumped aot revision.
1536
1537         * inssel.brg: modified code generation of type checks for interfaces
1538         to use the new "MonoClass.interface_bitmap" instead of the old
1539         "MonoClass.interface_offsets".
1540
1541 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
1542
1543         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
1544
1545 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
1546
1547         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
1548         64 bit platforms.
1549
1550 2007-04-27  Neale Ferguson <neale@sinenomine.net>
1551
1552         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
1553
1554 2007-04-27  Wade Berrier  <wberrier@novell.com>
1555
1556         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
1557         mini.h) to fix build.
1558
1559 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
1560
1561         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
1562         
1563         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
1564         causes the corlib unit tests to fail.
1565
1566 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
1567
1568         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
1569
1570         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
1571
1572         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
1573         opcodes to the comparison relations.
1574
1575         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
1576         opcodes to their types.
1577         
1578         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
1579
1580         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
1581         it in cfg->arch.cinfo.
1582
1583         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
1584
1585         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
1586         cfg->cil_offset_to_bb.
1587
1588 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
1589
1590         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
1591         created becase of initlocals.
1592
1593 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
1594
1595         * mini-alpha.c cpu-alpha.md: More alpha port work from 
1596         Sergey Tikhonov <tsv@solvo.ru>.
1597
1598 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
1599
1600         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
1601
1602 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
1603
1604         * cpu-s390.md (break): Correct the length of break instruction.
1605
1606 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
1607
1608         * mini.c: fix a couple of soft-float issues and comments.
1609
1610 2007-04-15  Miguel de Icaza  <miguel@novell.com>
1611
1612         * trace.c (is_filenamechar): - is also a filename char.
1613
1614 2007-04-15  Neale Ferguson <neale@sinenomine.net>
1615
1616         * mini-s390.c: Correct checking for enum type in return value processing.
1617
1618 2007-04-14  Raja R Harinath  <rharinath@novell.com>
1619
1620         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
1621         (version.h): Makefile is in the build directory.
1622
1623 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
1624
1625         * mini-amd64.h: fix for assertion failure on Solaris/amd64
1626
1627 2007-04-11  Martin Baulig  <martin@ximian.com>
1628
1629         * mini.c (can_access_member): Fix handling of generic classes;
1630         fixes #81259.
1631
1632 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
1633
1634         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
1635
1636 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
1637
1638         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
1639
1640 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
1641
1642         * mini-codegen.c: make sure the right spill amount is
1643         used for fp or integer registers (fixes the float_sub_spill() on ppc).
1644
1645 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
1646
1647         * mini-ppc.c: fixes for the fp_branch_nan test.
1648
1649 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
1650
1651         * basic.cs: Comment out new test which still fails on ia64.
1652
1653 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
1654
1655         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
1656
1657 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
1658
1659         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
1660
1661 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
1662
1663         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
1664         on 64 bit machines. Fixes part of #80738.
1665
1666         * basic.cs: Add regression test.
1667
1668 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
1669
1670         * inssel.brg basic.cs: Revert previous change to fix build.
1671
1672         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
1673         platforms.
1674         
1675         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
1676
1677         * basic.cs: Add new regression test.
1678
1679 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
1680
1681         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
1682         many arguments.
1683
1684 2007-03-16  Neale Ferguson <neale@sinenomine.net>
1685
1686         * cpu-s390x.md: Correct length of break instruction.
1687
1688 2007-03-16  Neale Ferguson <neale@sinenomine.net>
1689
1690         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
1691         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
1692
1693 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
1694
1695         * *.c: Begin WIN64 port.
1696         * mini.c:  Use correct register in profiler.
1697         * mini-amd64.c: No inline assembly on Win64.
1698         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
1699         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
1700         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
1701         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
1702         mono_arch_ip_from_context for Win64.
1703         
1704         Contributed under MIT/X11 license.
1705
1706 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
1707
1708         * exceptions-amd64.c (seh_handler): Ditto.
1709
1710         * exceptions-x86.c (seh_handler): Fix a memory leak.
1711
1712 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
1713
1714         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
1715         mini-s390x.c: fixed peephole optimizations to deal
1716         correctly with 1 and 2 byte reload avoidance.
1717
1718 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
1719
1720         * cpu-s390.md, cpu-s390x.md: update localloc length.
1721
1722 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
1723
1724         * cpu-g4.md: added missing descriptions.
1725
1726 2007-03-14  Miguel de Icaza  <miguel@novell.com>
1727
1728         *  Makefile.am: Add support so the tail tests are not executed on
1729         PowerPC as that is a known limitation of the PowerPC port.
1730
1731 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
1732
1733         * runmdesc.bat:  Move to msvc directory.
1734         
1735 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
1736
1737         * runmdesc.bat:  Run executable that was produced by the current
1738         target and sent via an argument.
1739         
1740 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
1741
1742         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
1743         #81102.
1744
1745         * generics.2.cs: Add regression test.
1746
1747 2007-03-09  Wade berrier  <wberrier@novell.com>
1748
1749         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
1750
1751 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
1752
1753         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
1754         AOT code depends on this.
1755
1756 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
1757
1758         * mini.c: more precise tracking of types in the eval stack
1759         (part of fix for bug #81044).
1760
1761 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
1762
1763         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
1764
1765         * aot-compiler.c (encode_patch): Remove an obsolete comment.
1766
1767 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
1768
1769         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
1770
1771         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
1772
1773 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
1774
1775         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
1776         a pointer on 64 bit systems. Fixes #80190.
1777
1778         * iltests.il: Add new regression test.
1779
1780 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
1781
1782         * mini.c: inline a constant for Environment.IsRunningOnWindows.
1783
1784 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
1785
1786         * trace.c: Remove an erroneous alignemnt check when tracing.
1787           Fixes --trace on OSX86.
1788
1789 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
1790
1791         * mini-$(arch).h: initialize SP in context for all the archs.
1792
1793 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
1794
1795         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
1796         regressions in the thread tests.
1797
1798 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
1799
1800         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
1801         - fixed implementation of LOCALLOC opcode
1802         - implemented non-un compare for floats
1803         - code cleanup
1804         - implementation of FDIV and CKFINITE opcodes
1805         - fixes for latest mono updates
1806         - additional arch opcodes
1807
1808 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
1809
1810         * Makefile.am: simplify and merge rules for cross-compilation.
1811
1812 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
1813
1814         * local-propagation.c: Actually *apply* the fix for bug 80591...
1815
1816 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
1817
1818         * mini-exceptions.c: backuot part of the last change
1819         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
1820
1821 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
1822         * inssel.brg: Fix bug 59286.
1823
1824
1825 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
1826
1827         * mini-exceptions.c: patch from Zoltan to correctly check for
1828         stack boundaries (using the stack register, not the frame register),
1829         fixes bugs #80724, #79717.
1830
1831 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
1832
1833         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
1834         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
1835
1836         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
1837         presence of frame pointer elimination.
1838
1839 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
1840         
1841         * mini-x86.h: NetBSD UCONTEX_REG defines.
1842
1843 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
1844
1845         * inssel-amd64.brg: Fix amd64 build.
1846
1847 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
1848
1849         * mini.h: remove extern to workaround what looks likes gcc bug 26905
1850         on amd64.
1851
1852 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
1853
1854         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
1855         ends.
1856
1857         * mini-<ARCH>.c: Use mono_is_regsize_var ().
1858
1859 2007-01-30 Mark Mason <mason@broadcom.com>
1860
1861            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
1862            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
1863            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
1864            beginning support for CEE_JMP [not quite working yet]
1865            * tramp-mips.c: LMF handling now works
1866         
1867 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
1868
1869         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
1870
1871         * mini.h (NULLIFY_INS): New macro.
1872
1873 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
1874
1875         * mini.c: statistical profiler fix for windows, patch
1876         from Tor Lillqvist (tml@novell.com).
1877
1878 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
1879         * local-propagation.c: Fix bug 80591.
1880
1881 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
1882
1883         * Makefile.am: put back the --export-dynamic option as with
1884         the previous gmodule flags (thanks to Robert Jordan).
1885
1886 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
1887
1888         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
1889
1890         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
1891         simplify and speed up the local register allocator. Also rename some fields
1892         like iassign->vassign.
1893         
1894         * regalloc.c: Remove some functions which are no longer used since their
1895         inlined version is in mini-codegen.c.
1896         
1897         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
1898
1899         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
1900
1901 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
1902
1903         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
1904         narrowing. Fixes #80622.
1905
1906         * iltests.il: Add new regresssion test. 
1907
1908 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
1909
1910         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
1911         debug-debugger.c, debug-debugger.h: warning fixes.
1912         * driver.c: updated copyright year and made it fit in one line.
1913
1914 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
1915
1916         * aot-runtime.c: updated to use mono-dl instead of gmodule.
1917
1918 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
1919
1920         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
1921
1922         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
1923
1924         * iltests.il: Add new test for bug #80507.
1925
1926 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
1927
1928         * mini-arm.h: use soft-float also on vfp for now.
1929
1930 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
1931
1932         * mini.c: fix some more soft-float issues.
1933
1934 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
1935
1936         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
1937
1938 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
1939         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
1940         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
1941         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
1942
1943 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
1944
1945         * mini-arm.c: typo fix.
1946
1947 2007-01-23  Neale Ferguson <neale@sinenomine.net>
1948
1949         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
1950
1951 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
1952
1953         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
1954         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
1955
1956         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
1957
1958         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
1959
1960         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
1961         
1962         * inssel.brg: Fix a warning.
1963
1964         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
1965
1966         * abcremoval.c ssa.c ssapre.c: Update after this change.
1967         
1968         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
1969
1970         * dominators.c (df_set): Use mono_bitset_union_fast.    
1971
1972 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
1973
1974         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
1975         mini-codegen.c: reduce relocations and memory usage for the cpu
1976         description.
1977
1978 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
1979
1980         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
1981
1982         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
1983         to reduce their size.
1984
1985 2007-01-19 Mark Mason <mason@broadcom.com>
1986
1987         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
1988         * mini-mips.c: more configuration macros, support long conditional branches, additional
1989         asserts, fix epilog instrumentation.
1990         * mini-mips.h: use standard stack walk
1991         * cpu-mips.md: increase size of div, rem and conditional branches
1992         
1993 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
1994
1995         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
1996         to cpu spec data.
1997
1998 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
1999
2000         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
2001         (compile_method): Ditto.
2002
2003         * aot-runtime.c (decode_klass_info): Ditto.
2004
2005         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
2006         needed by the code generated by inssel.brg. Also fix a warning.
2007
2008 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
2009
2010         * mini.c: deal with enums that become genericinsts by
2011         being nested in a generic class (bug #79956).
2012
2013 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
2014
2015         * mini.c: match the generic definition to check for
2016         private access with generic types (bug #78431).
2017
2018 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
2019
2020         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
2021         to make life easier for people cross-compiling that insist on not
2022         using scratchbox.
2023
2024 2007-01-17 Mark Mason <mason@broadcom.com>
2025
2026         * inssel-long.brg: patch to deal with mips missing flags
2027         * inssel-long32-mips.brg: implement overflow checks
2028         * insset-mips.brg: implement overflow checks
2029         * mini-mips.h: implement conditional exception handling
2030         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
2031           Remove unused code, minor cleanups.
2032         * exceptions-mips.c: minor cleanups
2033         * mini-ops.h: add mips conditional exception ops
2034         * cpu-mips.md: add mips conditional exception ops
2035
2036         
2037 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
2038
2039         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
2040         to deal with mips missing of flags.
2041
2042 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
2043
2044         * exceptions-ppc.c: execute fault handlers.
2045
2046 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
2047
2048         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
2049
2050 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
2051
2052         * mini.c: handle also floating point values in initialize_array.
2053
2054 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
2055
2056         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
2057         array initialization and make it conditional on the intrins option.
2058
2059 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
2060
2061         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
2062         relocations and put the patch info names close to the enum definition.
2063
2064 2007-01-15 Mark Mason <mason@broadcom.com>
2065
2066         * basic.cs, exceptions.cs: break up large tests to increase debugability.
2067
2068 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
2069
2070         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
2071
2072 2007-01-12  Raja R Harinath  <rharinath@novell.com>
2073
2074         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
2075
2076 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
2077
2078         * Makefile.am: distribute the mips sources.
2079
2080 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
2081
2082         * mini-codegen.h: handle bug #80489 here, by excluding ecx
2083         directly.
2084
2085 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
2086
2087         * cpu-x86.md: back out for now as this triggers other regressions.
2088
2089 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
2090
2091         * cpu-x86.md: force src1 and dest regpair for long shift instructions
2092         to eax:edx, so ecx can't get allocated to them (bug #80489).
2093
2094 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
2095
2096         * mini.c, mini-exceptions.c: enabled running fault handlers
2097         (bug #80469).
2098
2099 2007-01-03  Miguel de Icaza  <miguel@novell.com>
2100
2101         * driver.c: If nothing fail, do not use the string "failed",
2102         because it makes it very annoying to view test result logs on the
2103         web. 
2104
2105 2006-12-30  Miguel de Icaza  <miguel@novell.com>
2106
2107         * debug-debugger.c (mono_debugger_main): Rename "main" to
2108         "main_method" to prevent a warning.
2109
2110         Remove a warning for unused field.
2111
2112 2006-12-28  Martin Baulig  <martin@ximian.com>
2113
2114         * debug-debugger.c
2115         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
2116
2117 2006-12-22  Martin Baulig  <martin@ximian.com>
2118
2119         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
2120         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
2121         seperate `.mdb_debug_info' section, so we can access it from the
2122         debugger even if the binary is stripped.
2123
2124         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
2125         from the `.mdb_debug_info' here to prevent the linker from
2126         removing that section.
2127
2128         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
2129         mdb-debug-info64.s.
2130
2131 2006-12-19  Robert Jordan  <robertj@gmx.net>
2132
2133         * mini-x86: enable the code to return small structures in
2134         registers for FreeBSD as well. Fixes bug #80278.
2135         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
2136
2137 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
2138
2139         * mini-x86.c: align the stack when calling the profiler
2140         function instrumenting the prolog (on OSX).
2141
2142 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
2143
2144         * mini.c: emit a break opcode where Debugger.Break () is called.
2145
2146 2006-12-13  Miguel de Icaza  <miguel@novell.com>
2147
2148         * mini.c (mono_method_to_ir): Provide useful information on this
2149         assert, to prevent others from debugging like I did.
2150
2151 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
2152
2153         * mini.c: enable code which was incorrectly commented
2154         (bug #80235).
2155
2156 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
2157
2158         * mini-x86.c: enable on OSX, too, the code to return small
2159         structures in registers.
2160
2161 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
2162
2163         * mini-x86.c: remove the use of the dynamic code manager here, too.
2164
2165 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
2166
2167         * mini.h, debug-debugger.c, tramp-*.c: fixed 
2168         mono_debugger_create_notification_function() to use
2169         mono_global_codeman_reserve () instead of a dynamic code manager.
2170
2171 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
2172
2173         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
2174         ves_array_element_address() jit icall and use a generated
2175         managed method instead (which is about 4 times faster for a rank 3
2176         array access).
2177
2178 2006-11-29  Mark Mason  <mason@broadcom.com>
2179
2180         * basic-calls.cs: additional tests for passing
2181         structures as function arguments.
2182
2183 2006-11-29  Mark Mason  <mason@broadcom.com>
2184
2185         * mini-mips.h: disable custom exception handling
2186         * mini-mips.c: throw/rethrow should use jalr to call
2187         exception stubs.  Fixed bug with passing structures
2188         by value. More support for tracing floating point
2189         functions.
2190
2191 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
2192
2193         * mini.c: fixed typo in the soft-float ldind.r4 handling
2194         (bug #80086).
2195
2196 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
2197
2198         * mini.c, mini.h, driver.c: added --runtime command line
2199         option to select a different runtime than the autodetected one.
2200         * jit.h: added API for embedders to initialize with a specific
2201         runtime version.
2202
2203 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
2204
2205         * mini.c: handle also boxing of r4 values (bug #80024).
2206
2207 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
2208
2209         * mini-ppc.c: force indirect calls until we reserve
2210         enough address space for all the generated code.
2211
2212 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
2213
2214         * exceptions-arm.c: workaround bugs in the libc definition
2215         of struct ucontext.
2216
2217 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
2218
2219         * inssel.brg: fixes from me and Mark Mason.
2220
2221 2006-11-23  Dick Porter  <dick@ximian.com>
2222
2223         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
2224         semaphore display now we've fixed the initial value
2225
2226 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
2227
2228         * inssel.brg: partially revert the last change to fix the build.
2229
2230 2006-11-21  Mark Mason  <mason@broadcom.com>
2231
2232         * inssel.brg: Add and use compare-and-branch macros to support
2233         architectures that do not have condition code registers (ie. MIPS).
2234         * *-mips.{c,brg,md}: Fix copyright statements
2235
2236 2006-11-20  Mark Mason  <mason@broadcom.com>
2237
2238         * Makefile.am: remove mini-codegen.c from list of MIPS sources
2239         * mini.c: Allow GET_CONTEXT to be specified by the arch port
2240         * mini.h: Added declaration for mono_print_ins()
2241         * mini-codegen.c: added ins_spec initializer for MIPS
2242         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
2243         vreg to be virtual and hreg to be non-virtual.
2244         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
2245         is not yet working/implemented correctly.
2246         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
2247         non-static, fixup calls to print_ins() from other parts in the file.
2248
2249 2006-11-20  Mark Mason  <mason@broadcom.com>
2250
2251         * basic-calls.cs: added tests for passing structures as arguments
2252         to calls.
2253
2254 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
2255
2256         * inssel-long32.brg: optimize signed division by power of two.
2257
2258 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
2259
2260         * mini-arm.c: added support for interworking with thumb code
2261         (mono must be still be built using the ARM instruction encoding).
2262
2263 2006-11-19  Miguel de Icaza  <miguel@novell.com>
2264
2265         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
2266         verifier has different rules for it.   Fixes a few verifier issues
2267         in the test suite.
2268
2269         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
2270         at the end, so people know what happened.
2271
2272 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
2273
2274         * brach-opts.c: in optimize_exception_target() make sure we
2275         are in a catch clause (fixes bug #79871).
2276
2277 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2278
2279         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
2280         more soft-float support fixes.
2281
2282 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
2283
2284         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
2285         that are passed half on the stack and half in registers.
2286
2287 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
2288
2289         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
2290         more mips integration work from Mark E Mason 
2291         <mark.e.mason@broadcom.com>.
2292
2293 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
2294
2295         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
2296         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
2297         tramp-mips.c: added sources for the mips port, not
2298         integrated in the build yet. Contributed by
2299         Mark E Mason <mark.e.mason@broadcom.com>.
2300
2301 2006-11-14  Neale Ferguson <neale@sinenomine.net>
2302
2303         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
2304
2305 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
2306
2307         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
2308         put the soft-float rules in its own file since it seems to
2309         break s390 compilation.
2310
2311 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
2312
2313         * mini-arm.c: fixed wrnings.
2314
2315 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
2316
2317         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
2318         inssel-arm.brg: ARM support for soft-float.
2319
2320 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
2321
2322         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
2323         loads and stores of 32 bit fp values.
2324
2325 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
2326
2327         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
2328
2329         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
2330         works. Fixes #79852 and #79463.
2331
2332 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
2333
2334         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
2335         more soft-float support WIP and fixes.
2336
2337 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
2338
2339         * mini-arm.c: some VFP updates.
2340
2341 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
2342
2343         * mini-exceptions.c: 0 is a valid local var offset in some
2344         architectures, don't assert (bug #78508).
2345
2346 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
2347
2348         * exceptions-arm.c: fixed off by one error in stack walk code.
2349
2350 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
2351
2352         * mini.h, mini.c: more precise tracking of type load exceptions.
2353
2354 2006-11-03  Robert Jordan  <robertj@gmx.net>
2355
2356         * Makefile.am: [WIN32] Add monow.exe target.
2357         * driver.c: [WIN32] Don't detach the console when debugging.
2358         Fixes bug #79797.
2359         
2360 2006-10-30  Miguel de Icaza  <miguel@novell.com>
2361
2362         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
2363
2364 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
2365
2366         * aot-compiler.c (emit_method_info): Add a case missed earlier.
2367
2368         * driver.c (mini_regression): Fix --regression with AOT.
2369
2370         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
2371
2372 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
2373
2374         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
2375
2376         * mini-sparc.h: Don't use sigaction on sparc/linux.
2377
2378         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
2379
2380         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
2381
2382         * mini-exceptions.c: Add proper include files for getpid ().
2383
2384 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
2385
2386         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
2387         address instead of a MonoJitInfo* to avoid decoding the exception info for the
2388         method.
2389
2390         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
2391         name cache to reduce its size.
2392
2393         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2394
2395 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
2396
2397         * mini-x86.c: Save/restore the current LMF structure more efficiently using
2398         the mono_lmf TLS variable.
2399
2400         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
2401         trampoline lmf frames.  
2402
2403         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
2404
2405 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
2406
2407         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
2408         the mono_lmf TLS variable.
2409
2410         * mini-exceptions.c: Access the LMF structure through accessors.
2411
2412         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
2413         variable instead of in jit_tls->lmf.
2414
2415         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
2416         
2417         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
2418         trampoline lmf frames.
2419
2420         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
2421
2422 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
2423
2424        * mini.c trace.c mini-x86.c: Revert these too.
2425         
2426        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
2427        signature change.
2428
2429 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
2430
2431         * genmdesc.c: removed now dead code.
2432
2433 2006-10-09  Robert Jordan <robertj@gmx.net>
2434
2435         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
2436
2437 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
2438
2439         * mini.h: do not leave gaps in the opcode values.
2440
2441 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
2442
2443         * jit-icalls.h: flag functions as internal here, too.
2444
2445 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
2446
2447         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
2448         functions with the internal attribute.
2449
2450 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
2451
2452         * aot-compiler.c: fclose the file descriptor in the profile read loop.
2453
2454 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
2455
2456         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
2457         for soft-float.
2458
2459 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
2460
2461         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
2462         tail calls as on other platforms.
2463
2464         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
2465
2466         * iltests.il: Add a few tailcall tests.
2467
2468 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
2469
2470         * driver.c: fix loop for old compilers (bug #79521).
2471
2472 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
2473
2474         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
2475
2476         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
2477
2478         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
2479         metadata without any code.
2480
2481         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
2482         more precise debugging information using gdb.
2483
2484 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
2485
2486         * inssel-ia64.brg: Make the helper methods static.
2487
2488 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
2489
2490         * inssel-x86.brg: make the helper methods static.
2491
2492 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
2493
2494         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
2495
2496 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
2497
2498         * mini.c: updates for monoburg changes.
2499         * inssel.brg: make a few helper functions static as they should.
2500
2501 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
2502
2503         * Makefile.am: Move mini-codegen.c to common_sources.
2504
2505 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
2506
2507         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
2508         instructions.
2509         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
2510         mini-ppc.h: port to use the common local register allocator.
2511
2512 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
2513
2514         * mini.h: Remove the comment too then.
2515
2516 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
2517
2518         * mini.h: put back backend.data which is to be used shortly and
2519         doesn't increase the size of MonoInst. If any 64 bit arch aligned
2520         pointers on 4 byte boundaries it'd have much bigger issues running
2521         and you can ifdef it out anyway.
2522
2523 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
2524
2525         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
2526         MonoInst size by 4 bytes on 64 bit machines.
2527
2528 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
2529
2530         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
2531         replacement with more meaningful field names. Arch maintainers, please
2532         check the assigned names are good enough for your arch.
2533
2534 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
2535
2536         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
2537         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
2538
2539 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
2540
2541         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
2542         relocations and memory requirements, put the optimization flags
2543         definitions in their own file.
2544
2545 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
2546
2547         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
2548
2549         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
2550
2551 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
2552
2553         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
2554
2555 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
2556
2557         * inssel.brg: use the correct function to get the size of an item
2558         in an array, given an element class.
2559         * aot-compiler.c: do not access class->class_size directly.
2560
2561 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
2562
2563         * mini.h, debug-mini.c: added a debugging function to print
2564         info about local variables and arguments in a jitted method.
2565
2566 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
2567
2568         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
2569
2570         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
2571
2572 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
2573
2574         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
2575         inner and outer loops when passing vtypes.
2576
2577 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
2578
2579         * mini-ppc.c: take into account the cpu errata for cache flushing
2580         which caused some random errors (bug #79381).
2581
2582 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
2583
2584         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
2585         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
2586
2587 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
2588
2589         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
2590         loaded.
2591
2592         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
2593         freebsd ports tree.
2594
2595         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
2596         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
2597
2598         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
2599         displacement.
2600
2601 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
2602
2603         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
2604
2605 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
2606
2607         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
2608         macro does not have to be changed during debugging.
2609
2610         * 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>.
2611
2612         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
2613
2614         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
2615         
2616         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
2617         MONO_ARCH_NO_EMULATE_MUL is defined.
2618
2619         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
2620
2621         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
2622
2623         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
2624
2625         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
2626         
2627 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
2628
2629         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
2630         stuff to mini-exceptions.c where it is used.
2631
2632         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
2633         setup code, the real one is in mini-exceptions.c.
2634
2635         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
2636         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
2637         some changes from the freebsd ports tree.
2638
2639         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
2640         constants.
2641         
2642         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
2643
2644 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
2645
2646         * mini.c: on Linux, check for /proc to be mounted
2647         (bug# 79351, novell bug#201204).
2648
2649 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
2650
2651         * mini.c: handle cases where pthread_attr_getstack() behaves
2652         incorrectly (bug #78096).
2653
2654 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
2655
2656         * mini-arm.c: support larger stack frames (bug #79272).
2657
2658 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
2659
2660         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
2661
2662         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
2663         tokens.
2664
2665         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
2666         mono_class_from_name () to find a class from its name.
2667
2668         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
2669
2670 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
2671
2672         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
2673
2674 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
2675
2676         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
2677
2678 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
2679
2680         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
2681         callinfo->trampoline.
2682
2683         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
2684         fixes #79271.
2685         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
2686         future.
2687
2688 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
2689
2690         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
2691
2692 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
2693
2694         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
2695         stats.method_trampolines, it is already done by the generic trampoline code.
2696
2697         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
2698         
2699 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
2700
2701         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
2702
2703         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
2704
2705         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
2706
2707         * mini.c (print_jit_stats): Print mscorlib mempool size too.
2708         
2709         * mini.c (print_jit_stats): Print new stats.
2710
2711         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
2712
2713 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
2714
2715         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
2716         Address on two dimensional arrays. Fixes #78729.
2717
2718         * mini.h (MonoCompile): Add a 'skip_visibility' field.
2719
2720         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
2721         a method.
2722
2723         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
2724
2725         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
2726         #79130.
2727         
2728         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
2729         a race condition.
2730         (mini_get_ldelema_ins): Ditto.
2731
2732 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
2733
2734         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
2735         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
2736         Fixes #79213.
2737
2738 2006-08-29 Neale Ferguson <neale@sinenomine.net>
2739
2740         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
2741         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
2742
2743         * exceptions-s390x.c: Cosmetic change.
2744
2745         * tramp-s390.c: Fix warning.
2746
2747         * cpu-s390.md: Correct length of mul_imm.
2748
2749 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
2750
2751         * aot-compiler.c: added binary writer with ELF backend
2752         implementation (only on Linux/x86 for now).
2753
2754 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
2755
2756         * Makefile.am: Don't run net 2.0 AOT tests.
2757
2758         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
2759         (mono_compile_assembly): Skip net 2.0 assemblies as well.
2760
2761         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
2762
2763 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
2764
2765         * aot-compiler.c: simplified and refactored the asm-writing code
2766         to allow different backends.
2767
2768 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
2769
2770         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2771
2772         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
2773         little. Share patches of type TYPE_FROM_HANDLE as well.
2774
2775         * mini.c (mono_patch_info_equal): New helper function.
2776         (mono_patch_info_hash): Ditto.
2777
2778         * aot-compiler.c (emit_method_code): Fix s390 build.
2779
2780         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
2781         is not handled because it is stored as a flag and not as a type ctor. Fixes
2782         #79016.
2783
2784 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
2785
2786         * aot-compiler.c: Fix computation of GOT slot statistics.
2787         
2788         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
2789         Also remove support for not PIC AOT.
2790
2791         * mini.h: Bump AOT file format version.
2792
2793         * objects.cs: Add a test for #78990.
2794
2795         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
2796         (peter.dettman@iinet.net.au). Fixes #79087.
2797
2798         * basic-long.cs: Add a test for the above.
2799
2800 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
2801
2802         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
2803         
2804         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
2805         code somewhat.
2806
2807 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
2808
2809         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
2810         exceptions.
2811
2812 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
2813
2814         * mini.c: Don't verify COM proxy invoke calls
2815         
2816
2817 2006-08-10  Dick Porter  <dick@ximian.com>
2818
2819         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
2820         which process is holding semaphores locked.
2821
2822 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
2823
2824         * mini-ia64.c mini-amd64.c: Fix #79027.
2825
2826         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
2827
2828         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
2829
2830         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
2831         implicit arguments in a vararg call. Fixes #79027.
2832
2833 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
2834
2835         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
2836         (mono_get_array_new_va_signature): Ditto.
2837
2838 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
2839
2840         * aot-runtime.c: Call init_plt lazily.
2841
2842         * inssel-long.brg: Fix unsigned long->int conversion.
2843
2844         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
2845
2846         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
2847         that most data is now in the .rss/.data section.
2848
2849 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
2850
2851         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
2852
2853         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
2854
2855         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
2856
2857         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
2858
2859         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
2860         virtual call. Fixes #79010.
2861
2862         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
2863         and use the result as the this argument in the real call.
2864
2865         * generics.2.cs: Add a new test for #79010.
2866         
2867 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
2868
2869         * mini-x86.c: Fix a warning.
2870
2871         * aot-compiler.c: Add a bunch of statistics.
2872
2873         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
2874
2875 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
2876
2877         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
2878
2879 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
2880
2881         * 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>.
2882
2883 2006-07-13  Miguel de Icaza  <miguel@novell.com>
2884
2885         * mini.c (mono_method_to_ir): Obtain the original method in the
2886         CIL stream and use this to perform validation.
2887
2888         Fixed: #78816
2889
2890 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
2891
2892         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
2893         (mono_arch_call_opcode): Ditto.
2894
2895         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
2896         #78826.
2897
2898         * mini.c (mono_patch_info_dup_mp): New helper function.
2899         
2900         * aot-compiler.c (compile_method): Fix some of the memory allocated during
2901         compilation. Fixes #78827.
2902
2903 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
2904
2905         * declsec.c: Use original security informations for
2906           MONO_WRAPPER_MANAGED_TO_MANAGED.
2907
2908 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
2909
2910         * mini.c: Allow Com Interop methods/classes and
2911         don't verify COM wrapper calls
2912         
2913
2914 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
2915
2916         * inssel-long32.brg: Fix long->i4 checked conversion.
2917
2918         * exceptions.cs: Add a test for the above.
2919
2920 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
2921
2922         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
2923
2924         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
2925         leaks.
2926
2927         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
2928         #78775.
2929
2930 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
2931
2932         * mini.c: Fix solaris/x86 exception handling.
2933
2934         * Makefile.am: Get rid of $(ICU_LIBS).
2935
2936 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
2937
2938         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
2939         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
2940         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
2941
2942         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
2943
2944         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
2945         this function causes a SIGSEGV.
2946
2947 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
2948
2949         * mini.c: Remove unused solaris/x86 includes.
2950
2951 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
2952
2953         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
2954
2955 2006-06-20  Jb Evain  <jbevain@gmail.com>
2956
2957         * cpu-g4.md: fix max length of start_handler instruction.
2958
2959 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
2960         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
2961
2962 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
2963         * ssa.c: Fixed bug 78653 for SSA based deadce.
2964         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
2965         MonoInst.flags, used in SSA based deadce.
2966         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
2967         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
2968
2969 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
2970
2971         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
2972         it can end up using non executable memory on ppc64 systems
2973         running ppc32 userspace (fix from Johannes Berg).
2974
2975 2006-06-14  Dick Porter  <dick@ximian.com>
2976
2977         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
2978         4.1.1
2979
2980 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
2981         * mini.c: Made so that inline is locally disabled if it would
2982         trigger a .cctor, because too many apps depend on this behavior
2983         (which seems to be also the one of the MS CLR).
2984
2985 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
2986
2987         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
2988         No idea why this worked before.
2989
2990         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
2991         which branch to outer exception clauses since they could skip the
2992         inner finally clauses. Fixes #78633.
2993
2994         * exceptions.cs: Add a test for the above.
2995
2996         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
2997         Fixes #78629.
2998
2999         * iltests.il: Add a test for the above.
3000
3001 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
3002
3003         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
3004         after the end of a try bblock, to prevent asserts in mini_method_compile ().
3005
3006         * iltests.il: Add a test for the above.
3007
3008 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
3009
3010         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
3011         
3012         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
3013         methods as instrinsics.
3014
3015 2006-06-09  Wade Berrier <wberrier@novell.com>
3016
3017         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
3018         (simple-cee-ops.h ssapre-mini-ops.h)
3019
3020 2006-06-09  Neale Ferguson <neale@sinenomine.net>
3021
3022         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
3023         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
3024         instruction).
3025         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
3026         * cpu-s390x.md: Fix max. length values for a couple of instructions.
3027
3028 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
3029
3030         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
3031
3032 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
3033
3034         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
3035         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
3036         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
3037         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
3038         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
3039         of opcodes, so that bug 78549 should not happen again.
3040         * ssapre.c: Updated to use the renamed files.
3041
3042 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
3043
3044         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
3045         in OP_ATOMIC_EXCHANGE_I4.
3046
3047 2006-06-07  Wade Berrier <wberrier@novell.com>
3048
3049         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
3050         in mono_debugger_create_notification_function)
3051
3052 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
3053
3054         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
3055         
3056         * mini.c (type_from_stack_type): Disable some changes which do not
3057         seem to work.
3058
3059         * driver.c: Reenable opts.
3060
3061         * mini.h (MonoStackSlot): New structure to keep track of the verification state
3062         of the evaluation stack.
3063         
3064         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
3065         evaluation stack trace at entry to the bblock.
3066
3067         * mini.c (merge_stacks): New function to perform verification of stack merges.
3068         Turned off by default.
3069
3070         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
3071         STACK_MP.
3072         
3073 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
3074
3075         * local-propagation.c: Fixed bug 78549.
3076
3077 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
3078
3079         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
3080
3081 2006-06-02  Miguel de Icaza  <miguel@novell.com>
3082
3083         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
3084         tramp-arm.c, tramp-ia64.c
3085         (mono_debugger_create_notification_function): Update signature to
3086         new signature and use new protocol for creating the notification
3087         function.  
3088
3089         Should fix the build.
3090
3091 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
3092
3093         * exceptions-ppc.c (mono_jit_walk_stack)
3094         (ves_icall_get_frame_info): Fix the build
3095
3096 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
3097
3098         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
3099
3100 2006-05-31  Raja R Harinath  <rharinath@novell.com>
3101
3102         * il2tests.2.il: New file for generics CIL tests.  Add test for
3103         #78019.
3104         * Makefile.am: Update.
3105
3106         Fix #78019
3107         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
3108         to nullable types.
3109
3110 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
3111
3112         * aliasing.c: Fixed bug 78311.
3113
3114 2006-05-29  Martin Baulig  <martin@ximian.com>
3115
3116         * mini-exceptions.c (mono_find_jit_info): When computing the
3117         native offset, check whether we're actually inside the method's
3118         code; call mono_debug_print_stack_frame() to format the frame.
3119         (ves_icall_System_Exception_get_trace): Call
3120         mono_debug_print_stack_frame() to format the stack frame.
3121         (ves_icall_get_trace): Update to the new debugging API.
3122         (mono_jit_walk_stack_from_ctx): Likewise.
3123         (ves_icall_get_frame_info): Likewise.
3124
3125         * mini.c (get_method_from_ip): Use the new debugging API.
3126         (mono_print_method_from_ip): Likewise.
3127
3128         * exceptions-ppc.c
3129         (mono_jit_walk_stack): Use the new debugging API.
3130         (ves_icall_get_frame_info): Likewise.   
3131
3132 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
3133
3134         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
3135
3136 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
3137
3138         * mini.c: Added "limitator" to inline for debugging.
3139
3140 2006-05-24  Martin Baulig  <martin@ximian.com>
3141
3142         * debug-debugger.c (mono_debugger_init): Create a private,
3143         malloc()-based code manager for the notification function and
3144         intentionally leak it on exit.  This fixes the crash-on-exit race
3145         condition.
3146
3147         * tramp-amd64.c
3148         (mono_debugger_create_notification_function): Added
3149         `MonoCodeManager *' argument.
3150
3151         * tramp-x86.c
3152         (mono_debugger_create_notification_function): Added
3153         `MonoCodeManager *' argument.
3154
3155 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
3156
3157         * aliasing.c: Fixed 64 bit issue.
3158         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
3159         default since all known bugs are fixed (one more time!).
3160
3161 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
3162
3163         * mini.c: write barrier support.
3164
3165 2006-05-23  Martin Baulig  <martin@ximian.com>
3166
3167         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
3168         check at the top of the file.
3169
3170 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
3171
3172         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
3173         reverting changes without reason and without changelog entries.
3174
3175 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
3176
3177         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
3178         to a few opcodes. Fixes #78439.
3179
3180         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
3181         consistency with other archs.
3182
3183         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
3184
3185 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
3186
3187         * debug-debugger.c: fix the build.
3188
3189 2006-05-17  Martin Baulig  <martin@ximian.com>
3190
3191         * debug-debugger.c
3192         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
3193         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
3194         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
3195         (debugger_attach): Call GC_mono_debugger_add_all_threads().
3196
3197 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
3198
3199         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
3200
3201 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
3202
3203         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
3204         MONO_TYPE_GENERICINST.
3205         
3206         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
3207         MONO_TYPE_GENERICINST.
3208
3209 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
3210
3211         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
3212         #78325.
3213
3214 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
3215
3216         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
3217         mempool.
3218         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
3219
3220 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
3221
3222         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
3223         mono_trace_cleanup ().
3224
3225         * iltests.il: Fix problem with the newly added test.
3226
3227         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
3228         due to register constraints, free up the previous hreg. Fixes #78314.
3229
3230         * iltests.il: Add new test for #78314.  
3231
3232         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
3233         Interlocked.Add. Fixes #78312.
3234
3235         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
3236         
3237 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
3238
3239         * inssel.brg (mini_emit_virtual_call): Fix a warning.
3240
3241 2006-05-05  Martin Baulig  <martin@ximian.com>
3242
3243         * debug-mini.c (mono_debug_open_block): New method.
3244
3245         * mini-amd64.c
3246         (mono_arch_output_basic_block): Call mono_debug_open_block() at
3247         the beginning of each basic block.
3248
3249         * mini-x86.c
3250         (mono_arch_output_basic_block): Call mono_debug_open_block() at
3251         the beginning of each basic block.
3252
3253 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
3254
3255         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
3256         default until I understand why they break the build on amd64.
3257
3258 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
3259
3260         * mini.c (mini_cleanup): Call mono_cleanup ().
3261
3262         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
3263         errors.
3264
3265 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
3266
3267         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
3268         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
3269         default since all known bugs are fixed, and I cannot reproduce bug
3270         77944... I'm asking Matt Hargett to test again after this commit.
3271
3272 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
3273
3274         * mini-codegen.c: Fixed typo that thrashed inline.
3275
3276 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
3277
3278         * dominators.c (compute_dominators): Avoid using a worklist since
3279         it is not correct in some cases. Instead, iterate over all bblocks as
3280         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
3281
3282 2006-04-28  Miguel de Icaza  <miguel@novell.com>
3283
3284         * mini.c (mono_jit_compile_method_inner): Use
3285         mono_prepare_exception_from_error that resets the value
3286         internally.
3287
3288 2006-04-27  Miguel de Icaza  <miguel@novell.com>
3289
3290         * mini.c: Move the mini_loader_error_to_exception to metadata. 
3291         
3292 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
3293
3294         * aliasing.c: Fixed bug 78210.
3295
3296 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
3297
3298         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
3299         default until all their problems (or the ones they trigger) are fixed.
3300
3301 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
3302
3303         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
3304         
3305         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
3306         as loaded only after resolving patches since that could invoke the same method.
3307
3308         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
3309
3310         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
3311         functions.
3312
3313         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
3314         AOT loader.
3315
3316         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
3317         stack.
3318
3319         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
3320         made from AOT code through the PLT table.
3321
3322         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
3323         holding the plt offset when a call is made to the aot plt trampoline.
3324         
3325 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
3326
3327         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
3328         amd64 AOT support.
3329
3330         * Makefile.am (common_sources): Fix build breakage.
3331
3332         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
3333         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
3334         intra-assembly calls if possible.
3335         
3336         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
3337
3338         * mini-trampolines.c: Handle PLT entries.
3339
3340         * mini.c: Avoid creating a GOT var for calls.
3341
3342         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
3343         from mscorlib code.
3344
3345         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
3346         from mscorlib code.
3347
3348         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
3349         AOT code.       
3350
3351         * mini.h: Bump AOT file format version.
3352         
3353         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
3354         covers more cases.
3355
3356 2006-04-25  Martin Baulig  <martin@ximian.com>
3357
3358         * driver.c: Disable copyprop, consprop and inline when running
3359         inside the debugger.
3360
3361 2006-04-25  Martin Baulig  <martin@ximian.com>
3362
3363         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
3364         with `get_current_thread' and added `detach'.
3365         (MonoDebuggerMetadataInfo): Added `thread_size',
3366         `thread_tid_offset', `thread_stack_ptr_offset' and
3367         `thread_end_stack_offset'.
3368
3369 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
3370
3371         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
3372         aot-runtime.c.
3373
3374         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
3375         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
3376
3377         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
3378
3379         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
3380
3381         * aot.c: Add support for ADJUSTED_IID.  
3382
3383 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
3384
3385         * aot.c (emit_method_order): Don't align method_order_end.
3386
3387         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
3388         the interface ID changes.
3389
3390 2006-04-21  Dick Porter  <dick@ximian.com>
3391
3392         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
3393         cleaning up a thread.  Fixes the new part of bug 77470.
3394
3395 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
3396
3397         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
3398         to managed wrapper.
3399                      
3400 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
3401
3402         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
3403         
3404         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
3405         SIGSEGV. Fixes #78072.
3406
3407         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
3408         unregister our SIGABRT handler.
3409
3410 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
3411
3412         * mini.c: Disabled inline where it can alter the call stack in a
3413         way visible from managed code.
3414         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
3415         default.
3416
3417 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
3418
3419         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
3420         on other platforms. Fixes #78089.
3421
3422 2006-04-13  Martin Baulig  <martin@ximian.com>
3423
3424         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
3425         determine whether we're inside the debugger.
3426
3427         * debug-debugger.h
3428         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
3429
3430 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
3431
3432         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
3433         handler clauses. Fixes #78024.
3434
3435         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
3436         in the CALL_MEMBASE opcodes. Fixes #78088.
3437         (mono_arch_get_vcall_slot_addr): Ditto.
3438
3439 2006-04-10  Martin Baulig  <martin@ximian.com>
3440
3441         * debug-debugger.c: The thread handling code has now been moved
3442         into ../metadata/threads.c.
3443
3444 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
3445
3446         * driver.c (mono_main): Fix --with-gc=none build.
3447
3448         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
3449         (mono_spillvar_offset_float): Ditto.
3450         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
3451         hreg, not when its !global, since on ia64, there is a third category: stacked
3452         registers.      
3453
3454 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
3455
3456         * mini.c: set MonoInst->klass for load field address and a few other
3457         places.
3458
3459 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
3460
3461         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
3462
3463 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
3464
3465         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
3466         the branch opt changes.
3467
3468 2006-04-06  Dick Porter  <dick@ximian.com>
3469
3470         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
3471         
3472         * wapihandles.c (mini_wapi_seminfo): 
3473         * driver.c (mono_main): Add semaphore info option
3474
3475 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
3476
3477         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
3478         branch optimization changes. Fixes #78009.
3479
3480 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
3481
3482         * mini.c: ignore accessibility of methods in managed->native wrappers.
3483
3484 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
3485
3486         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
3487         
3488         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
3489
3490 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
3491
3492         * mini.c: Modify the branch optimizations to preserve the invariant that
3493         the entries inside the in_bb and out_bb arrays are unique.
3494         (mono_unlink_bblock): Avoid creation of new arrays.
3495
3496 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
3497
3498         * mini.c (mono_unlink_bblock): Fix regression caused by previous
3499         change (#77992).
3500
3501 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
3502
3503         * mini.c (optimize_branches): Remove the "optimizations" in
3504         the cbranch1/cbranch2 -> branch cases which were causing several
3505         problems in the past. Fixes #77986.
3506
3507 2006-03-31  Chris Toshok  <toshok@ximian.com>
3508
3509         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
3510         default optimizations :(
3511
3512 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
3513
3514         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
3515         branch.
3516
3517 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
3518
3519         * local-propagation.c: Added comments to structs and removed
3520         "Mono" prefixes from local tree mover types.
3521
3522 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
3523
3524         * Makefile.am (arch_sources): Define this for each architecture so 
3525         libmono_la_SOURCES is defined in one place.
3526
3527 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
3528
3529         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
3530         from handles/.
3531
3532 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
3533
3534         * driver.c: print the GC name supplied by configure.
3535
3536 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
3537
3538         * local-propagation.c: Added tree mover, and moved here all the
3539         local propagation code from mini.c
3540         * mini.c: Added support for treeprop, and moved all the local
3541         propagation code to local-propagation.c
3542         * mini.h: Added support for treeprop
3543         * driver.c: Added support for treeprop, enabled consprop, copyprop,
3544         treeprop, inline and deadce by default
3545         * Makefile.am: Added local-propagation.c
3546
3547 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
3548
3549         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
3550
3551 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
3552
3553         * debug-debugger.c: make it compile without the Boehm GC.
3554
3555 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
3556
3557         * mini.c: fixed issue with mismatch when an icall is registered
3558         with multiple names but same address.
3559
3560 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
3561
3562         * declsec.c, mini-exceptions.c: use write barrier to set reference
3563         fields of managed objects.
3564
3565 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
3566
3567         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
3568         (can_access_internals): Fix a warning.
3569
3570         * mini.c (print_method_from_ip): Rename this to 
3571         mono_print_method_from_ip so it gets exported.
3572
3573         * trace.c: Deal with strings inside StringBuilder's containing garbage
3574         and fix memory leaks. Fixes #77848.
3575
3576 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
3577
3578         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
3579         fixes #77787.
3580
3581 2006-03-16 Neale Ferguson <neale@sinenomine.net>
3582         
3583         * mini-s390.c: Remove OP_X86_TEST_NULL.
3584
3585 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
3586
3587         * mini.c: use the correct GetHashCode() for the moving collector.
3588
3589 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
3590
3591         * liveness.c: Regalloc spill cost tuning.
3592
3593 2006-03-15 Neale Ferguson <neale@sinenomine.net>
3594         
3595         * mini-s390x.h: Correct S390_LONG macro.
3596
3597         * mini-s390x.c: Cleanup unused code.
3598
3599 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
3600
3601         * jit-icalls.h: New file.
3602
3603         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
3604         icalls and include that instead of including jit-icalls.c.
3605
3606         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
3607         OP_X86 opcodes.
3608
3609 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
3610
3611         * mini.c: when checking for member accessibility, also check for
3612         friend assemblies and for explicit interface implementations.
3613
3614 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
3615
3616         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
3617
3618         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
3619
3620         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
3621         common cases are done first.    
3622
3623         * mini-ops.h: Only define platform specific opcodes on the given platform.
3624
3625         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
3626         branch.
3627         
3628 2006-03-14  Martin Baulig  <martin@ximian.com>
3629
3630         Revert Paolo's change from r57348:
3631
3632         * mini.h: don't use gboolean for bitfields.
3633         * mini.c: verifier changes for fields and methods accessibility.
3634
3635 2006-03-13  Neale Ferguson <neale@sinenomine.net>
3636
3637         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
3638
3639         * mini-s390x.c: Fix conv_r_un.
3640
3641         * cpu-s390, cpu-s390x.md: Fix lengths.
3642
3643 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
3644
3645         * mini.c: nested types have access to all the nesting
3646         levels, not just the enclosing types.
3647
3648 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
3649
3650         * mini.c: added a few more verification checks.
3651
3652 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
3653
3654         * liveness.c: Merge optimizations from the linear-il branch.
3655
3656 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
3657
3658         * mini-ia64.c (emit_call): Add a comment.
3659
3660         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
3661
3662         * tramp-ia64.c: Fix some warnings.
3663
3664 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
3665
3666         * mini.h: don't use gboolean for bitfields.
3667         * mini.c: verifier changes for fields and methods accessibility.
3668
3669 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
3670
3671         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
3672         lazy icall wrapper changes.
3673
3674         * dominators.c: Replace all the dominator algorithms with faster
3675         ones from the linear-il branch.
3676
3677         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
3678         the mempool.
3679
3680         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
3681         common cases are done first.
3682
3683         * mini-amd64.c: Fix some warnings.
3684
3685         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
3686         from the mempool.
3687
3688         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
3689         added code.
3690
3691         * mini.h: Add a missing prototype.
3692
3693 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
3694
3695         * mini.c: Compile icall wrappers lazily.
3696
3697         * mini-codegen.c: Use printf instead of g_print since its much faster.
3698
3699         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
3700         function.
3701
3702         * mini.c (optimize_branches): Cache the negative result from 
3703         remove_block_if_useless ().
3704
3705         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
3706         Also fix some bblock linking issues.
3707
3708         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
3709         assembly files.
3710
3711         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
3712
3713         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
3714         accessed fields first, for better cache behavior.
3715         
3716 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
3717
3718         * mini.c: speedup IList<T> array accesses.
3719
3720 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
3721
3722         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
3723         inline_costs counter. Fixes #77190.
3724
3725 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
3726
3727         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
3728         trace messages. Fixes #77706.
3729
3730 2006-03-04  Martin Baulig  <martin@ximian.com>
3731
3732         * tramp-amd64.c, tramp-x86.c
3733         (mono_debugger_create_notification_function): Use
3734         mono_global_codeman_reserve() to allocate a buffer at runtime and
3735         return it.
3736
3737         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
3738
3739         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
3740         notification function at runtime and then call `initialize' in the
3741         `MONO_DEBUGGER__debugger_info' vtable.
3742
3743 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
3744
3745         * iltests.il: Fix a visibility problem.
3746
3747 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
3748
3749         * driver.c, mini.c: add hooks for the counters API.
3750
3751 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
3752
3753         * driver.c: show disabled options.
3754
3755 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
3756
3757         * linear-scan.c: always use cost-driven selection.
3758
3759 2006-02-28  Raja R Harinath  <rharinath@novell.com>
3760
3761         * jit-icalls.c (helper_compile_generic_method): Revert change from
3762         2006-02-24.
3763
3764 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
3765
3766         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
3767
3768 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
3769
3770         * inssel.brg: style fixes, mostly to force the updated monoburg
3771         to run for people using svn.
3772
3773 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
3774
3775         * mini.c: match monoburg changes.
3776
3777 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
3778
3779         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
3780         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
3781         declaration in the header file.
3782
3783 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
3784
3785         * helpers.c: reduce relocations and mem usage.
3786
3787 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
3788
3789         * mini.h, mini-codegen.c: disable logging features if
3790         requested by configure.
3791
3792 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
3793
3794         * mini.c: tiny verifier changes.
3795
3796 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
3797
3798         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
3799         cpu-pentium.md: stack alignment changes for osx/x86,
3800         partially from Geoff Norton <gnorton@customerdna.com>.
3801
3802 2006-02-24  Raja R Harinath  <harinath@gmail.com>
3803
3804         * jit-icalls.c (helper_compile_generic_method): Update to changes
3805         in metadata/class.c.
3806
3807 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
3808         
3809         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
3810         
3811         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
3812         interface calls with large offsets.
3813
3814 2006-02-23  Raja R Harinath  <rharinath@novell.com>
3815
3816         * jit-icalls.c (helper_compile_generic_method): Document the
3817         special-case we depend on so that we can inflate the method twice
3818         with the same context with no bad side-effects.
3819
3820 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
3821
3822         * mini-x86.c, mini-amd64.c: fix for case when xen support
3823         is disabled.
3824
3825 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
3826
3827         * mini-x86.c, mini-amd64.c: generate code to access tls items
3828         in a faster way for Xen systems.
3829
3830 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
3831
3832         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
3833         updates and compilation fixes for the OSX/x86 port, mostly from
3834         Geoff Norton <gnorton@customerdna.com>.
3835
3836 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
3837
3838         * inssel.brg: faster interface call implementation
3839         to sync with the interface_offsets MonoVTable changes.
3840
3841 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
3842
3843         * mini.c: more verification checks.
3844
3845 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
3846
3847         * mini.c: added a few more verification checks.
3848
3849 2006-02-17      Neale Ferguson <neale@sinenomine.net>
3850
3851         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
3852         facility on the processor and use it if available.
3853
3854 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
3855
3856         * driver.c, aot.c, mini.c: throw exception if the IL code is
3857         invalid or unverifiable.
3858
3859 2006-02-17  Raja R Harinath  <rharinath@novell.com>
3860
3861         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
3862         m.StructField.
3863
3864 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
3865
3866         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
3867
3868 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
3869
3870         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
3871         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
3872         handling of instantiated generic valuetypes.
3873
3874 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
3875
3876         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
3877         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
3878         instead.
3879
3880         * generics.2.cs: Revert the nullable reftypes tests.
3881
3882 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
3883
3884         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
3885         using __builtin_frame_address (1) as it doesn't work in the presence
3886         of optimizations. Hopefully fixes #77273.
3887
3888         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
3889         -> generics.cs change as it doesn't work with some automake versions.
3890
3891 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
3892
3893         * mini.c: handle systems that sue a different way to
3894         retrieve the stack address of the current thread.
3895
3896 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
3897
3898         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
3899         it specially in the makefile.
3900
3901         * generics.2.cs: Add tests for nullable reference types.
3902
3903 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
3904
3905         * mini.c: always handle the case when mono_jit_init()
3906         is called in a thread different from the main thread,
3907         confusing libgc (bug #77309).
3908
3909 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
3910
3911         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
3912
3913 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
3914
3915         * mini.c: change optimize_branches () to use a single loop
3916         and introduce a new optimization to simplify some range checks.
3917
3918 2006-02-03  Martin Baulig  <martin@ximian.com>
3919
3920         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
3921         and merged with debugger_thread_manager_add_thread().
3922         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
3923         inform the debugger about the main thread.
3924
3925 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
3926
3927         * basic.cs: Add test for div.un/rem.un constant folding.
3928
3929 2006-02-03  Neale Ferguson <neale@sinenomine.net>
3930
3931         * cpu-s390x.md: correct int_xor_imm length
3932
3933 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
3934
3935         * generics.2.cs: New test for #77442.
3936
3937         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
3938         #77442.
3939
3940 2006-02-02  Martin Baulig  <martin@ximian.com>
3941
3942         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
3943         <mono/metadata/mono-debug-debugger.h>   
3944
3945         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
3946
3947 2006-02-02  Martin Baulig  <martin@ximian.com>
3948
3949         * debug-debugger.h: New header file for debug-debugger.c.
3950
3951         * debug-debugger.c: Big API cleanup; don't run the managed Main()
3952         function is a separate thread anymore; add support for attaching.
3953
3954 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
3955
3956         * tramp-x86.c: Fix a warning.
3957
3958 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
3959
3960         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
3961         on very large methods.
3962
3963         * aot.c (load_patch_info): Fix a warning.
3964
3965 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
3966
3967         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
3968         mini-ops.h: alu membase optimizations.
3969
3970 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
3971
3972         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
3973         to speedup StringBuilder.
3974
3975 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
3976
3977         * dominators.c (mono_compute_natural_loops): Fix detection of
3978         loop body start blocks.
3979
3980         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
3981
3982 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
3983
3984         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
3985         #75145.
3986
3987 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
3988
3989         * aliasing.c: Fixed aliasing issue on 64 bit archs.
3990
3991 2006-01-25  Martin Baulig  <martin@ximian.com>
3992
3993         * debug-debugger.c: Moved the `MonoDebuggerManager' and
3994         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
3995         started to cleanup this file a little bit.
3996
3997 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
3998
3999         * mini.c: optimize a codepath frequently happening in generics code.
4000
4001 2006-01-23  Martin Baulig  <martin@ximian.com>
4002
4003         * Makefile.am: Only compile debug-debugger.c on supported platforms.
4004
4005         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
4006         functions directly.
4007
4008         * driver.c: debug-debugger.c is only available if
4009         `MONO_DEBUGGER_SUPPORTED' is defined.   
4010
4011 2006-01-23  Martin Baulig  <martin@ximian.com>
4012
4013         * debug-debugger.c: Only enable this on platforms where the Mono
4014         Debugger is working (x86 and x86_64).
4015
4016 2006-01-21  Martin Baulig  <martin@ximian.com>
4017
4018         The Mono Debugger is now using the normal `mono' instead of the
4019         `mono-debugger-mini-wrapper' when executing managed code.
4020
4021         * debug-debugger.c: New file; previously known as
4022         debugger/wrapper/wrapper.c.
4023
4024         * debug-mini.c (mono_init_debugger): Removed.
4025
4026         * driver.c (mono_main): Added new `--inside-mdb' command line
4027         argument which is used when running inside the debugger.
4028
4029 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
4030
4031         * liveness.c (mono_analyze_liveness): Remove some unused data
4032         structures.
4033
4034 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
4035
4036         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
4037
4038 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
4039
4040         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
4041         depends on implementation details of monobitset.
4042
4043         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
4044         Fixes #77271.
4045
4046 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
4047
4048         * liveness.c: Update after monobitset changes.
4049
4050 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
4051
4052         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
4053
4054 2006-01-11 Neale Ferguson <neale@sinenomine.net>
4055
4056         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
4057
4058         * mini-s390x.c: Remove warning messages.
4059
4060 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
4061
4062         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
4063
4064 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
4065
4066         * generics.2.cs: Add ldelem/stelem_any test.
4067
4068 2006-01-10 Neale Ferguson <neale@sinenomine.net>
4069
4070         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
4071
4072 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
4073
4074         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
4075         
4076 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
4077
4078         * generics.2.cs: Reenable vtype tests.
4079
4080         * inssel-x86.brg: Remove an icorrect valuetype rule.
4081
4082 2006-01-06 Neale Ferguson <neale@sinenomine.net>
4083
4084         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
4085         initial support for OP_ABS.
4086
4087 2006-01-05 Neale Ferguson <neale@sinenomine.net>
4088
4089         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
4090
4091 2006-01-05 Neale Ferguson <neale@sinenomine.net>
4092
4093         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
4094         conversion and implement LADD/LSUB.
4095
4096         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
4097         architectures.
4098
4099 2006-01-05 Neale Ferguson <neale@sinenomine.net>
4100
4101         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
4102
4103         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
4104         architectures.
4105
4106 2006-01-05 Neale Ferguson <neale@sinenomine.net>
4107
4108         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
4109         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
4110         (stack walk problem).
4111
4112 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
4113
4114         * aot.c (mono_aot_load_method): Fix a warning.
4115
4116 2006-01-03  Neale Ferguson <neale@sinenomine.net>
4117
4118         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
4119
4120 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
4121
4122         * iltests.il: Add test for #77148.
4123
4124         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
4125         #77148.
4126
4127 2006-01-03  Neale Ferguson <neale@sinenomine.net>
4128
4129         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
4130
4131 2006-01-03  Neale Ferguson <neale@sinenomine.net>
4132
4133         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
4134         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
4135
4136         * basic-long.cs: Add lconv-to-r4/r8 tests.
4137
4138 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
4139
4140         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
4141
4142         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
4143         here as on other archs.
4144
4145 2005-12-29 Neale Ferguson <neale@sinenomine.net>
4146
4147         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
4148
4149 2005-12-29 Neale Ferguson <neale@sinenomine.net>
4150
4151         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
4152         
4153         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
4154
4155         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
4156         instrument_prolog; Add memory_barrier instruction.
4157
4158 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
4159
4160         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
4161
4162 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
4163
4164         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
4165
4166         * aliasing.c inssel.brg: Fix warnings.
4167
4168         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
4169         could skip initialization of some parts of memory.
4170
4171         * mini.c mini-ia64.c: Fix warnings.
4172
4173         * inssel-sparc.brg: Add an implementation of lneg which actually works.
4174
4175 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
4176
4177         * aliasing.c (mono_build_aliasing_information): Add a workaround for
4178         a crash seen on sparc.
4179
4180         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
4181         
4182         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
4183
4184 2005-12-21 Neale Ferguson <neale@sinenomine.net>
4185
4186         * mini-ops.h: Add s390_backchain instruction
4187
4188         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
4189
4190         * cpu-s390.md: Add s390_backchain instruction
4191
4192         * mini-s390.c: Significant ABI changes
4193
4194         * mini-s390.h: Cater for zero length structures
4195
4196 2005-12-20 Neale Ferguson <neale@sinenomine.net>
4197
4198         * mini-s390.c: ABI fixes
4199
4200         * inssel-s390.brg: Remove debug statements
4201
4202         * cpu-s390.md: Fix length of ATOMIC_xx operations
4203
4204 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
4205
4206         * basic-float.cs: Add float<->long conversion tests.
4207
4208 2005-12-16 Neale Ferguson <neale@sinenomine.net>
4209
4210         * mini-s390.c: Fix LOCALLOC processing.
4211
4212         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
4213
4214 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
4215
4216         * iltests.il: Add tests for some opcodes not covered by the other
4217         tests.
4218
4219 2005-12-15 Neale Ferguson <neale@sinenomine.net>
4220
4221         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
4222         register loading for Tail processing; Correct trace output.
4223
4224         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
4225
4226         * cpu-s390.md: Correct size of jmp instruction. 
4227
4228 2005-12-13 Neale Ferguson <neale@sinenomine.net>
4229
4230         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
4231
4232 2005-12-13 Neale Ferguson <neale@sinenomine.net>
4233
4234         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
4235           Bring s390 up to current level.
4236
4237 2005-12-12  Zltan Varga  <vargaz@gmail.com>
4238
4239         * generics.2.cs: Disable the newly added tests as they do not work yet.
4240         
4241         * generics.2.cs: Add valuetype tests.
4242
4243 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
4244
4245         * basic-long.cs: Add i4->u8 test.
4246
4247         * objects.cs: Add tests for JIT intrinsic.
4248
4249         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
4250         optimizations lost by a mistake.
4251
4252 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
4253
4254         * basic-long.cs: Remove a test moved to objects.cs.
4255
4256         * arrays.cs: Add more array tests.
4257
4258 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
4259
4260         * arrays.cs: Add new tests for multi-dimensional arrays.
4261
4262 2005-12-06  Raja R Harinath  <rharinath@novell.com>
4263
4264         * Makefile.am (test_sources2): Add generics.2.cs.
4265         (EXTRA_DIST): Add test_sources2.
4266
4267 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
4268
4269         Support for boxing and unboxing nullable types as well as the
4270         isinst operation on nullables, per the CLI ammendment.
4271
4272         * inssel.brg (CEE_ISINST): Special case for nullable
4273
4274         * mini.c (handle_unbox_nullable): new method
4275         (handle_box): Special case for nullable types
4276         (mono_method_to_ir): Call handle_unbox_nullable in correct
4277         places.
4278
4279         * generics.2.cs: New test suite
4280
4281         * Makefile.am: Support for regression tests with generics.
4282
4283 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
4284
4285         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
4286         allocated to registers. Fixes #76800.
4287
4288 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
4289
4290         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
4291
4292 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
4293
4294         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
4295         of platforms.
4296
4297 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
4298
4299         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
4300         objects.cs.
4301
4302         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
4303         
4304         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
4305 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
4306
4307         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
4308         single precision before storing to a single precision location.
4309
4310 2005-11-28  Raja R Harinath  <rharinath@novell.com>
4311
4312         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
4313
4314 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
4315
4316         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
4317         correct files.
4318
4319         * basic.cs: Remove test_0_byte_compares test which was moved to
4320         objects.cs a long time ago.
4321
4322 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
4323
4324         * aliasing.c: Fixed aliasing issue on 64 bit archs.
4325
4326 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
4327
4328         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
4329         handlers are called.
4330
4331         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
4332         throwing code.
4333
4334          * mini-ia64.c: Add support for the throw->branch exception 
4335         optimization.   
4336
4337         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
4338
4339 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
4340
4341         * mini.c: Enabled "fastpath" deadce :-)
4342         
4343 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
4344
4345         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
4346         alias analysis pass to support it.
4347         * mini.h: Likewise.
4348         * ssa.c: Likewise.
4349         * liveness.c: Likewise (liveness computation can use aliasing
4350         information to be more accurate).
4351         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
4352         moreover made so that "--compile-all" uses the given optimization
4353         flags and not the default ones.
4354         * aliasing.c: Alias analysis (new file).
4355         * aliasing.h: Likewise.
4356         * Makefile.am: added "aliasing.c" and "aliasing.h".
4357         
4358 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
4359
4360         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
4361         OP_L opcodes.
4362
4363 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
4364
4365         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
4366         fp >= end_of_stack exit condition, as it is not needed, and it might
4367         become true for fp eliminated frames.
4368
4369 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
4370
4371         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
4372         coded offsets.
4373
4374 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
4375
4376         * mini-arm.c: fixed alignment of doubles/longs to match
4377         the C ABI (bug #76635).
4378
4379 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
4380
4381         * aot.c: fix compilation with --enable-minimal=aot.
4382
4383 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
4384
4385         * mini-arm.c: fixed compatibility with the new
4386         floating point emulator package for compares.
4387
4388 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
4389
4390         * mini.c : reverted sig->pinvoke changes (r51396-51397).
4391
4392 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
4393
4394         * mini-exceptions.c (print_stack_frame): Output to stderr.
4395         (mono_handle_native_sigsegv): Ditto.
4396
4397 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
4398
4399         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
4400         OP_LCONV_TO_OVF_I implementation.
4401
4402         * mini-amd64.c: Add support for the throw->branch exception 
4403         optimization.
4404
4405         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
4406         when the catch clause catches a more general exception, i.e. Object.
4407
4408 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
4409
4410         * cpu-ia64.md: Remove unused opcodes.
4411
4412         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
4413         specific defines for architectures defining USE_SIGACTION.
4414
4415         * mini-ia64.c: Fix some warnings.
4416
4417         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
4418         version seemed to skip a frame.
4419
4420 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
4421
4422         * mini.c: Clean up the usage of sig->pinvoke flag. Now
4423         only calls which are made to native code use this flag.
4424
4425 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
4426
4427         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
4428         varargs methods as well.
4429         
4430         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
4431         which have save_lmf set. Reorganize methods prologs a bit.
4432
4433         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
4434         debugger to the proper place.
4435
4436 2005-10-29  Martin Baulig  <martin@ximian.com>
4437
4438         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
4439         when running inside the debugger until the debugger has support
4440         for it.
4441
4442 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
4443
4444         * mini.h: Fix a warning.
4445
4446 2005-10-24  Miguel de Icaza  <miguel@novell.com>
4447
4448         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
4449         we expose publicly, this returns the string.
4450
4451 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
4452
4453         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
4454         with fp elimination.
4455
4456 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
4457
4458         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
4459         native stacktrace using the glibc 'backtrace' function if available.
4460
4461 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
4462
4463         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
4464
4465         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
4466         handle SIGSEGVs received while in native code.
4467
4468         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
4469         code, call mono_handle_native_sigsegv which will abort the runtime
4470         after printing some diagnostics, instead of converting it into a
4471         confusing NullReferenceException.
4472
4473 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
4474
4475         * cpu-pentium.md: Remove unused opcodes.
4476
4477 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
4478
4479         * mini-amd64.h (MonoLMF): Add rsp field.
4480
4481         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
4482         the lmf too.
4483
4484 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
4485
4486         * mini-codegen.c (get_register_spilling): Fix some warnings.
4487
4488 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
4489
4490         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
4491         elimination during exception handling. Enable fp elimination by
4492         default.
4493
4494         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
4495         elimination.
4496
4497 2005-10-16  Martin Baulig  <martin@ximian.com>
4498
4499         * mini-exceptions.c
4500         (mono_debugger_run_finally): New public method for the debugger.
4501
4502 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
4503
4504         * debug-mini.c (mono_debug_init_method): Fix warning.
4505
4506         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
4507         the 'exname' parameter const to fix some warnings.
4508
4509 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
4510
4511         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
4512         introduced by the previous patch.
4513
4514 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
4515
4516         * basic-float.cs: Add test for precision of float arithmetic.
4517
4518         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
4519         when loading/storing single values from/to memory.
4520
4521         * mini.c (mono_jit_compile_method_with_opt): Create the function
4522         pointers in the correct domain.
4523
4524 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
4525
4526         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
4527         introduced by previous patch.
4528         
4529         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
4530         when out_filter_idx is NULL.
4531
4532         * mini-exceptions.c: Don't run filter clauses twice during exception
4533         handling. Fixes #75755.
4534
4535 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
4536
4537         * aot.c: Add support for ldflda wrappers.
4538
4539         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
4540         #75902.
4541
4542 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
4543
4544         * mini.c, mini.h: do not consider exception handlers blocks when
4545         setting up interface variables.
4546
4547 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
4548
4549         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
4550
4551 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
4552
4553         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
4554         causes a regression.
4555
4556         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
4557
4558 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
4559
4560         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
4561         of the OP_P definitions.
4562
4563         * TODO: Add a proposal for dealing with the CEE/OP mess.
4564
4565         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
4566         optimizations from the x86 port.
4567
4568         * cpu-amd64.md: Ditto.
4569
4570         * basic.cs basic-long.cs: Add tests.
4571
4572 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
4573
4574         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
4575         Patrik Torstensson's implementation of my exception-handling
4576         optimization idea, when the exception object is not used
4577         (bug #62150).
4578
4579 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
4580
4581         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
4582         of the mul_imm optimizations from the old jit.
4583
4584 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
4585
4586         * mini.c, liveness.c: patch by Patrik Torstensson and
4587         Zoltan Varga to improve performance in methods with
4588         exception clauses.
4589
4590 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
4591
4592         * driver.c: Remove 'Globalization' entry from --version.
4593
4594 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
4595
4596         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
4597         there is a profiler interested in JIT events.
4598
4599         * aot.c: Load profile files produced by the AOT profiling module, and
4600         reorder methods based on the profiling info. Add a 'method_order' table
4601         to the AOT file to make mono_aot_find_jit_info work with the reordered
4602         methods.
4603
4604         * mini.h: Bump AOT file version info.
4605
4606 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
4607
4608         * mini-arm.h: work around what looks like a gcc bug when optimizations
4609         are enabled.
4610
4611 2005-09-28  Raja R Harinath  <rharinath@novell.com>
4612
4613         * Makefile.am (AM_CFLAGS): Don't use += to append inside
4614         conditionals.  Use ...
4615         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
4616
4617 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
4618
4619         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
4620         to determine the amount of memory to copy when passing valuetypes.
4621
4622         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
4623         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
4624
4625 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
4626
4627         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
4628         information about aot.
4629
4630 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
4631
4632         * *.c: Replace the use of {Enter,Leave}CriticalSection with
4633         macros. This will allow a deadlock debugger to easily be plugged
4634         in.
4635
4636 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
4637
4638         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
4639
4640 2005-09-27  Raja R Harinath  <rharinath@novell.com>
4641
4642         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
4643         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
4644         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
4645         ($(arch_built)) [CROSS_COMPILING]: Error out.
4646
4647 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
4648
4649         * aot.c: Add support for the no_special_static flag for classes.
4650
4651 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
4652
4653         * Reapply reverted patches.
4654
4655         * *: Revert r50174 as well.
4656
4657         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
4658
4659 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
4660
4661         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
4662
4663 2005-09-23  Miguel de Icaza  <miguel@novell.com>
4664
4665         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
4666         part of the SIG_HANDLER_SIGNATURE.  
4667
4668 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
4669
4670         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
4671         statistics.
4672
4673         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
4674         introduced by previous patch.
4675
4676 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
4677
4678         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
4679         saved registers too.
4680
4681         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
4682         upon the information returned by get_call_info ().
4683         
4684         * mini-x86.c (add_float): Fix stack size calculation.
4685         (mono_arch_call_opcode): Rewrite this so it works based up the
4686         information returned by get_call_info ().
4687         (mono_arch_get_this_vret_args): Ditto.
4688
4689 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
4690
4691         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
4692         in cinfo to determine the registers which need to be used.
4693
4694 2005-09-20  Miguel de Icaza  <miguel@novell.com>
4695
4696         * driver.c (mono_main): Add --server and --desktop flags. 
4697
4698 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
4699
4700         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
4701         registers as global registers.
4702
4703         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
4704         longer needed with the new register allocator.
4705
4706         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
4707
4708         * cpu-ia64.md: Remove unused opcodes.
4709         
4710         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
4711         
4712 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
4713
4714         * cpu-amd64.md: Remove unused opcodes.
4715
4716         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
4717         needed with the new register allocator.
4718
4719         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
4720         reg-reg moves.
4721
4722 2005-09-16  Raja R Harinath  <rharinath@novell.com>
4723
4724         * Makefile.am (check-local): Don't invoke semdel-wrapper.
4725
4726 2005-09-16  Martin Baulig  <martin@ximian.com>
4727
4728         * exceptions-amd64.c
4729         (throw_exception): Don't call mono_debugger_throw_exception() if
4730         we're a rethrow - see the FIXME in the code.
4731
4732 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
4733
4734         * mini.c (mono_init_exceptions): This only works on some architectures.
4735         
4736 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
4737
4738         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
4739         on ia64.
4740
4741         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
4742
4743         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
4744         now in mini-exceptions.c.
4745
4746 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
4747
4748         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
4749         now in mini-exceptions.c.
4750
4751 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
4752
4753         * exceptions-x86.c: Applied patch from Patrik Torstensson 
4754         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
4755
4756         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
4757         code into mini-exceptions.c. Add some assertions to it.
4758
4759 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
4760
4761         * aot.c (emit_section_change): Applied patch from "The Software Team" 
4762         (<software@solmersa.com>). Fix as errors on windows.
4763
4764 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
4765
4766         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
4767         method info into the LMF.
4768
4769 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
4770         
4771         * mini-ia64.c: Add proper unwind info for method epilogs.
4772
4773         * exceptions-ia64.c: Add some code to help debugging.
4774         
4775         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
4776
4777         * mini-exceptions.c: Fix warning.
4778
4779 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
4780
4781         * mini.c: Really fix build.
4782
4783         * mini-x86.c mini-amd64.c: Fix build.
4784
4785 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
4786
4787         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
4788
4789         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
4790         some Interlocked methods as intrinsics.
4791
4792         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
4793         for Thread methods as well.
4794
4795         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
4796
4797         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
4798
4799         * mini-ia64.c mini-x86.c mini-amd64.c 
4800         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
4801         OP_MEMORY_BARRIER.
4802         
4803         * mini.c (mono_init_exceptions): Fix build breakage.
4804
4805 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
4806
4807         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
4808         of instructions. Use the new ia64_unw_op macros for emitting unwind
4809         info.
4810
4811         * mini.c (mono_init_exceptions): Initialize exception handling
4812         related trampolines at startup.
4813
4814 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
4815
4816         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
4817
4818 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
4819
4820         * mini.c: Handle type loading errors gracefully during compilation and
4821         throw the appropriate exception.
4822
4823 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
4824
4825         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
4826         for the mono binary.
4827
4828 2005-09-09  Martin Baulig  <martin@ximian.com>
4829
4830         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
4831         the release.
4832
4833 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
4834
4835         * mini-arm.h: use emulation for conv.r.un for the release.
4836
4837 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
4838
4839         * mini-arm.c, objects.cs: more fixes and tests for them.
4840
4841 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
4842
4843         * mini-arm.c: align structures to at least 4 bytes to be able
4844         to keep our current optimized memcpy.
4845
4846 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
4847
4848         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
4849
4850 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4851
4852         * mini.c: ignore SIGPIPE.
4853
4854 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
4855
4856         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
4857
4858         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
4859
4860 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
4861
4862         * mini.h: Add prototype for mono_allocate_stack_slots_full.
4863
4864 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
4865
4866         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
4867         exception handling support.
4868         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
4869         patch by Brian Koropoff <briank@marakicorp.com>).
4870
4871 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
4872
4873         * mini.c: revert another 'optimization' which breaks when
4874         items on the eval stack need to be saved at a basic block end
4875         (bug #75940).
4876
4877 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
4878
4879         * jit-icalls.c: for arrays, ensure we always provide
4880         lower bounds.
4881
4882 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
4883
4884         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
4885         
4886         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
4887
4888 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
4889
4890         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
4891         arguments in their original register.
4892
4893 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
4894
4895         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
4896         memset/memcpy.
4897
4898         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
4899         when ssapre is enabled.
4900
4901         * inssel-long.brg: Fix bug in previous patch.
4902
4903         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
4904         multiplication by a constant.
4905
4906 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
4907
4908         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
4909         icc.
4910
4911         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
4912         saving registers.
4913
4914 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
4915
4916         * inssel-arm.brg: apply changes tested by Brian Koropoff
4917         <briank@marakicorp.com>.
4918
4919 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
4920
4921         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
4922         
4923 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
4924
4925         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
4926         to the same register if dreg is just a base register.
4927         (print_ins): Improve printing of membase opcodes.
4928
4929         * inssel-x86.brg: Add optimized ldind(reg) rules.
4930
4931         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
4932
4933 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
4934
4935         * mini.c: when running under valgrind, set the stack bottom for
4936         the GC at the actual approximate stack for the app (fixes running
4937         mono with valgrind).
4938
4939 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
4940
4941         * mini.c: do no break at the first valuetype to init found
4942         (fixes bug #75791).
4943
4944 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
4945
4946         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
4947
4948 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
4949
4950         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
4951
4952 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
4953
4954         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
4955
4956 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
4957
4958         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
4959
4960         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
4961         code.
4962
4963         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
4964         code.
4965
4966         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
4967         methods.
4968
4969 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
4970
4971         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
4972
4973 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
4974
4975         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
4976         in the tail recursion optimization.
4977
4978         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
4979         debug info into the assembly file.
4980
4981         * iltests.il: Add test for filter regions.
4982
4983         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
4984         initial stack of filter regions. Fixes #75755.
4985
4986 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
4987
4988         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
4989         stack requirements.
4990
4991 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
4992
4993         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
4994         the check for an already compiled method on non-ia64 platforms.
4995         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
4996         proper domain.
4997
4998         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
4999
5000         * inssel-x86.brg: Add some optimized call rules.
5001
5002 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
5003
5004         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
5005         method here.
5006
5007         * mini.h mini-trampolines.c: Pass the trampoline argument to 
5008         mono_arch_patch_delegate_trampoline.
5009
5010         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
5011
5012         * mini-trampolines.c: Fix build.
5013
5014         * mini-amd64.h: Add delegate trampolines.
5015
5016         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
5017
5018         * inssel-amd64.brg: Add optimized call rules.
5019         
5020         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
5021
5022         * inssel-ia64.brg: Add optimized ldind(reg) rules.
5023
5024 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
5025
5026         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
5027         change.
5028
5029         * mini-ia64.c: Remove LMF fixmes.
5030
5031         * mini-ia64.h: Remove most fields from LMF.
5032
5033         * inssel-ia64.brg (stmt): Fix unaligned access errors.
5034
5035         * mini-trampolines.c: Add support for IA64 function descriptors.
5036
5037         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
5038         for IA64 function descriptors.
5039
5040 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
5041
5042         * tramp-arm.c: patch the vtable for virtual calls. Added
5043         support code to register/unregister the LMF.
5044         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
5045         more LMF work.
5046
5047 2005-08-19  Dick Porter  <dick@ximian.com>
5048
5049         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
5050         bit value if needed.
5051
5052 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
5053
5054         * mini.c (mini_get_method): Move handling of wrapper data here.
5055
5056         * mini.c (mono_method_to_ir): Add support for dynamic methods.
5057
5058         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
5059         virtual.
5060
5061         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
5062         bblock->code does not remain empty.
5063
5064 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
5065
5066         * arrays.cs: Add regression test for #75832.
5067
5068         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
5069         rules. Fixes #75832.
5070
5071         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
5072         instruction scheduling.
5073
5074 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
5075
5076         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
5077
5078 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
5079
5080         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
5081
5082         * mini-codegen.c: Fix VC build.
5083
5084         * cpu-pentium.md: Increase length of atomic_exhange_i4.
5085
5086 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5087
5088         * mini.h: fix signature for mono_register_opcode_emulation.
5089
5090 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
5091
5092         * mini.c: Get rid of most of the helper_sig_... constants using
5093         mono_create_icall_signature ().
5094
5095 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
5096
5097         * jit-icalls.c (helper_ldstr): New helper function.
5098
5099         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
5100
5101         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
5102         throw, load the string using a helper call instead of creating a string object.
5103
5104         * aot.c: Update after LDSTR changes.
5105
5106         * mini.h: Bump AOT file version.
5107         
5108         * aot.c: Save class size info into the AOT file. Print more statistics during
5109         compilation.
5110
5111         * mini.h: Bump AOT file version.
5112
5113         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
5114         ordering of disasm cases. Fixes #74957.
5115
5116 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
5117
5118         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
5119         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
5120         the generic code needed for the ARM port.
5121
5122 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
5123
5124         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
5125         inssel-arm.brg: more ARM features and fixes.
5126
5127 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
5128
5129         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
5130         ARM port work in progress.
5131
5132 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
5133
5134         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
5135
5136         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
5137
5138         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
5139
5140         * inssel.brg (mini_emit_memset): Add support for unaligned access.
5141
5142         * *-ia64.*: Ongoing IA64 work.
5143         
5144         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
5145
5146 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
5147
5148         * TODO: Remove out-of-data todo stuff.
5149
5150         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
5151         dead code.
5152
5153         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
5154
5155         * mini.h: Bump corlib version.
5156
5157 2005-07-27  Martin Baulig  <martin@ximian.com>
5158
5159         * mini-codegen.c
5160         (create_copy_ins): Added `const unsigned char *ip' argument; set
5161         `copy->cil_code' from it.
5162
5163 2005-07-27  Martin Baulig  <martin@ximian.com>
5164
5165         * mini-exceptions.c (mono_handle_exception): Don't call
5166         mono_debugger_handle_exception() for filters.
5167
5168 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
5169
5170         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
5171         as well.
5172
5173 2005-07-26  Martin Baulig  <martin@ximian.com>
5174
5175         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
5176
5177         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
5178         helper_compile_generic_method() if the method is actually virtual
5179         and non-final.
5180
5181 2005-07-26  Martin Baulig  <martin@ximian.com>
5182
5183         * mini.c
5184         (trampoline_code): Renamed to `mono_trampoline_code' and made it
5185         public; this is now accessed directly by the debugger.
5186         (mono_generic_trampoline_code): Removed.
5187
5188         * debug-mini.c
5189         (mono_debug_init_method): Also add interncalls and wrappers.
5190
5191 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
5192
5193         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
5194
5195 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
5196
5197         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
5198
5199 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
5200
5201         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
5202
5203 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
5204
5205         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
5206         getting TLS offsets on AMD64 too.
5207
5208 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
5209
5210         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
5211
5212 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
5213
5214         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
5215         inssel-arm.brg, mini-arm.h: ARM port work in progress.
5216
5217 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
5218
5219         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
5220
5221         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
5222         to mini.c.
5223
5224         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
5225         mono_sparc_is_virtual_call ().
5226         
5227         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
5228
5229         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
5230         trampoline parameters.
5231
5232         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
5233         
5234         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
5235         to mono_arch_get_vcall_slot_addr.
5236
5237         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
5238         trampoline code.
5239
5240         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
5241
5242 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
5243
5244         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
5245
5246 2005-07-19  Martin Baulig  <martin@ximian.com>
5247
5248         * exceptions-amd64.c (throw_exception): Call
5249         mono_debugger_throw_exception() here like we're doing it on i386.
5250
5251 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
5252
5253         * mini-ia64.c: Add optimized TLS access support.
5254
5255 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
5256
5257         * mini-exceptions.c: Ongoing IA64 work.
5258
5259         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
5260
5261         * mini.c: Use the default optimization set when embedding. Fixes
5262         #75194.
5263
5264 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
5265
5266         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
5267         of trampolines to a separate file.
5268
5269         * mini-trampolines.c: New file.
5270
5271         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
5272         separate file.
5273         
5274         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
5275         amd64/ia64 code.
5276
5277         * mini-codegen.c: Fix cygwin build.
5278
5279 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
5280
5281         * mini.c: Add some minor changes needed by the IA64 port.
5282
5283         * *-ia64.*: Ongoing IA64 work.
5284
5285 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
5286
5287         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
5288         trampolines into arch-independent and arch-dependent parts.
5289
5290         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
5291
5292 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
5293
5294         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
5295
5296         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
5297         the xp-regalloc-branch for amd64.
5298
5299         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
5300         xp-regalloc-branch for x86.
5301
5302 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
5303
5304         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
5305
5306 2005-07-06  Martin Baulig  <martin@ximian.com>
5307
5308         * mini.c
5309         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
5310         (mono_jit_runtime_invoke): Likewise.
5311
5312 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
5313
5314         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
5315         on x86 too.
5316         
5317         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
5318         without loading their metadata. Reorganize the file format so exception handling+
5319         debug info is kept separate from normal method info. Create MonoJitInfo 
5320         structures for methods lazily.
5321
5322         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
5323         loading metadata.
5324         (x86_class_init_trampoline): Patch AOT class init trampolines too.
5325
5326         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
5327
5328         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
5329         in AOT code.
5330
5331         * mini.h: Bump AOT file version.
5332
5333 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
5334
5335         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
5336
5337 2005-07-01  Raja R Harinath  <rharinath@novell.com>
5338
5339         * Makefile.am (check-local): Call semdel-wrapper.
5340
5341 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
5342
5343         * mini-x86.c: Revert the last change as it seems to break the build..
5344
5345 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
5346
5347         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
5348         
5349         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
5350
5351 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
5352
5353         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
5354         outside of the macro, so strange stuff doesn't happen with gcc4
5355         (NEW_AOTCONST_TOKEN): Likewise.
5356
5357 2005-06-28  Martin Baulig  <martin@ximian.com>
5358
5359         * mini.c (mini_class_is_system_array): New static method; use this
5360         instead of `klass->parent == mono_defaults.array_class' everywhere
5361         since this also works for the new generic array class.
5362
5363 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
5364
5365         * inssel.brg: Remove warnings.
5366
5367 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
5368
5369         * mini-ia64.c: Ongoing IA64 work.
5370
5371         * basic-float.cs: Add float->i1 conversion test.
5372
5373         * iltests.il: Add conv.u4 test.
5374
5375 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
5376
5377         * inssel-long.brg: Fix bug caused by last change.
5378
5379 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
5380
5381         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
5382         BSDs.  Allows the x86 JIT to work on OSX86
5383
5384 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
5385
5386         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
5387         u4->i8 conversion.
5388
5389         * mini-ia64.c: Ongoing IA64 work.
5390
5391 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
5392
5393         * mini-ia64.c: Ongoing IA64 work.
5394
5395         * driver.c: Clean up jit_code_hash as well when using --regression.
5396
5397         * inssel-long.brg: Fix long->i4/u4 conversion rules.
5398
5399         * basic-long.cs: Add tests for long->u4 conversion.
5400
5401 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
5402
5403         * mini.c: Take mono_get_domainvar out of macros. This makes sure
5404         that we do not depend on undefined C behavior: the order stuff
5405         gets evaluated within an expression. Fixes mono when compiled on
5406         GCC 4.
5407
5408 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
5409
5410         * *-ia64.*: Ongoing IA64 work.
5411
5412         * aot.c: Lower memory usage while loading AOT methods.
5413
5414         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
5415
5416         * mini.h: Bump AOT file format version.
5417
5418 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
5419
5420         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
5421
5422 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
5423
5424         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
5425         not on callee assembly). Fixed some comments.
5426
5427 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
5428
5429         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
5430         it gets proper disassembly.
5431         (emit_method_info): Remove some dead code.
5432
5433         * mini.c (mini_method_compile): Allways allocate the GOT var in
5434         mono_method_to_ir for emulating opcodes.
5435
5436 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
5437
5438         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
5439         before freeing the code memory. Fixes #74990.
5440
5441         * objects.cs: Add regression test for #74992.
5442
5443         * liveness.c: Extend live ranges of arguments to the beginning of the
5444         method. Fixes #74992.
5445
5446         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
5447         so it points into the faulting instruction.
5448
5449 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
5450
5451         * jit-icalls.c (mono_imul_ovf): Add exception handling.
5452
5453         * *-ia64.*: Ongoing IA64 work.
5454
5455         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
5456
5457 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
5458
5459         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
5460
5461         * *-ia64.*: Ongoing IA64 work.
5462
5463 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
5464
5465         * basic-long.cs: Add tests for add/sub.ovf.
5466
5467         * basic.cs: Add tests for sub.ovf.
5468
5469         * *-ia64.*: Ongoing IA64 work.
5470
5471 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
5472
5473         * *-ia64.*: Ongoing IA64 work.
5474
5475         * basic.cs: Add conv.ovf.i4.un test.
5476
5477 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
5478
5479         * mini.c: (remove_block_if_useless) Fixed bug 75061.
5480         
5481 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5482
5483         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
5484
5485 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
5486
5487         * *-ia64.*: Ongoing IA64 work.
5488
5489 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5490
5491         * trace.[ch]:
5492         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
5493
5494 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
5495
5496         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
5497
5498 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
5499
5500         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
5501
5502         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
5503         of a call is callable by a near call.
5504
5505 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
5506
5507         * mini-ia64.c: Ongoing IA64 work.
5508
5509 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
5510
5511         * genmdesc.c: Make the generated array non-static.
5512
5513         * inssel-long.brg: Fix LSHR_IMM rule.
5514
5515         * *-ia64.*: Ongoing IA64 work.
5516
5517         * *-ia64.*: Ongoing IA64 work.
5518
5519 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
5520
5521         * *-ia64.*: Ongoing IA64 work.
5522
5523         * *-ia64.*: Ongoing IA64 work.
5524         
5525         * mini-ia64.c: Ongoing IA64 work.
5526
5527         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
5528
5529 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
5530
5531         * objects.cs basic-calls.cs: Move some tests to objects.cs.
5532         
5533         * objects.cs basic-long.cs: Move some tests to objects.cs.
5534
5535 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
5536
5537         * *-ia64.*: Ongoing IA64 work.
5538
5539         * iltests.il: Add a new test.
5540
5541         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
5542         newobj. Fixes #75042.
5543
5544 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
5545
5546         * *-ia64.*: Ongoing IA64 work.
5547         
5548         * *-ia64.*: Ongoing IA64 work.
5549         
5550         * *-ia64.*: Ongoing IA64 work.
5551
5552         * basic.cs objects.cs: Move tests accessing static variables as well.
5553
5554         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
5555
5556 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
5557
5558         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
5559
5560         * driver.c: Always print failed tests.
5561
5562         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
5563         frame pointer.
5564
5565         * *ia64*: Ongoing IA64 work.
5566
5567 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
5568
5569         * basic.cs: Add tests for add.ovf. Fix warnings.
5570
5571 2005-05-18  Miguel de Icaza  <miguel@novell.com>
5572
5573         * driver.c (mono_main): Avoid crash if no argument is passed to
5574         --break;  Do not use g_error, but f_printf.   And fix all other
5575         ocurrences of the same crash.
5576
5577 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
5578
5579         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
5580         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
5581         Fixes #74742.
5582
5583 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
5584
5585         * *-ia64.*: Add beginnings of IA64 backend.
5586
5587         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
5588
5589 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
5590
5591         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
5592         Fixes #74925.
5593
5594         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
5595
5596         * mini-amd64.c: Fix a warning.
5597
5598 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
5599
5600         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
5601         in float_neg. Fixes #74897.
5602
5603         * mini-amd64.c (emit_call): Fix another near call bug.
5604
5605 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
5606
5607         * declsec.c: Keep the appdomain information in the structure. Added a 
5608         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
5609         value gets overwritten).
5610         * declsec.h: Set the default MonoArray for the the stack to 6. Added
5611         an MonoAppDomain member to MonoSecurityFrame.
5612         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
5613         used in the stack walk. Now use a MonoArray which grow (double) when
5614         it gets full.
5615
5616 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
5617
5618         * mini.c: Re-enabled runtime cleanup, since running threads should
5619         now properly stop when exiting.
5620
5621 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
5622
5623         * mini-codegen.c: New file contaning the arch-independent local
5624         register allocator. Not used by any architectures yet.
5625
5626         * mini.h linear-scan.c: Merge some changes from the 
5627         mini-xp-local-regalloc branch.
5628
5629 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
5630
5631         * mini-amd64.c (emit_call): Fix calls to native functions when the
5632         runtime is compiled as a shared library. Fixes #74756.
5633
5634         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
5635         on a literal field. Fixes #74751.
5636
5637 2005-04-25  Raja R Harinath  <rharinath@novell.com>
5638
5639         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
5640
5641 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
5642
5643         * objects.cs: Add missing null casting test.
5644
5645 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
5646
5647         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
5648         in wrapper methods. Also rename 'address' variable to 'offset'.
5649
5650 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
5651
5652         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
5653         warnings.
5654         
5655         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
5656
5657         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
5658         work on windows.
5659
5660 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
5661
5662         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
5663
5664 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
5665
5666         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
5667         just the last bytes.
5668
5669 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
5670
5671         * aot.c (mono_compile_assembly): Fix warning.
5672
5673         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
5674         by the _MSC_VER stuff.
5675
5676 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
5677
5678         * inssel-long.brg: Fix #74588.
5679
5680         * cpu-amd64.md: Fix #74591.
5681
5682         * iltests.il: Add new regression tests.
5683
5684 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
5685
5686         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
5687         valuetype.
5688
5689 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
5690
5691         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
5692
5693         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
5694         from Bill Middleton <flashdict@gmail.com>.
5695
5696 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
5697
5698         * arrays.cs: Add new regression test. Fix warnings.
5699
5700 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
5701
5702         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
5703         and leakage in CKFINITE.
5704
5705         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
5706         this to a null op since it is called on amd64 too.
5707
5708         * exceptions-amd64.c (get_throw_trampoline): Align stack.
5709
5710         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
5711         body since this is not used on amd64.
5712         
5713         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
5714
5715         * mini-amd64.c: Remove obsolete fixmes.
5716
5717         * mini.c (print_method_from_ip): Fix debugging support.
5718
5719 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
5720
5721         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
5722         so that expressions that don't give much gain are not reduced.
5723         * ssapre.h: Likewise.
5724
5725 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
5726
5727         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
5728
5729         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
5730
5731         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
5732
5733 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
5734
5735         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
5736
5737         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
5738
5739 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
5740
5741         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
5742         stack touching.
5743
5744         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
5745
5746         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
5747
5748         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
5749
5750         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
5751         MONO_ARCH_USE_SIGACTION. Fixes #74252.
5752
5753         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
5754
5755         * mini-x86.c: Fix up stack overflow handling.   
5756
5757         * exceptions.cs: Add new regression test.
5758
5759 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
5760
5761         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
5762         mono_jit_thread_attach.
5763
5764         * mini.c (mono_method_to_ir): Verify called method is not abstract.
5765
5766 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
5767
5768         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
5769         avoid calling constructors using callvirt.
5770
5771         * inssel.brg: Fix #74073.
5772
5773 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
5774
5775         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
5776         compilation with non-GCC compilers.
5777         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
5778         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
5779
5780 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
5781
5782         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
5783         klass->interface_offsets (will likely fix bug#74073).
5784
5785 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
5786
5787         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
5788
5789 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
5790
5791         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
5792         to amd64_div_reg_size ().
5793         
5794         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
5795
5796 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
5797
5798         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
5799
5800 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
5801
5802         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
5803
5804 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
5805
5806         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
5807         
5808         * mini.c (mono_precompile_assembly): Load and precompile referenced
5809         assemblies as well. Fixes #74015.
5810
5811 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
5812
5813         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
5814
5815 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
5816
5817         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
5818         a lot of checks and (anyway) permissions cannot work until corlib is 
5819         loaded.
5820
5821 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
5822
5823         * mini-ppc.c: fixed ABI issue on sysv/ppc.
5824
5825 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
5826
5827         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
5828         calls (fixes bug#72824).
5829
5830 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
5831
5832         * mini.c: fix tail recursion elimination (see test in bug#73936).
5833
5834 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
5835
5836         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
5837         some fp functions in sse2 mode.
5838
5839 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
5840
5841         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
5842
5843 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
5844
5845         * mini.h mini.c: Add mono_get_jit_tls_key ().
5846
5847         * mini-x86.c: Enable fast TLS support on windows.
5848
5849 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
5850
5851         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
5852         * mini.c: Check for p/invoke method when generating code. If a
5853         p/invoke method, or it's class, isn't decorated with [Suppress
5854         UnmanagedCodeSecurity] then generate code to call System.Security.
5855         UnmanagedDemand (only if the security manager is active).
5856
5857 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
5858
5859         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
5860         last change as it seems to cause strange crashes.
5861         
5862 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
5863
5864         * *.c: handle unsafe function pointers where needed.
5865
5866 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
5867
5868         * mini.c (mono_jit_free_method): Remove the fixme too.
5869
5870 2005-03-15  Miguel de Icaza  <miguel@novell.com>
5871
5872         * mini.c: As discussed, make the code actually free the delegate
5873         thunk now, to enable the debugging of delegate problems, use
5874         MONO_DEBUG=1 when running Mono. 
5875
5876         This takes also care of parts of the leaks as seen by Joe.
5877
5878 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
5879
5880         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
5881         thread_tls_offset calculation.
5882
5883 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
5884
5885         * declsec.c: Reworked linkdemand checks for icall. The previous code
5886         was using the declaration code (untrusted) and didn't work as expected
5887         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
5888         specific case.
5889
5890 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
5891
5892         * iltests.il: Add new localloc test.
5893
5894         * mini-amd64.c: Handle large stack allocations the same way as on
5895         windows if stack overflow handling is working.
5896         
5897         * mini-amd64.c: Allocate the signal stack using mmap.
5898
5899         * mini.c (sigsegv_signal_handler): Fix reading of context.
5900
5901         * mini-exceptions.c: Fix up stack overflow handling.
5902
5903         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
5904
5905         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
5906
5907         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
5908
5909         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
5910
5911         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
5912         tramp_init functions as they are no longer needed.
5913
5914 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
5915
5916         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
5917         
5918         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
5919
5920         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
5921         
5922         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
5923         support that now.
5924
5925         * mini-ops.h: Add OP_LMUL_IMM.
5926
5927         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
5928         long mul/div opcodes as intrinsic.
5929
5930         * mini-amd64.c (emit_call): Handle the case when the callee might be
5931         an AOT method.
5932
5933 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
5934
5935         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
5936         extra safe.
5937         
5938         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
5939
5940         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
5941
5942 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
5943
5944         * mini.c (mono_codegen): Don't leak here, to help people running
5945         monogrind.
5946
5947 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
5948
5949         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
5950         conversions in sse2 mode.
5951
5952         * basic-float.cs: Add regression test.
5953         
5954         * mini-amd64.c: Reenable sse2.
5955
5956 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
5957
5958         * mini-amd64.c: Disable sse2 until some regressions are fixed.
5959
5960 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
5961
5962         * driver.c: Copyright text should include 2005.
5963         
5964 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
5965
5966         * cpu-amd64.md (load_membase): Fix more max lengths.
5967
5968 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
5969
5970         * cpu-amd64.md (load_membase): Fix max length.
5971
5972         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
5973
5974         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
5975
5976         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
5977         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
5978
5979         * basic-float.cs: Add rounding regression test.
5980
5981         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
5982
5983 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
5984
5985         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
5986         structures in registers for pinvoke wrappers.
5987
5988 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
5989
5990         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
5991
5992 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
5993
5994         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
5995         wrapper to mono_jit_thread_attach.
5996
5997         * mini.c (mini_jit_thread_attach): New jit icall.
5998
5999         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
6000         native->managed wrappers.
6001
6002         * exceptions.cs: Add new regression test.
6003
6004         * mini.c (optimize_branches): Check regions in the cbranch to throw
6005         block case as well. Fixes #73242.
6006
6007 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
6008
6009         * mini.c: thread safety fixes.
6010
6011 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
6012
6013         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
6014         patching stuff, since delegates use jump trampolines so there is
6015         no caller.
6016
6017         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
6018         jump trampolines.
6019         
6020         * tramp-amd64.c: Fix build.
6021
6022         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
6023         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
6024
6025         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
6026         Rename this to mono_arch....
6027         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
6028
6029         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
6030
6031         * mini-amd64.c (emit_call): If both the caller and the callee is
6032         guaranteed to have 32 bit addresses, emit a normal call.
6033
6034         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
6035
6036         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
6037         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
6038         method_ptr inside delegates.
6039
6040 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
6041
6042         * mini.c (mono_jit_free_method): Free the method info even if the native code is
6043         invalidated. Fixes #73001.
6044
6045         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
6046
6047         * mini-x86.c: Only use stdcall for pinvokes on windows.
6048
6049 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
6050
6051         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
6052         * mini-x86.c: remove unreliable __thread var offset detection,
6053         use the correct accessors and enable by default.
6054
6055 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
6056
6057         * mini.c (mono_jit_free_method): Fix memory leak.
6058
6059 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
6060
6061         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
6062
6063 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
6064
6065         * cpu-amd64.md: Fix lengths of atomic opcodes.
6066
6067 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
6068
6069         * driver.c: try to not imply using ICU is any good.
6070
6071 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
6072
6073         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
6074         functions as inline ops.
6075
6076         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
6077         some Interlocked functions as inline ops.
6078
6079         * mini.c (move_basic_block_to_end): Fix bug in last patch.
6080
6081         * mini.h (MonoBasicBlock): Reorganize fields a bit.
6082
6083         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
6084
6085         * mini.c: Add support for OP_NOT_TAKEN.
6086
6087         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
6088         structures in registers for pinvoke wrappers.
6089
6090         * mini-amd64.c: Fix warnings.
6091
6092 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
6093
6094         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
6095
6096         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
6097
6098         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
6099         address instead of loading the address from it.
6100
6101         * mini-x86.c: Add support for returning small structs in registers
6102         on Win32. Fixes part of #70864.
6103         
6104 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
6105
6106         * trace.c (get_token): Improve error checking.
6107
6108 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
6109
6110         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
6111
6112 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
6113  
6114         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
6115         it can be reused for MonoClass.
6116         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
6117         _LINKDEMAND.
6118
6119 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
6120
6121         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
6122         instead of a MonoReflectionMethod. The method information wasn't used
6123         when displaying SecurityException details (but will be now).
6124
6125 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
6126
6127         * Makefile.am : windows build fix.
6128
6129 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
6130
6131         * iltests.il: Add new regression test.
6132
6133         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
6134         #72522.
6135
6136 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
6137  
6138         * mini.c: Moved linkdemand check into helper function check_linkdemand
6139         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
6140         LDFTN, LDVIRTFTN).
6141
6142 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
6143
6144         * declsec.c: Added statistics counter for different kinds of 
6145         LinkDemands.
6146         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
6147         (and commented) declaration.
6148         * mini.c: Added statistics counter for security Demand code 
6149         generation. Added display of security statistics.
6150
6151 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
6152
6153         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
6154         Fix compilation errors under gcc-2.95.
6155
6156 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
6157
6158         * mini.c, driver.c: Use the new jit trampoline hashtable
6159
6160 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
6161
6162         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
6163
6164 2005-02-11  Martin Baulig  <martin@ximian.com>
6165
6166         * debug-mini.c (mono_debug_close_method): Free the line number array.
6167
6168 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
6169
6170         * aot.c: Break up large methods into smaller ones. Share GOT slots for
6171         icalls.
6172
6173         * mini.h: Bump AOT file format version. 
6174
6175 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
6176
6177         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
6178         APTC and P/Invoke.
6179         * declsec.h: Added macros to get/set lazyly initialized security 
6180         informations about assemblies. Added new enum for different type of
6181         possible LinkDemand violation. Added function to check LinkDemands.
6182         * mini.h: Added a field to MonoCompile to hold any security violation
6183         detected when JITting a method (so it can be thrown later).
6184         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
6185         and CEE_CALLVIRT. Added code to throw exception at the end of
6186         mini_method_compile (note: the exception is unhandled right now).
6187
6188 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
6189
6190         * mini.c, jit-icalls.c: use the managed implementation of
6191         memset for initobj and memset, to avoid managed <-> unmanaged
6192         transitions.
6193
6194 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
6195
6196         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
6197         optimization if it would need a GOT var.
6198
6199         * basic.cs: Add tests for constant propagation and switch statements.
6200
6201         * ssa.c: Fix out-of-range constant propagation and switch statements.
6202
6203 2005-02-09    <vargaz@freemail.hu>
6204
6205         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
6206
6207 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
6208
6209         * cpu-amd64.md (load_membase): Fix max length of load_membase.
6210
6211 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
6212
6213         * mini.c: update to new signature of mono_class_get_allocation_ftn().
6214
6215 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
6216
6217         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
6218         arithmetic operations.
6219
6220 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
6221
6222         * mini-ppc.c: add a workaround for broken user code that
6223         DllImports vararg functions with non-vararg signatures.
6224
6225 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
6226
6227         * mini.c (mono_jit_compile_method_inner): Add detection and a 
6228         meaningfull error message for assemblies written in Managed C++.
6229
6230         * tramp-amd64.c mini-amd64.h: Add support for 
6231         create_trampoline_from_token ().
6232
6233         * aot.c mini-x86.c abcremoval.c: Applied patch from
6234         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
6235
6236 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
6237
6238         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
6239         which takes a MonoImage/token as parameter instead of a MonoMethod.
6240
6241         * aot.c: Use the new trampoline for initializing vtables.
6242
6243         * aot.c: Add support for ldfld/stfld_remote wrappers.
6244
6245         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
6246         rules for compare <MEM>, IMM.
6247
6248         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
6249
6250         * aot.c: Handle inherited finalizers correctly.
6251
6252 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
6253
6254         * inssel.brg (stmt): Add a missing _setup_... ().
6255
6256         * aot.c: Save some parts of the class state to the AOT file and use it
6257         to recompute that state when a class is initialized.
6258
6259         * mini.c: Install AOT hooks into the runtime.
6260
6261         * mini.h: Bump AOT file format version.
6262         
6263         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
6264         Fixes #72148.
6265
6266         * iltests.il: Add new test.
6267
6268 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
6269
6270         * mini.c: fix typo.
6271
6272 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
6273
6274         * mini.c: setup the statistical profiler in the thread attach
6275         callback to cope with the new single thread code.
6276
6277 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
6278
6279         * mini-ppc.c: ensure we have enough room for the profiler
6280         calls (fixed bug#72084).
6281
6282 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
6283
6284         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
6285         it.
6286
6287 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
6288
6289         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
6290
6291 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
6292
6293         * ssapre.c: Fixed an issue with down safety (this allows IronPython
6294         to succesfully execute parrotbench).
6295         * ssapre.h: Likewise.
6296
6297 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
6298
6299         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
6300         variable for stores to method arguments (fixes a SSAPRE issue).
6301
6302 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
6303
6304         * mini.c: handle value types in dup, fixes gen-112.cs.
6305
6306 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
6307
6308         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
6309         sequence for calls in dynamic methods to avoid thunks.
6310
6311 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
6312
6313         * mini.c: correctly remove dynamic methods from the hashtable.
6314
6315 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
6316
6317         * driver.c: Disabled SSAPRE until fix the bug that appears
6318         in IronPython's parrotbench.
6319
6320 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
6321
6322         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
6323
6324         * mini.c (mono_method_to_ir): Revert the previous change.
6325         
6326         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
6327         when AOT compiling.
6328
6329         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
6330         mono_jit_info_table_find () etc. when running under valgrind.
6331
6332         * inssel.brg: Fix warnings.
6333
6334         * mini-exceptions.c: Fix warnings.
6335
6336 2005-01-31  Martin Baulig  <martin@ximian.com>
6337
6338         * driver.c (compile_all_methods_thread_main): Don't try to compile
6339         generic methods or anything which has type parameters.
6340
6341 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
6342
6343         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
6344
6345         * TestDriver.cs: Add --verbose flags.
6346
6347         * graph.c ssa.c: Fix 64 bit warnings.
6348         
6349         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
6350         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
6351         Fix 64 bit warnings.
6352
6353         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
6354         variable not spotted by gcc.
6355         
6356         * mini-amd64.c inssel-amd64.brg: Applied patch from  
6357         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
6358         X86_COMPARE_MEMBASE opcodes.
6359
6360         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
6361
6362 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
6363
6364         * *: MonoMethod->signature might be NULL now. You *MUST* use
6365         mono_method_signature.
6366
6367 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
6368
6369         * driver.c (compile_all_methods_thread_main): Compile the methods
6370         without invoking cctors.
6371
6372 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
6373
6374         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
6375         * basic-calls.cs: test for the above.
6376
6377 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
6378
6379         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
6380         MonoJitInfo changes.
6381
6382 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
6383
6384         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
6385         eagerly if it contains dynamic methods.
6386         
6387         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
6388
6389         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
6390         trace, it is now computed by an icall from trace_ips.
6391         
6392         * mini-exceptions.c: Fix a warning.
6393
6394 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
6395
6396         * mini-exceptions.c: don't bother getting stack trace info if
6397         it's not going to be used.
6398
6399 2005-01-27  Raja R Harinath  <rharinath@novell.com>
6400
6401         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
6402         ssapre-mini-ops.h.
6403
6404 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
6405
6406         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
6407
6408         * aot.c: Avoid calling mono_method_get_header () if not needed.
6409
6410         * mini.h: Bump AOT file format version.
6411         
6412         * mini.c (mono_emit_native_call): Allocate a GOT var here.
6413
6414         * mini.c (mono_print_tree): Print more info for calls.
6415
6416 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
6417
6418         * declsec.h: Remove warning by adding missing include for marshal.h
6419
6420 2005-01-26  Martin Baulig  <martin@ximian.com>
6421
6422         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
6423         `ip' twice.
6424
6425 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
6426
6427         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
6428         flags.
6429
6430         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
6431
6432         * aot.c (mono_compile_assembly): Fix a warning.
6433
6434 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
6435
6436         * declsec.c: Look for security attributes on the original MonoMethod 
6437         (and not the wrapped one). This fix permissions on icalls.
6438
6439 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
6440
6441         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
6442
6443         * mini.c (mono_allocate_stack_slots): Add a fixme.
6444
6445         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
6446
6447 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
6448
6449         * inssel.brg: optimize casts of sealed types (more
6450         optimizations waiting for fixes in remoting).
6451
6452 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
6453
6454         * inssel.brg (stmt): Add another dummy rule.
6455
6456         * driver.c: Fix warnings.
6457
6458         * driver.c (mono_main): If running under valgrind, instruct glib to use
6459         the system allocation functions so valgrind can track the memory
6460         allocated by the g_... functions.
6461
6462         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
6463
6464         * mini-ops.h: Add OP_DUMMY_STORE opcode.
6465
6466         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
6467
6468         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
6469         variables in try regions.
6470
6471         * mini.c (mini_method_compile): Don't disable optimizations on large
6472         methods when AOT compiling.
6473
6474         * mini.c (mono_allocate_stack_slots): New arch independent method to 
6475         allocate stack slots. Not yet used.
6476
6477 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
6478
6479         * debug-mini.c (mono_debug_close_method): Plug some leaks.
6480
6481 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
6482
6483         * mini-ppc.c: make the branch info relative as the code
6484         buffer can be reallocated.
6485
6486 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
6487
6488         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
6489         * driver.c: Removed the AOT/security restriction. Now initialize the
6490         security manager (in metadata) if --security is used.
6491         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
6492         rather than the pointer to declarative security, when AOT is used.
6493
6494 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
6495
6496         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
6497         basic blocks, reduced intrinsic exception throwing code size.
6498
6499 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
6500
6501         * driver.c (mini_usage): Reorder the usage screen.
6502
6503 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
6504
6505         * mini.c (mono_resolve_patch_target): Fix warning.
6506
6507 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
6508
6509         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
6510         previous patch.
6511
6512         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
6513
6514         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
6515         breaks the amd64 build.
6516
6517         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
6518         register allocation. Fixes #71454.
6519
6520         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
6521
6522         * arrays.cs: Add new regression test.   
6523
6524 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
6525
6526         * ssapre.c: Turned usage of snprintf to GString.
6527         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
6528         (I left it on by mistake in my previous commit).
6529
6530 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
6531
6532         * mini.c, cfold.c, basic-calls.cs: preserve side effects
6533         on cond branch optimization (fixes bug# 71515).
6534
6535 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
6536
6537         * abcremoval.c: Fixed bug 71062.
6538         * abcremoval.h: Likewise.
6539
6540 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
6541
6542         * mini.c: Added a new functionality to optimize_branches, the removal
6543         of useless basic blocks, and fixed some problem in the removal of
6544         critical edges; some utility functions added for both purposes.
6545         * ssapre.c: Added complex expression support, and fixed bug 70637.
6546         * ssapre.h: Likewise.
6547         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
6548         enabled in SSAPRE.
6549         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
6550         * driver.c: Re-enabled SSAPRE.
6551
6552 2005-01-19  Martin Baulig  <martin@ximian.com>
6553
6554         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
6555         the result of mono_get_method_constrained().
6556
6557 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
6558
6559         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
6560         manager.
6561
6562 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
6563
6564         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
6565         be detected.  Fixes #59296.
6566
6567 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
6568
6569         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
6570         which can happen. Fixes #71361.
6571
6572 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
6573
6574         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
6575         manager.
6576
6577 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
6578
6579         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
6580         appdomain-unload.exe to fail.
6581         
6582         * mini.c: Fix some memory leaks.
6583
6584 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
6585
6586         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
6587         Fixed bug and sped up some codepaths.
6588
6589 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
6590
6591         * mini.c: Fix some memory leaks.
6592
6593         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
6594         conversion.
6595
6596         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
6597
6598         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
6599         #71320.
6600
6601         * iltests.il: Add regression test for #71320.
6602
6603 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
6604
6605         * mini.c (mono_codegen): Fix installation of profiler hooks.
6606
6607         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
6608
6609 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
6610
6611         * mini.h, mini.c, cfold.c: optimize access to enum
6612         readonly fields, too. Eval conditional branches if possible
6613         to perform unreachable code removal in more cases.
6614
6615 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
6616
6617         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
6618
6619         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
6620         code manager.
6621
6622         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
6623         WinXP DEP. Fixes #71244.
6624
6625 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
6626
6627         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
6628
6629 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
6630
6631         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
6632
6633 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
6634
6635         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
6636         changes.
6637
6638         * mini.h: Bump AOT version.
6639
6640         * mini.h (MonoCompile): Change exvar to a hash table.
6641
6642         * mini.c: Allocate a separate exvar for each handler block.
6643
6644         * mini.c: Get rid of the computation of filter_lengths, its not needed.
6645
6646         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
6647         ex var with the pending exception and only throw if the two are equal.
6648         Fixes #68552.
6649         
6650         * exceptions.cs: Add tests for rethrow and nested catch clauses.
6651
6652         * mini-x86.c: Fix warnings.
6653
6654         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
6655         used by all the ports now.
6656
6657         * aot.c: Add write-symbols and save-temps options.
6658
6659 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
6660
6661         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
6662
6663 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
6664
6665         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
6666         operations.
6667
6668         * tramp-s390.c: Check vtable slot belongs to the domain.
6669
6670         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
6671         as per other platforms.
6672
6673         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
6674
6675 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
6676
6677         * driver.c: we don't run the Main() code in a subthread anymore.
6678
6679 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
6680
6681         * mini.c: added experimental rtc support in the statistical
6682         profiler: if the user has the permission, more accurate statistics
6683         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
6684         The MONO_RTC value must be restricted to what the linux rtc allows:
6685         power of two from 64 to 8192 Hz.
6686
6687 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
6688
6689         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
6690
6691 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
6692
6693         * mini-ppc.c: better icache flush for smp.
6694
6695 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
6696
6697         * mini-amd64.c (emit_move_return_value): Fix memory leak.
6698
6699         * mini-x86.c (get_call_info): Add the get_call_info () code from the
6700         amd64 port, not yet used.
6701
6702 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
6703
6704         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
6705         a struct type.
6706
6707 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
6708
6709         * driver.c: Added --security option to activate the security manager.
6710         Right now this will allow code generation for declarative demands and
6711         is disabled when AOT is specified.
6712         * mini.c: Add code generation for declarative security demands.
6713         * mini.h: Add mono_use_security_manager as an extern gboolean.
6714
6715 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
6716
6717         * aot.c (mono_compile_assembly): Speed up compilation a bit by
6718         emitting more dense assembly code.
6719
6720         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
6721         exception throwing stuff.
6722
6723 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
6724
6725         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
6726         dead code.
6727
6728         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
6729         left in by mistake.
6730
6731         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
6732         fixed.
6733
6734         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
6735
6736         * tramp-*.c: Only patch vtable slots if the object is in the current
6737         domain. Fixes appdomain-unload.exe.
6738
6739         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
6740         
6741         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
6742         x86 branch.
6743
6744 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
6745
6746         * mini.c (reverse_branch_op): New helper function.
6747
6748         * mini.c (optimize_branches): Run the new optimization only on 
6749         platforms which support it. Also reverse all kinds of branches.
6750
6751         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
6752
6753         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
6754         a throw statement.
6755
6756         * mini.c (optimize_branches): Reverse not-equals branches if the false
6757         bblock is a throw. This happens a lot of time with argument checking in
6758         corlib.
6759
6760         * mini.c (mono_codegen): Add support for placing basic blocks after
6761         the function epilogue.
6762
6763         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
6764         function epilogue.
6765         
6766 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
6767
6768         * mini.c (setup_stat_profiler): Only set this up if the platform
6769         supports ITIMER_PROF.
6770
6771 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
6772
6773         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
6774         previous patch.
6775
6776         * inssel.brg: Fix a warning.
6777
6778 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
6779
6780         * mini.c: added support for statistical profiler 
6781         (run with: --profile=default:stat).
6782
6783 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
6784
6785         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
6786
6787         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
6788
6789         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
6790         related to global registers from the amd64 port.
6791
6792 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
6793
6794         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
6795
6796         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
6797         with global registers.
6798         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
6799
6800         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
6801
6802 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
6803
6804         * debug-mini.c (encode_value): Fix off-by-one.
6805
6806         * aot.c (encode_value): Likewise.
6807
6808         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
6809
6810 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
6811
6812         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
6813         AOT.
6814
6815         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
6816         
6817         * aot.c (emit_method_info): Increase size of temp buffer.
6818
6819         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
6820         the AOT case.
6821
6822 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
6823
6824         * aot.c (emit_method_info): Fix build.
6825         
6826         * aot.c: Further rework of the AOT file format to reduce the size of
6827         the method info data.
6828
6829         * mini.h: Bump AOT file format version.
6830
6831 2004-12-27  Martin Baulig  <martin@ximian.com>
6832
6833         * mini.c (mini_get_method): New static method; call
6834         mono_get_method_full() and mono_get_inflated_method().
6835         (mono_method_to_ir): Use mini_get_method() instead of
6836         mono_get_method_full(). 
6837
6838 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
6839
6840         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
6841
6842 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
6843
6844         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
6845
6846         * inssel-amd64.brg: Add some optimization rules.
6847
6848 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
6849
6850         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
6851         standard not GC'd stuff is fine.
6852
6853 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
6854
6855         * aot.c: Rework the AOT file format to get rid of most of the global
6856         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
6857
6858         * mini.h: Bump AOT file format version.
6859         
6860 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
6861
6862         * mini.h: Bump AOT file format version.
6863
6864         * aot.c (mono_aot_is_got_entry): New function to determine if an 
6865         address is inside a GOT.
6866
6867         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
6868
6869         * cpu-pentium.md: Increase the maximum size of some instructions which
6870         might involve a got access.
6871         
6872         * mini.c (get_method_from_ip): Another debug helper function.
6873
6874         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
6875         when got var accesses are created during the decompose phase.
6876
6877         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
6878
6879         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
6880         argument mini_compile_method and to MonoCompile, and use this to
6881         determine whenever a given method is compiled for AOT. This allows the
6882         other methods compiled during AOT compilation to be free of AOT stuff,
6883         so the backends does not need to add special support for them by
6884         creating a fake GOT etc.
6885
6886         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
6887         longer needed.
6888
6889 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
6890
6891         * mini.c (mono_method_to_ir): It turns out that some of the
6892         x-appdomain wrappers are lax with types, so just ignore this for
6893         all wrappers.
6894
6895         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
6896         at the vtable->klass. If it is non-shared code we can just use the
6897         vtable.
6898
6899 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
6900
6901         * mini-ppc.c: access MonoDomain from tls, too.
6902
6903 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
6904
6905         * declsec.c: Removed unused variable (and related warning ;-)
6906
6907 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
6908
6909         * iltests.il: New test for LDELEMA on an array of ref types.
6910
6911         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
6912         all ldelema's on reftypes.
6913         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
6914         it was the wrong place to put it.
6915
6916         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
6917         register to pop to make this cleaner, at the request of Paolo.
6918
6919 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
6920
6921         * mini-ops.h (OP_GETHASHCODE): New op.
6922
6923         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
6924
6925         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
6926         operation.
6927
6928         For a microbenchmark, this reduces the cost of Hashtable.get_Item
6929         by 25%.
6930         
6931         * mini-x86.c (mono_arch_output_basic_block): Rather than
6932
6933         add ebp, 4
6934
6935         Emit
6936
6937         pop edx
6938
6939         The first is 3 bytes while the second is 1. This saves 36 kb on
6940         mscorlib, quite a big saving. When bootstraping mcs, I was able to
6941         see a small boost because of icache locality.
6942
6943         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
6944
6945 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
6946
6947         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
6948         started code sharing with the generic code.
6949
6950 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
6951
6952         * mini-ppc.c, cpu-g4.md: added code for direct access to
6953         tls data slots.
6954
6955 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
6956
6957         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
6958          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
6959         to OP_TLS_GET.
6960
6961 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
6962
6963         * declsec.c|h: Added functions to cache the declarative stack modifiers
6964         in MonoJitInfo and to create a security frame from a MonoJitInfo 
6965         structure.
6966         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
6967         created. Register internal calls for System.Security.SecurityFrame::
6968         _GetSecurityFrame and _GetSecurityStack.
6969         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
6970         the definitions for the new stack walk/callback mechanism.
6971         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
6972         first security frame for LinkDemands and InheritanceDemands) and
6973         GetSecurityStack for Demands. Both use the new mono_walk_stack code
6974         from lupus.
6975         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
6976         walk initialization (lupus).
6977
6978 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
6979
6980         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
6981         idiom.
6982         (handle_loaded_temps): Do not create a temporary variable for
6983         things that we know are temps. They will never be modified.
6984         (mono_spill_call): Set MONO_INST_IS_TEMP
6985         (mono_emulate_opcode): ditto
6986         (emit_tree): ditto
6987         (mono_method_to_ir.CEE_DUP): ditto
6988
6989 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
6990
6991         * mini.c (type_to_eval_stack_type): Make this handle the void type
6992         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
6993         (emit_tree): use ip_in_bb to special case some common idioms
6994         Update all callers to pass in the IP.
6995         (mono_method_to_ir): Make CEE_CALL* do the above as well.
6996
6997         This gives us a nice 2% speedup in mcs bootstrap.
6998
6999         * mini-x86.c (peephole_pass): Peephole pass to make
7000         mov  [foo], eax
7001         push [foo]
7002
7003         into
7004
7005         mov [foo], eax
7006         push eax
7007
7008         * mini.c (ip_in_bb): new method.
7009         (mono_method_to_ir): use this method rather than doing the hash
7010         lookup ourselves.
7011
7012         * linear-scan.c (mono_linear_scan): When expiring actives, you
7013         don't need to keep around variables that expire on this
7014         instruction. This makes it so that:
7015              a = b + 1
7016         will turn into:
7017              store (ebx add (ebx, 1))
7018         which will become
7019              add ebx, 1
7020
7021 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
7022
7023         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
7024         combination to avoid doing two copies. Fix up problems with previous
7025         patch.
7026
7027         * mini.c: Fix 64 bit warnings.
7028
7029         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
7030
7031 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
7032
7033         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
7034         changes from the x86 code.
7035
7036         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
7037
7038 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
7039
7040         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
7041         throwing code to reduce its size, unify the AOT and non-aot code and 
7042         get rid of relocations in the AOT case.
7043
7044         * mini-x86.h mini.c exceptions-x86.c 
7045         (mono_arch_get_throw_corlib_exception): New arch specific function to 
7046         raise corlib exceptions which doesn't require relocations in the 
7047         caller.
7048
7049         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
7050
7051 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
7052
7053         * mini.c (mono_emit_method_call): Only allocate the got var when it is
7054         needed.
7055
7056         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
7057         in the AOT case.
7058
7059 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
7060
7061         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
7062         with add function when used from Inc/dec atomic 
7063         functions. Re-enabled optimization on x86.
7064         * mini-ops.h: renamed atomic_add functions to
7065         allow _add to match the Interlocked::Add and
7066         _add_next to match Interlocked::Inc/Dec.
7067
7068 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
7069
7070         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
7071         linking of BBs to the end BB, and enabled SSAPRE also with
7072         consprop and copyprop (which was prevented by that bug).
7073
7074 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
7075
7076         * mini-x86.c: disabling the Interlocked optimizing code. 
7077
7078 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
7079
7080         * aot.c (load_aot_module): Move reading of got_addr after the AOT
7081         file version check.
7082         
7083 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
7084
7085         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
7086         interlocked optimization due lack of support on x86, rewrote 
7087         exchange to take into account that base may be in eax.
7088         
7089         xsp works again; activated Interlocked optimizing code.
7090         
7091 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
7092
7093         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
7094
7095 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
7096
7097         * mini-ops.h: Add new opcodes.
7098
7099         * mini.h: Add new patch types. Add got_var to MonoCompile.
7100
7101         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
7102         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
7103         make it work with all kinds of patchable code.
7104
7105         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
7106         address of the GOT, and referencing entries in the GOT.
7107
7108         * mini.c: Add code to load the GOT address if needed by an opcode.
7109
7110         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
7111         independent AOT code on the x86 using an elf-style Global Offset Table.
7112
7113 2004-12-14  Raja R Harinath  <rharinath@novell.com>
7114
7115         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
7116
7117 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7118
7119         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
7120         when running xsp.
7121
7122 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
7123
7124         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
7125         of Interlocked:Increment/Decrement/Add as inline ops.
7126         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
7127
7128 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
7129
7130         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
7131         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
7132
7133 2004-12-12  Duncan Mak  <duncan@ximian.com>
7134
7135         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
7136         again. `patch_info->table_size' is no longer valid after Zoltan's
7137         commit #37636.
7138
7139 2004-12-12  Martin Baulig  <martin@ximian.com>
7140
7141         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
7142         if we are the "real" method, ie. not an inlined method inside it.
7143
7144 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
7145
7146         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
7147         before we look in the special fields table. This fixes
7148         ../tests/thread-static-init.cs.
7149
7150 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7151
7152         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
7153         for Array get_Rank and get_Length. Fixes bug #70465.
7154
7155 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
7156
7157         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
7158         separate structure to reduce the size of MonoJumpInfo.
7159
7160 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
7161
7162         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
7163
7164 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
7165
7166         * mini.c (mini_get_inst_for_method): Changed to allow ports
7167         to return a MonoInst instead of opcode 
7168         (renamed mini_get_opcode_for_method to better reflect the new functionality)
7169         
7170         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
7171         Allow ports to return a created MonoInst instead of op-code, will enable
7172         new optimizations.
7173         (renamed mini_get_opcode_for_method to better reflected the functionality)
7174
7175 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
7176
7177         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
7178
7179 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
7180
7181         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
7182         Fixes #69985.
7183
7184 2004-12-08  Martin Baulig  <martin@ximian.com>
7185
7186         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
7187         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
7188
7189 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
7190
7191         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
7192         correctly.
7193
7194         * exceptions.cs: Disable some tests which depend on properties of x86 fp
7195         arithmetic.
7196
7197 2004-12-08  Raja R Harinath  <rharinath@novell.com>
7198
7199         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
7200
7201 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
7202
7203         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
7204         bug introduced by the previous patch.
7205
7206 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
7207
7208         * mini-ppc.c, objectc.cs: handle large structs passed by value
7209         (fixes bug #69972).
7210
7211 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
7212
7213         * mini-ppc.c: OP_ARGLIST implementation from
7214         Geoff Norton  <gnorton@customerdna.com>.
7215
7216 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
7217
7218         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
7219         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
7220
7221 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
7222
7223         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
7224
7225 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
7226
7227         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
7228         support.
7229
7230 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
7231
7232         * mini-sparc.c: Zero out localled-ed memory.
7233
7234         * iltests.il: Add tests for zeroing out localloc-ed memory.
7235
7236 2004-12-04  Martin Baulig  <martin@ximian.com>
7237
7238         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
7239         mono_method_get_signature_full().       
7240
7241 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
7242
7243         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
7244         and some utility functions (always for SSAPRE), integrated SSAPRE.
7245         * mini.h: Likewise.
7246         * driver.c: Added ssapre option.
7247         * ssa.c: Small fix on OP_ARG handling.
7248         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
7249         * Makefile.am: Likewise.
7250
7251 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
7252
7253         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
7254         now in the xp code.
7255
7256         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
7257         icall.
7258
7259 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
7260
7261         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
7262         
7263         * cpu-s390.md : Increase instruction length of oparglist.
7264
7265         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
7266
7267 2004-11-30  Martin Baulig  <martin@ximian.com>
7268
7269         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
7270         virtual generic methods.  We call a special helper_compile_generic_method()
7271         icall to retrieve the method from the vtable, inflate and compile
7272         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
7273
7274         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
7275
7276 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
7277
7278         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
7279
7280 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
7281
7282         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
7283         Fixes #69929.
7284
7285 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
7286
7287         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
7288         platforms with PIC aot.
7289
7290 2004-11-28  Martin Baulig  <martin@ximian.com>
7291
7292         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
7293         Fixes gen-112.cs.
7294
7295 2004-11-28  Martin Baulig  <martin@ximian.com>
7296
7297         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
7298         the result of mono_type_get_underlying_type() to check whether
7299         we're byref.
7300
7301 2004-11-26  Martin Baulig  <martin@ximian.com>
7302
7303         * mini.c
7304         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
7305         in the g_assert().
7306
7307 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
7308
7309         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
7310         the same way as the other arguments so they won't get clobbered.
7311
7312         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
7313         calls through R11 since it is clobbered by the trampoline code.
7314
7315 2004-11-26  Raja R Harinath  <rharinath@novell.com>
7316
7317         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
7318         pick up in-tree mscorlib.dll.
7319
7320 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
7321
7322         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
7323
7324         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
7325         runtime data/code are now stored in a table similar to the GOT in ELF. 
7326         This allows the code itself to be position independent.
7327
7328         * aot.c: Fix loading of referenced assemblies after the lazy assembly
7329         loading changes.
7330
7331         * aot.c: Attach ELF type (object/function) directives to all global
7332         symbols.
7333
7334         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
7335
7336         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
7337
7338         * mini-amd64.h: Turn on PIC AOT code.
7339
7340         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
7341         returning the offset within an OP_AOTCONST instruction where the GOT
7342         offset needs to be added.
7343
7344         * mini.h: Bump AOT file format version.
7345
7346 2004-11-25  Martin Baulig  <martin@ximian.com>
7347
7348         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
7349         uninflated generic methods.
7350
7351 2004-11-25  Martin Baulig  <martin@ximian.com>
7352
7353         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
7354
7355 2004-11-24  Martin Baulig  <martin@ximian.com>
7356
7357         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
7358         original klass (this only applies for generic instances).
7359
7360 2004-11-24  Martin Baulig  <martin@ximian.com>
7361
7362         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
7363         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
7364         that array).
7365
7366 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
7367
7368         * mini.c (mono_method_to_ir): Disable inlining for methods containing
7369         localloc. Fixes #69678.
7370
7371         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
7372         
7373 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
7374
7375         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
7376         used SSE registers on pinvoke calls. Fixes #69774.
7377
7378 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
7379
7380         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
7381         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
7382
7383 2004-11-23  Raja R Harinath  <rharinath@novell.com>
7384
7385         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
7386         Refer directly to the mcs/ tree.
7387
7388 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
7389
7390         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
7391         Check if a trampoline for a synchronized method is required. 
7392
7393 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
7394
7395         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
7396         with localloc if needed. Throe arithmetric exception in
7397         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
7398         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
7399
7400 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
7401
7402         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
7403         types before switching on type.  Fixes #69622.
7404
7405 2004-11-19  Raja R Harinath  <rharinath@novell.com>
7406
7407         * Makefile.am (check-local): New.  Integrate into 'make check'.
7408         (MCS,RUNTIME): Define using in-tree mono and mcs.
7409         (ILASM): New.
7410         (%.exe): Use $(ILASM).
7411
7412 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
7413
7414         * mini-ppc.c: adjust initial prolog size (bug #69691).
7415
7416 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
7417
7418         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
7419         #69664.
7420
7421 2004-11-17  Raja R Harinath  <rharinath@novell.com>
7422
7423         * Makefile.am (clean-local): Rename from 'clean'.
7424
7425 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
7426
7427         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
7428         to mono_arch_is_int_overflow. 
7429         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
7430         SIGFPE events.
7431
7432 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
7433
7434         * declsec.c|h: New files to support declarative security attributes.
7435         Added function to check if a method has (applicable) security.
7436         * mini.c|h: Add check for declarative security attributes in
7437         mono_method_check_inlining.
7438         * Makefile.am: Added declsec.c and declsec.h to the build.
7439
7440 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
7441
7442         * mini.c, mini.h: update to keep dynamic code info per-domain.
7443
7444 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
7445
7446         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
7447         (mini_init): Get rid of it from here too.
7448
7449 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
7450
7451         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
7452         implemented OP_RETHROW (patch by Geoff Norton
7453         <gnorton@customerdna.com>).
7454
7455 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
7456
7457         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
7458         between appdomains.  Fixes appdomain-unload on PPC.
7459
7460 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
7461
7462         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
7463         mini-exceptions.c: handle the new wrapper types.
7464         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
7465         token value as a MonoClass* when compiling a wrapper.
7466         mono_jit_create_remoting_trampoline now takes an additional
7467         MonoRemotingTarget parameter.
7468         
7469 2004-11-10  Martin Baulig  <martin@localhost>
7470
7471         * mini.c (mono_method_to_ir): Use `generic_container->context'
7472         rather than creating a new one.
7473
7474 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
7475
7476         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
7477
7478         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
7479
7480 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
7481
7482         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
7483         the experimental aot cache stuff.
7484
7485 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
7486
7487         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
7488         mini-exceptions.c: update to exception clause structure changes.
7489
7490 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
7491
7492         * exceptions-x86.c (throw_exception): Fix warnings.
7493
7494         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
7495         for OP_RETHROW.
7496
7497 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
7498
7499         * exceptions-sparc.c (get_throw_exception): Really fix this.
7500
7501 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
7502
7503         * tramp-*.c: we no longer support icalls without wrappers, so
7504         a bit of code can be removed here
7505
7506 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
7507
7508         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
7509         patch.
7510
7511         * cpu-sparc.md: Add op_rethrow.
7512
7513         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
7514
7515         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
7516
7517         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
7518         * mini-ops.h: Add OP_RETHROW.
7519
7520         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
7521
7522         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
7523
7524 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
7525         
7526         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
7527         Makes the output much easier to read
7528
7529 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
7530
7531         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
7532         prevents another huge leak when compiling with ssa. Secondly, the
7533         performance of doing this rather than freeing the lists is much
7534         better. GList does a lock every time you allocate a list link,
7535         so that it can use a memory pool. So, it is better to just use
7536         a memory pool of our own.
7537         
7538         * ssa.c, linear-scan.c: replace g_list_remove_link with
7539         g_list_delete.  The remove one does not free the GList, so we were
7540         leaking memory. On -O=all --compile-all with corlib, this cut down
7541         3 MB of allocations.
7542
7543 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
7544
7545         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
7546
7547         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
7548
7549         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
7550         into a new function mono_create_jit_trampoline ().
7551
7552 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
7553
7554         * trace.c (get_spec): Allow tracing of classes without a namespace.
7555
7556 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
7557
7558         * mini.c: Fix pointer overwrite in mini_method_compile.
7559
7560 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
7561
7562         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
7563         The darwin ABI needs some special handling for 1 and 2 byte structs
7564         Lets use lbz/lhz instead of lwz everywhere.
7565         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
7566         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
7567         Use stb/sth for the former, and put the latter always on stack instead of in
7568         argument registers.
7569
7570 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
7571
7572         * trace.c (is_filenamechar): Add '_'.
7573
7574 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
7575
7576         * mini-s390.c: Fix prolog length to allow for large trace requirements.
7577
7578         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
7579
7580 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
7581
7582         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
7583         depends on libmonogc. Fixes #68805.
7584
7585 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
7586
7587         * mini.c (mono_jit_free_method): Provide extra information for
7588         this error.  Currently this leaks, but will be turned into a
7589         developer option in the future.
7590
7591 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
7592
7593         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
7594
7595 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
7596
7597         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
7598         boundary. Fixes reading of PATCH_INFO_R4 and R8.
7599         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
7600
7601 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
7602
7603         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
7604         trampolines for AOT code.
7605
7606 2004-10-22    <vargaz@freemail.hu>
7607
7608         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
7609         constructed types. Fixes #68136.
7610
7611 2004-10-21  Martin Baulig  <martin@ximian.com>
7612
7613         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
7614         if it returns true, unwind the stack to the call instruction.
7615
7616 2004-10-21    <vargaz@freemail.hu>
7617
7618         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
7619
7620         * mini.h: Bump AOT version number.
7621
7622         * objects.cs: Add another test for unbox trampolines.
7623
7624         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
7625         valuetype methods.
7626
7627 2004-10-20    <vargaz@freemail.hu>
7628
7629         * driver.c: Add SHARED to the set of optimizations tested.
7630
7631         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
7632
7633         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
7634         used by CEE_NEWARR.
7635
7636         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
7637
7638 2004-10-20  Martin Baulig  <martin@ximian.com>
7639
7640         * mini-exceptions.c (mono_handle_exception): Call
7641         mono_debugger_handle_exception() to tell the debugger about
7642         catch/finally clauses.
7643
7644 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
7645
7646         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
7647
7648         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
7649         #68447.
7650
7651 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
7652
7653         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
7654         methods as their native size, fixed bug #57543, #57545.
7655         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
7656         This saves a temporary register and mullw call down into 1 (minor perf
7657         increase for cases like sum = sum * 5;  This use to translate into:
7658             li r11,5
7659             mullw r28,r28,r11
7660         It now translates to
7661             mulli r28,r28,5
7662
7663 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
7664
7665         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
7666         #68388.
7667
7668 2004-10-11  Martin Baulig  <martin@ximian.com>
7669
7670         * mini.c (mono_method_to_ir): If we're a generic method, get the
7671         MonoGenericContainer from our MonoMethodNormal and create a
7672         MonoGenericContext from it.
7673
7674 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
7675
7676         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
7677
7678         * basic-long.cs: Add test for checked i8->i2 cast.
7679
7680 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
7681
7682         * inssel-ppc.brg: added a couple of speedup rules.
7683
7684 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
7685
7686         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
7687         to speed up rebuilds.
7688
7689 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
7690
7691         * mini-s390.c: Minor fix to OP_OR_IMM.
7692
7693 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
7694
7695         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
7696         better. Fixes appdomain-unload.exe on sparc.
7697
7698 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
7699
7700         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
7701         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
7702         see bug 67324.
7703
7704 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
7705
7706         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
7707
7708 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
7709
7710         * mini.c: Always generate a field read/write wrapper for members
7711         of the class MarshalByRefObject since the actual instance could
7712         be a CBO.
7713
7714 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
7715
7716         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
7717
7718 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
7719
7720         * driver.c mini.h trace.c: Move the setting of the main assembly into
7721         a separate function called mono_trace_set_assembly () and call it after
7722         actually loading the main assembly. Fixes #66872.
7723
7724 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
7725
7726         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
7727         using the code manager.
7728
7729 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
7730
7731         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
7732
7733 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
7734
7735         * cpu-amd64.md: Fix bug in previous patch.
7736         
7737         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
7738         #66650.
7739
7740 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
7741
7742         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
7743         mini-exceptions.c: updates for changed stack walk interface.
7744
7745 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
7746
7747         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
7748
7749 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
7750
7751         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
7752
7753 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
7754
7755         * driver.c (mini_regression_list): Do not call mono_assembly_close 
7756         since assemblies can't be unloaded.
7757         
7758 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
7759
7760         * cpu-amd64.md: Fix more instruction lengths.
7761
7762         * cpu-amd64.md: Fix lengths of some instructions.
7763
7764 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
7765
7766         * inssel.brg: Make the array ldelema check aot friendly.
7767
7768 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
7769
7770         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
7771
7772         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
7773
7774 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
7775
7776         * mini-x86.c: Fix build.
7777
7778         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
7779         mono_type_get_underlying_type () helper function to simplify code.
7780         
7781 2004-09-09  Martin Baulig  <martin@ximian.com>
7782
7783         * mini-amd64.c: Don't access `type->data.klass' directly, call
7784         mono_class_from_mono_type() instead since the type may be a
7785         generic instance.
7786
7787 2004-09-09  Martin Baulig  <martin@ximian.com>
7788
7789         * mini-amd64.c (get_call_info): Fix support for generic instances.
7790         (add_valuetype): Use mono_class_from_mono_type() to get the class
7791         since we can be a generic instance.
7792
7793 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
7794
7795         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
7796
7797 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
7798
7799         * liveness.c: reset spill costs on each scan: bug 62107
7800
7801 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
7802
7803         * exceptions-sparc.c (mono_arch_find_jit_info): remove
7804         unnecessary line that doesn't compile
7805
7806 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
7807
7808         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
7809         trampolines, make them call an error function so people can fix their
7810         code.
7811
7812 2004-09-06  Martin Baulig  <martin@ximian.com>
7813
7814         * mini.c (mono_method_to_ir): When initializing locals, handle a
7815         generic instances like a valuetype if it's a valuetype and like a
7816         class if it's a class.
7817
7818 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7819
7820         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
7821         stack. Fixes #64674.
7822
7823         * exceptions.cs: Add test for unwinding of call arguments.
7824
7825 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
7826
7827         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
7828         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
7829         set the carry/borrow flag). The sparc and s390 implementations
7830         can now use optimized versions (and simplify the code). ppc bugfixes.
7831
7832 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
7833
7834         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
7835
7836 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
7837
7838         * inssel-amd64.brg: Remove leftover 32 bit rule.
7839
7840         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
7841
7842 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
7843
7844         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
7845         mono_arch_find_jit_info functions into a new function. Fix a memory
7846         leak.
7847
7848         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
7849         refactored code.
7850         
7851 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
7852
7853         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
7854         as well.
7855         
7856         * exceptions.cs: Add array size tests.
7857
7858         * mini.c: Allocate a separate icall wrapper for each arity of 
7859         mono_array_new_va. Fixes #59509.
7860
7861         * exceptions.cs: Add testcase for 64578.
7862
7863         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
7864
7865         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
7866         
7867 2004-09-02  Martin Baulig  <martin@ximian.com>
7868
7869         * mini.c (mono_method_to_ir): When initializing the locals, call
7870         handle_initobj() on the generic instance itself, not its
7871         underlying type.
7872
7873 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
7874
7875         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
7876         MonoJitInfo for dynamic methods.
7877
7878         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
7879
7880         * mini.c: Add support for freeing JIT data for dynamic methods.
7881         
7882 2004-09-01  Martin Baulig  <martin@ximian.com>
7883
7884         * mini-x86.c (is_regsize_var): Added support for generic
7885         instances.
7886         (mono_arch_emit_prolog): Make this compile again, use
7887         `x86_push_imm_template (code)'.
7888
7889 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
7890
7891         * mini-x86.c: make all push_imm instructions that get
7892         patched always emit the long form
7893
7894 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
7895
7896         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
7897         in a per-domain hash.
7898
7899         * mini-amd64.c (merge_argument_class_from_type): Handle generic
7900         types.
7901
7902 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
7903
7904         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
7905         work.
7906         
7907         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
7908         work.
7909
7910         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
7911         Beginnings of SSE2 support.
7912
7913         * exceptions.cs: Add more tests for checked int<->uint casts.
7914
7915 2004-08-28  Martin Baulig  <martin@ximian.com>
7916
7917         * mini-x86.c (mono_arch_instrument_epilog): Added support for
7918         generic instances.
7919
7920         * mini.c
7921         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
7922         Handle generic instances recursively.
7923
7924 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
7925
7926         * iltests.il: test for conv.u8 on a constant
7927
7928 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
7929
7930         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
7931         LCONV_x4 (shrun_32 (membase)).
7932
7933 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
7934
7935         * inssel-x86.brg: c&p rules for push/setret of long
7936
7937 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
7938
7939         * inssel-x86.brg: c&p rules for compare (base, regvar) and
7940         compare (regvar, base)
7941
7942         * inssel-x86.brg: more burg love
7943
7944         * inssel.brg: more cleanup
7945
7946         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
7947
7948 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
7949
7950         * basic-long.cs, basic-calls.cs: new tests for optimization.
7951
7952 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
7953
7954         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
7955         patch.
7956
7957 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
7958
7959         * mini-amd64.c (read_tls_offset_from_method): Add another case.
7960         
7961 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
7962
7963         * inssel.brg (mini_emit_memcpy): use 
7964         NO_UNALIGNED_ACCESS to disable memcpy optimization
7965
7966 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
7967
7968         * mini-amd64.c: Handle generic types in various places.
7969
7970         * mini.c (mono_method_to_ir): Handle generic types in init locals.
7971
7972 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
7973
7974         * mini.c (handle_box): Fix warning.
7975
7976         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
7977
7978         * mini-amd64.h: Enable the emit_state optimization.
7979
7980         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
7981
7982         * mini-amd64.c: Add some new 64 bit peephole opts.
7983
7984         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
7985
7986         * cpu-amd64.md: sreg1 of div instructions must be %rax.
7987
7988         * mini-amd64.c: Register allocator fixes.
7989
7990         * mini.c: Add an optimization to emit_state to avoid allocation of new
7991         registers on some platforms.
7992
7993 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
7994
7995         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
7996
7997         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
7998         allocation. Fixes #63085.
7999
8000         * basic-long.cs: Add new regression test.
8001
8002         * mini-amd64.c: Register allocator improvements.
8003
8004 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
8005
8006         * mini-amd64.c (read_tls_offset_from_method): Add another code
8007         sequence.
8008
8009         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
8010         instruction sequence for nullifying class init trampolines.
8011
8012         * objects.cs: Add new regalloc test.
8013
8014         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
8015
8016 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
8017
8018         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
8019         
8020         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
8021         arguments.
8022
8023         * driver.c: Fix profiling after TLS changes.
8024         
8025         * driver.c (mono_main): Set mono_stats.enabled if needed.
8026
8027         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
8028         CEE_BOX.
8029
8030 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
8031
8032         * mini-x86.c: use a 1 op rather than a 2 op tls access
8033         instruction -> faster.
8034
8035 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
8036
8037         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
8038         x86 backend.
8039
8040 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
8041
8042         * exceptions-sparc.c (throw_exception): fix typo
8043
8044 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
8045
8046         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
8047         set tree->dreg correctly with tls. Allow any
8048         register to be used.
8049
8050         * mini-x86.c (read_tls_offset_from_method): add new code
8051         generation pattern seen with GCC.
8052
8053
8054 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
8055
8056         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
8057         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
8058         exceptions-sparc.c: fix some performance issues in exception
8059         handling and setting of the stack trace for exceptions that were
8060         already thrown.
8061
8062 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
8063
8064         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
8065         x86 backend.
8066         
8067         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
8068         registers.
8069
8070 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
8071
8072         This patch inlines tls access, when possible.
8073         
8074         * mini.h: new arch functions for TLS intrinsics.
8075         All platforms updated with a stub.
8076
8077         * mini.c: use the new intrinsics
8078
8079         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
8080         arch specific intrinsic for tls variables
8081
8082 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
8083
8084         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
8085         under windows.
8086
8087 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
8088
8089         * mini.c: thread local allocation
8090
8091 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
8092
8093         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
8094
8095         * Makefile.am: Link against the static version of libmonogc.
8096         
8097         * Makefile.am: Link the static versions of the convenience libraries
8098         into the mono executable.
8099
8100         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
8101
8102 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
8103
8104         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
8105         on integer overflow.
8106
8107         * mini-amd64.c: Reorganize function call code.
8108
8109         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
8110
8111 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
8112
8113         * inssel-x86.brg: use xor eax,eax.
8114         
8115         * basic.cs: new tests
8116
8117 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
8118
8119         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
8120         in exception throwing code.
8121         
8122 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
8123
8124         * inssel-x86.brg: use xor esi,esi.
8125
8126 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
8127
8128         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
8129         can trace methods compiled during mini_init () too.
8130
8131         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
8132         CEE_CONV_U4.
8133
8134 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
8135
8136         * Makefile.am: static link on x86 (r=zoltan)
8137
8138 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
8139
8140         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
8141         code since it causes some programs to fail.
8142
8143 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
8144
8145         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
8146
8147 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
8148
8149         * mini.c: ovfops_op_map - add STACK_OBJ case for
8150         CONV_I 
8151         * basic.cs: add test_0_pin_string as test
8152         case for above.
8153
8154 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
8155
8156         * Makefile.am: build C# if srcdir != builddir
8157
8158 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
8159
8160         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
8161         fall-through blocks.
8162
8163 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8164
8165         * driver.c: enable loop by default again and include abcrem in -O=all.
8166
8167 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
8168
8169         * iltests.il: Add some localloc tests.
8170
8171         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
8172
8173         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
8174         Fixes #62574.
8175
8176         * inssel-amd64.brg: Add some optimizations.
8177
8178         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
8179         for gcc-3.4.
8180
8181         * Makefile.am: Statically link mono against libmono on AMD64.
8182         
8183         * mini-amd64.c inssel-amd64.brg: Optimizations.
8184
8185 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
8186
8187         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
8188
8189         * tramp-amd64.c: Patch calling code in trampolines.
8190
8191 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
8192
8193         * mini-amd64.c: pinvoke struct passing fixes.
8194
8195 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
8196
8197         * mini-sparc.c: redo change, make mono_arch_cpu_init call
8198         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
8199
8200 2004-08-05  Duncan Mak  <duncan@ximian.com>
8201
8202         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
8203         CEE_LDELEM_ANY.
8204
8205 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
8206
8207         * mini-amd64.c (emit_move_return_value): Move return value for normal
8208         calls too.
8209
8210 2004-08-05  Martin Baulig  <martin@ximian.com>
8211
8212         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
8213         `type->type'; just modify `type' itself when dealing with enums
8214         and generic instances.
8215         (check_call_signature): Make `simple_type' a `MonoType *'.
8216
8217 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
8218
8219         * mini.c: Use OP_PADD to add offsets to addresses.
8220
8221         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
8222
8223 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
8224
8225         * mini-sparc.c (mono_arch_emit_epilog): fix check
8226         for folding last op into restore instruction
8227
8228 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
8229
8230         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
8231         helper methods using the code manager.
8232         
8233         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
8234
8235         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
8236
8237 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8238         
8239         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
8240           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
8241
8242         * mini-s390.c: fix tail processing
8243
8244 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
8245
8246         * mini-ppc.c: mul.ovf.un exception name fix.
8247
8248 2004-08-03  Martin Baulig  <martin@ximian.com>
8249
8250         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
8251         instances; before jumping to `handle_enum', also modify `ptype'.
8252
8253 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
8254
8255         * cpu-sparc.md: fcall maximal length too small.
8256
8257 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
8258
8259         * mini-amd64.c mini.h: Add initial support for passing/returning 
8260         structures to/from pinvoked methods.
8261
8262 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
8263
8264         * mini-ppc.c: reg allocator fix.
8265
8266 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
8267
8268         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
8269
8270         * inssel.brg: Optimize memset on 64 bit machines.
8271
8272         * mini-amd64.c: Fix some vararg cases.
8273
8274 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
8275
8276         * mini-s390.c: Corrected macro in emit_float_to_int
8277
8278         * s390-abi.cs: Tests to exercise the s390 ABI
8279
8280 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
8281
8282         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
8283         caller saved regs.
8284
8285         * basic.cs: Add a test for add.ovf.un.
8286
8287 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
8288
8289         * mini-sparc.c: add case for OP_IDIV_UN
8290
8291 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
8292
8293         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
8294         
8295         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
8296
8297 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
8298
8299         * basic.cs: regression tests.
8300
8301         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
8302         regressions.
8303
8304 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
8305
8306         * basic.cs: Add a new test.
8307
8308         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
8309         and AOT. Various fixes and optimizations.
8310
8311         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
8312
8313 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8314
8315         * mini-ppc.c: make sure temp regs are not used for global reg
8316         allocation.
8317
8318 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
8319
8320         * cpu-sparc.md: conv_i8 fix for 64bits
8321
8322         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
8323
8324 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
8325         
8326         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
8327         add opcode for cmp BYTE PTR [eax], imm.
8328
8329         * inssel.brg: Make memcpy and memset takes bases.
8330
8331 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
8332
8333         * *-amd64.*: More AMD64 work.
8334         
8335 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
8336
8337         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
8338         add a compare-not-equal opcode.
8339         
8340 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
8341
8342         * mini.c: Use mono_init_from_assembly instead of mono_init.
8343         
8344 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
8345
8346         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
8347
8348         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
8349
8350         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
8351
8352         * inssel.brg: 64 bit fixes.
8353
8354         * mini.h (MonoCallInst): Add some AMD64 specific data.
8355
8356         * mini.h: Add some OP_P opcodes.
8357
8358 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
8359
8360         * basic.cs: tests for 61797 and 61740
8361
8362 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8363
8364         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
8365         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
8366
8367 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
8368
8369         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
8370
8371         * *-amd64*.*: Ongoing AMD64 work.
8372
8373 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
8374
8375         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
8376
8377         * *-amd64*: Ongoing AMD64 work.
8378
8379         * mini-arch.h: Add AMD64 support.
8380
8381         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
8382
8383         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
8384
8385         * mini-ops.h: Add new opcodes.
8386
8387         * Makefile.am: Add AMD64 support.
8388
8389         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
8390         rules into the inssel-long*.brg files.
8391
8392         * *-amd64.*: Add beginnings of AMD64 backend.
8393
8394 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
8395
8396         * mini.c (print_dfn): commenting out the code that prints
8397         the cil. With -O=deadce, this makes -v -v crash.
8398         
8399         * cpu-pentium.md: make checkthis have a length of 2
8400
8401 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
8402
8403         * mini-sparc.h: fix implementations of __builtin
8404         functions for Sun compiler for V9.
8405
8406 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
8407
8408         * mini.c: use the new stelem.ref wrapper
8409         * exceptions.cs, arrays.cs: new stelem.ref tests
8410
8411 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8412
8413         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
8414         new XSP should work with these changes).
8415
8416 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
8417         
8418         * inssel-{long32,x86,}.brg: trivial optimizations.
8419         
8420 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
8421
8422         * mini.c: load value when emitting box operation in
8423         constrained calls.
8424
8425 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
8426
8427         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
8428         is one byte shorter than cmp DWORD PTR [eax], 0.
8429
8430 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
8431
8432         * inssel-ppc.brg: arguments on the stack are always
8433         relative to the stack pointer (spotted by Neale Ferguson).
8434
8435 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8436
8437         * exceptions-x86.c: delay appending the method name to the trace until
8438         after mono_jit_info_table_find is called, as this gets the real
8439         MonoMethod.
8440
8441 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
8442
8443         * aot.c: register roots
8444
8445 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
8446
8447         * aot.c : I could just use PLATFORM_WIN32 flag.
8448
8449 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
8450
8451         * aot.c : Reverting the previous fix. This time it broke linux build.
8452
8453 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
8454
8455         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
8456
8457 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
8458
8459         * mini.c (handle_stack_args): Remove some more debugging code.
8460         
8461         * mini.c (handle_stack_args): Remove debug output left in by mistake.
8462
8463         * driver.c mini.h aot.c: Allow additional options to be specified with
8464         --aot and pass them to mono_compile_assembly.
8465
8466         * aot.c: Add experimental code to AOT compile all loaded assemblies
8467         on demand and save the code into a cache in the filesystem.
8468
8469         * aot.c: Add support for more wrapper methods.
8470         
8471         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
8472         58863.
8473
8474         * cpu-*.md: Remove removed opcodes.
8475
8476         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
8477         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
8478         related icalls to marshal.c.
8479
8480 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
8481
8482         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
8483
8484         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
8485
8486         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
8487
8488 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
8489         * liveness.c: If liveness is recomputated we need to reset the information
8490         for each variable. This way, if the liveness range has been narrowed
8491         by optimizations that happened after the last computation, we can return
8492         a smaller range.
8493         
8494         For example, if you have
8495         
8496         {
8497                 int i = 0;
8498                 
8499                 // Tons of code that does not affect i
8500                 
8501                 i = foo ();
8502                 ...
8503         }
8504         
8505         i = 0 is dead code and will be removed by SSA. However, when
8506         linear scan gets to the code, i will still appear to be live
8507         throughout the entire block. This prevents good register allocation.
8508
8509 2004-07-06  Martin Baulig  <martin@ximian.com>
8510
8511         * debug-mini.c (mono_debug_init_method): Allow
8512         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
8513         (mono_debug_add_icall_wrapper): New method.
8514
8515         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
8516
8517 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
8518
8519         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
8520         optimization.
8521
8522 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
8523
8524         * aot.c (mono_aot_load_method): Fix loading of debug info.
8525
8526 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
8527
8528         * aot.c: Add logging support.
8529
8530 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
8531
8532         * mini.h: Add prototype for mono_print_method_from_ip.
8533
8534         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
8535
8536         * inssel.brg: 64 bit fixes.
8537
8538         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
8539         inssel-long32.brg.
8540
8541         * Makefile.am: Add SPARC64 support.
8542
8543 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
8544
8545         * aot.c: Fix alignment problems on 32 bit platforms.
8546
8547 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
8548
8549         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
8550         SPARC64.
8551
8552         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
8553         problems.
8554
8555         * mini.h: Bump AOT file version. Some 64 bit fixes.
8556
8557 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
8558
8559         * inssel-sparc.brg: Add new rule to avoid register moves.
8560
8561         * inssel.brg: Add ldind_to_load_membase helper function.
8562
8563 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
8564
8565         * mini.c: OffsetToStringData intrinsic.
8566         
8567 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
8568
8569         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
8570
8571         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
8572         regression tests.
8573
8574         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
8575 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
8576
8577         * mini.c: reinstated mono_compile_get_interface_var()
8578         on x86, too, since the change breaks the Gtk# build there as well.
8579
8580 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
8581
8582         * driver.c: remove loop from the default optimizations: it seems to
8583         interact badly with some of the other options (see bug #60613).
8584
8585 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
8586
8587         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
8588         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
8589
8590 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
8591
8592         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
8593         vararg-using methods.
8594
8595 2004-06-21  Martin Baulig  <martin@ximian.com>
8596
8597         * mini/mini-exceptions.c
8598         (mono_handle_exception): Added `gpointer original_ip' argument.
8599         After calling mono_unhandled_exception(), call
8600         mono_debugger_unhandled_exception() and if that returns true,
8601         restore the context and return.
8602
8603 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8604
8605         * mini-ppc.c: prefer the use of relative branches so
8606         they won't need to be patched in aot code (patch from Patrick Beard).
8607
8608 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
8609
8610         * aot.c: patch from Patrick Beard to make the output assembly
8611         more correct for the MacOSX assembler. Small tweak to
8612         generate sane images on Linux/PPC, too.
8613
8614 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
8615
8616         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
8617         case until bug #59509 is fixed (shows up in #60332).
8618
8619 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
8620
8621         * mini.c: make sure the needed wrappers are compiled, too, with
8622         precomp.
8623
8624 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
8625
8626         * driver.c: remove NPTL reference in --version output.
8627
8628 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
8629
8630         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
8631         generate valid assembly for the Mach-O assembler.
8632
8633 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
8634
8635         * driver.c: don't include abcrem in the all optimization specifier
8636         since it slows down jit compilation too much for now.
8637
8638 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
8639
8640         * mini.c: use BIGMUL only if both operands have the same signage.
8641         * iltests.il: Test for bug 60056. (errors related to signage in
8642         BIGMUL).
8643
8644         r=lupus.
8645
8646 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
8647
8648         * mini.c, aot.c: memory leak fixes.
8649
8650 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8651
8652         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
8653
8654 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
8655
8656         * Makefile.am: remove the -static hack completely, it links in
8657         statically glib as well.
8658
8659 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
8660
8661         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
8662         * exceptions.cs: make it compile with new mcs/csc.
8663
8664 2004-06-03 Massimiliano Mantione <massi@ximian.com>
8665         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
8666         and added relevant test case.
8667
8668 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
8669
8670         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
8671         regressions in gtk-sharp.
8672
8673 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
8674
8675         * exceptions.cs: New regression tests.
8676
8677         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
8678
8679 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
8680
8681         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
8682
8683 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
8684
8685         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
8686
8687         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
8688
8689 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
8690
8691         * mini.c (mono_jit_runtime_invoke): Init class in this
8692         method instead of trusting mono_jit_compile_method to
8693         do the work (because wrappers can be in object class)
8694
8695 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
8696
8697         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
8698
8699         * basic-long.cs: New regression test.
8700
8701 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
8702
8703         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
8704         and div/rem checks.
8705
8706 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
8707
8708         * Makefile.am: fix miguel's change to build mono statically against
8709         libmono (track build dependencies).
8710
8711 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
8712
8713         * cfold.c: Some glib versions do not have G_MININT32.
8714
8715 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
8716
8717         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
8718         with precision of tan, atan, sin and cos, and implemented related
8719         regressions tests (fixes bug 54467, but one new problem appeared and
8720         is not fixed yet).
8721
8722 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
8723
8724         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
8725
8726         * exceptions.cs: Add test for constant folding && division by zero.
8727
8728         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
8729         since driver.c is in libmono too, so the optimization was useless.
8730
8731         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
8732         variable to driver.c so the compiler can emit more efficient code to
8733         access them.
8734
8735 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8736
8737         * Makefile.am: don't distribute generated inssel.[ch] files.
8738
8739 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
8740
8741         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
8742         into the default appdomain. Fixes #58707.
8743
8744         * jit-icalls.c: Remove the broken approximation for truncl, doing
8745         no conversion is better.
8746
8747         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
8748         Fixes #58863.
8749
8750 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
8751
8752         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
8753         of the mcrxr instruction which is not available on some processors
8754         even if it's documented to be. Implement add and sub overflow correctly
8755         (still not complete for long unsigned). Speed up icalls a bit.
8756
8757 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
8758
8759         * mini.c (mono_jit_compile_method_with_opt): Make sure that
8760         we run .cctor in the current domain instead of target_domain.
8761         
8762         Fixes bug #58558, .cctor not being called in -O=shared.
8763
8764 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8765
8766         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
8767
8768 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
8769
8770         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
8771         which can be done with an imm8, do it that way.
8772         (mono_arch_output_basic_block): ditto for a jmp
8773         (mono_arch_emit_prolog): Computate maximum offset of a label.
8774
8775 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
8776
8777         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
8778         now tries to allocate prefered physical reg's for virtual
8779         regs. This reduces the number of emited spills/loads with
8780         20-30% on our core assemblies.
8781
8782 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
8783
8784         * jit-icalls.c: truncl() is not needed and trunc() is
8785         the correct thing to do anyway (bug #58287).
8786
8787 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
8788
8789         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
8790         if available.
8791
8792 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8793
8794         * driver.c: enable loop optimizations by default.
8795
8796 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
8797
8798         * mini-x86.c: fix calc of max loop size when aligning loops start.
8799
8800 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
8801
8802         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
8803         the stack.
8804
8805 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
8806
8807         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
8808         should set carry.
8809
8810         * basic-long.cs: Add tests for add/subtract of immediates with carry.
8811
8812         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
8813         
8814         * mini.c (inline_method): Allways inline some wrappers even if the cost
8815         is too large. Fixes #58785.
8816
8817         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
8818         
8819 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
8820
8821         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
8822         (crichton@gimp.org). Beginning of support for sparc/linux.
8823
8824         * mini-sparc.c: Optimize retrieval of LMF address.
8825
8826 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
8827
8828         * exceptions-ppc.c:  handle alloca in methods with clauses.
8829
8830 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
8831
8832         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
8833
8834 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
8835
8836         * mini.c: Delegate most of the abort signal work to 
8837           mono_thread_request_interruption, which also handles Stop and Suspend
8838           states.
8839
8840 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
8841
8842         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
8843         supports the save/restore lmf opcodes.
8844
8845 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
8846
8847         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
8848         by gcc-3.4 as well.
8849
8850         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
8851
8852 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
8853
8854         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
8855         methods which contain array accesses.
8856
8857         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
8858         boundaries. Fixes #58537.
8859
8860         * iltests.il: Add regression test for #58537.
8861
8862 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
8863
8864         * mini-x86.c (mono_arch_local_regalloc): Last part of
8865         fix for bug #58633 (releasing register to early).
8866
8867 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
8868
8869         * basic-long.cs: Add new regression test.
8870
8871 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
8872
8873         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
8874         register too early on the chain.
8875
8876 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
8877
8878         * mini.c (create_helper_signature): Use a helper function to reduce
8879         the code which needs to be written. Also set the calling convention of
8880         icalls on windows. Fixes #57840.
8881
8882 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
8883
8884         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
8885         exceptions-ppc.c: added helper function to get the instruction address
8886         from a signal handler context.
8887
8888 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
8889
8890         * helpers.c: use g_get_tmp_dir. Invokes happyness 
8891         from gonzalo.
8892
8893 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
8894
8895         * helpers.c: Add new env variable to pass args to objdump.
8896         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
8897
8898 2004-05-17  Radek Doulik  <rodo@ximian.com>
8899
8900         * Makefile.am (common_sources): added abcremoval.h so it get
8901         disted and daily mono packages on go-mono.com will build again
8902
8903 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
8904
8905         * abcremoval.c: Fixed coding style, added copyright header.
8906
8907         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
8908
8909         * mini.h: Added prototype for abc removal main function.
8910
8911         * build_relations_propagation_table.pl: Added copyright header.
8912
8913 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
8914
8915         * basic-long.cs: reg test for complex ceq_long bug.
8916
8917 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
8918
8919         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
8920         reg in long and clob case (bug #58343). Fixed/added comments.
8921
8922 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
8923
8924         * mini.c (mono_jit_runtime_invoke): Follow new convention
8925         of calling the invoke method with an function pointer.
8926
8927 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
8928
8929         * ChangeLog: Fix author of memory leak patch.
8930
8931 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
8932
8933         * Makefile.am: fix make dist as well...
8934
8935
8936 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
8937
8938         * cfold.c: Made so that conversions from pointer to int4 are no-ops
8939         on archs where pointers are 4 bytes long.
8940
8941         * Makefile.am: Added abcremoval.c source file.
8942
8943         * abcremoval.c: Added abcremoval.c.
8944
8945         * abcremoval.h: Added abcremoval.h.
8946
8947         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
8948
8949         * inssel.brg: Enabled bounds check removal.
8950
8951         * mini.c: Added support for abcrem optimization.
8952
8953         * mini.h: Added abcrem optimization label.
8954
8955         * driver.c: Added support for abcrem optimization.
8956
8957         * propagated_relations_table.def: Added propagated_relations_table.def.
8958
8959 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
8960
8961         * mini.c, cfold.c: fix style.
8962
8963 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8964
8965         * mini.c: handle issue with the low-level implementation of
8966         some long opcodes (bug #54209).
8967
8968 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
8969
8970         * basic.cs: test for my new cmov stuff.
8971
8972 2004-05-13      Patrik Torstensson
8973
8974         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
8975         opt and added peephole documentation.
8976
8977 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
8978
8979         * tramp-ppc.c: rewrote the generic trampoline code.
8980
8981 2004-05-11      Patrik Torstensson
8982
8983         * mini-x86.c: optimize long shl/shr asm code (one less branch)
8984
8985 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
8986
8987         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
8988
8989         * mini.h mini.c dominators.c: Applied patch from Derek Woo
8990         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
8991
8992         * mini.c: Add new icalls for AsAny marshalling.
8993
8994 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
8995
8996         * tramp-ppc.c, mini-ppc.c: more cleanups.
8997
8998 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8999
9000         * mini.c: no warnings.
9001
9002 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9003
9004         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
9005
9006 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
9007
9008         * mini.c: In the thread abort signal handler, if the thread is in the
9009         process of being stoped, don't throw the Abort exception, just stop the
9010         thread.
9011
9012 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
9013
9014         * tramp-ppc.c: removed old code.
9015
9016 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9017
9018         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
9019         do some simple speed optimizations on ppc.
9020
9021 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
9022
9023         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
9024         and large offsets in load/store.
9025
9026 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
9027
9028         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
9029         it causes regressions.
9030
9031 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
9032
9033         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
9034         support.
9035
9036 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
9037
9038         * jit-icalls.c: remove warnings.
9039         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
9040         speedups for unsafe code.
9041
9042 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
9043
9044         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
9045
9046 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
9047
9048         * basic-calls.cs: Add new regression test.
9049
9050         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
9051         more portable.
9052
9053         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
9054
9055         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
9056         is no longer used.
9057
9058 2004-05-06      Patrik Torstensson
9059
9060         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
9061         long reg allocation in any reg (not only eax:edx) and implemented 
9062         long shl/shr ops in asm instead of helpers.
9063
9064 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
9065
9066         * mini-sparc.h: Fix warnings.
9067
9068         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
9069         stack.
9070
9071         * mini-exceptions.c (mono_handle_exception): Call the filter in a
9072         separate statement for clarity.
9073
9074         * mini-sparc.c: Update status.
9075
9076 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
9077
9078         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
9079         here.
9080
9081 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
9082
9083         * inssel-ppc.brg: another small pre-release workaround:
9084         we don't do overflow detection for long_sub_un.
9085
9086 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
9087
9088         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
9089         (also works around a weird ppc bug: 57957).
9090
9091 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
9092
9093         * tramp-ppc.c: trampoline fixes.
9094
9095 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
9096
9097         * mini-ppc.c: fixed typos.
9098
9099 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
9100
9101         * mini-ppc.c, exceptions-ppc.c: more code saves registers
9102         at the top of the stack. Fixed typos. Use a frame registers
9103         for all the methods with exception clauses.
9104
9105 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
9106
9107         * exceptions-ppc.c: restore fp registers.
9108
9109 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
9110
9111         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
9112         order from the stack top (moved the stack room to save the
9113         return value for trace after the param area). Fixed corruption
9114         in restoring registers on unwind.
9115
9116 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
9117
9118         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
9119
9120 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
9121
9122         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
9123         and prolog/epilog for methods that use it. Allow
9124         enough param area room for varargs methods. Fix miguel's
9125         breakage in exception handling.
9126
9127 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
9128
9129         * Makefile.am: run genmdesc only on current arch.
9130
9131 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9132
9133         * exceptions-x86.c:
9134         * mini-x86.h: fix the build on windows.
9135
9136 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
9137
9138         * 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.
9139
9140         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
9141
9142         * mini-exceptions.c: New file.
9143         
9144         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
9145         Move some parts of the x86 exception handling code to an 
9146         arch-independent file so it can be shared with other ports.
9147
9148 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
9149
9150         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
9151
9152 2004-04-26  David Waite  <mass@akuma.org>
9153
9154         * driver.c: remove comma from end of enumeration declaration
9155
9156 2004-04-26  Jackson Harper  <jackson@ximian.com>
9157
9158         * driver.c: parse config file before loading first assembly. This
9159         allows the user gac to be enabled/disabled. 
9160         
9161 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
9162
9163         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
9164         simpler mechanism: we do not care what is encoded initially
9165         (branch absolute or relative), we care about the code and its
9166         target.  I kept the old code for reference for now.
9167
9168         The new code tries first to determine if the jump is anywhere in
9169         the -/+32 absolute meg range, if it succeeds, it encodes using the
9170         absolute branch;  If not, it tried to find something in the
9171         relative range, if not, it uses the handle_thunk code. 
9172
9173 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
9174
9175         * exceptions-ppc.c: use the correct ip register on macosx.
9176
9177 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
9178
9179         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
9180
9181 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
9182
9183         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
9184         Raise exception on integer divide by zero by hand since the hw
9185         doesn't support it. Handle NaNs in FP compares.
9186
9187 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
9188
9189         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
9190         code reducing duplication between the platforms and enabled
9191         signal exception handling (on linux for now).
9192
9193 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
9194
9195         * exceptions-ppc.c: more macosx support.
9196
9197 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
9198
9199         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
9200
9201 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
9202
9203         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
9204
9205 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
9206
9207         * iltests.il: more tests.
9208
9209 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
9210
9211         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
9212         vars as well.
9213
9214 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
9215
9216         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
9217
9218 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
9219
9220         * liveness.c: Mark variables as volatile in all basic blocks reachable
9221         from exception clauses.
9222
9223 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
9224
9225         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
9226         inlining.
9227
9228 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
9229
9230         * iltests.il, basic.cs: more tests for regalloc.
9231
9232 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
9233
9234         * iltests.il: Some tests for register allocation modifications
9235         I have locally.
9236
9237 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
9238
9239         * exceptions.cs: Add regression test for bug #56782.
9240
9241         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
9242         original stack trace if an exception is rethrown. Fixes #56782. Oh,
9243         the beauty of fixing the same thing in 5 different files...
9244
9245 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
9246
9247         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
9248         methods.
9249
9250 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
9251
9252         * mini.c: Add support for STRWLPARRAY marshalling convention.
9253
9254 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
9255
9256         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
9257         to init the context to setup the regs pointer).
9258
9259 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
9260
9261         * exceptions-ppc.c: more exceptions work.
9262
9263 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
9264
9265         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
9266         not allowed.
9267
9268 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
9269
9270         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
9271         can use the memory directly.
9272
9273         * cpu-pentium.md: Update documentation from a post from Zoltan. 
9274
9275         add x86_add_membase, x86_sub_membase, x86_mul_membase
9276
9277 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
9278
9279         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
9280         GENERAL_REGS they were also hardcoded for all PPC ports.
9281
9282         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
9283
9284         Remove hard-coded limit for floating point registers, use
9285         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
9286
9287         Notice that in MacOS X calling conventions you can fit a lot more
9288         floating point values in registers, so I should update the PInvoke
9289         test to excercise the passing of floating point values on the
9290         stack (currently broken).
9291         
9292 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
9293
9294         * tramp-ppc.c (create_trampoline_code): Added
9295         JUMP_TRAMPOLINE_SIZE. 
9296         (ppc_magic_trampoline): Follow the pattern from
9297         x86_magic_trampoline: if code is set to zero, return. 
9298         (create_trampoline_code): Always pass MonoMethod to the jump
9299         trampoline, before it was passing a null.
9300         (mono_arch_create_jump_trampoline): Implement the jump stub, could
9301         share the code with mono_arch_create_jit_trampoline. 
9302
9303         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
9304         implemented.
9305         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
9306         implemented.  
9307
9308         * cpu-g4.md: Added length for jmp instruction, the worst case
9309         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
9310         for save_lmf).
9311
9312 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
9313
9314         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
9315
9316 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
9317
9318         * mini.c: Only set bblock->real_offset when adding a new bblock, and
9319         before each IL instruction.
9320
9321         * mini.c (CEE_BOX): Fix warnings.
9322
9323 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9324
9325         * mini.c: removed a few unused vars and extra whitespace.
9326
9327 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
9328
9329         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
9330         checks.
9331         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
9332         index.
9333         (OP_GETCHR): use the above
9334         (CEE_LDELEMA): use the above.
9335
9336         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
9337         version of the generic impl.
9338         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
9339         (CEE_LDELEMA): use the above.
9340
9341 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
9342
9343         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
9344         Fixes #56317.
9345
9346         * iltests.il: Added new regression test for #56317.
9347
9348 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
9349
9350         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
9351         under NetBSD. Fixes #56450.
9352
9353         * liveness.c (update_gen_kill_set): Fix previous patch.
9354
9355 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9356
9357         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
9358
9359 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
9360
9361         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
9362         ldsfld and ldsflda.
9363
9364         * inssel-sparc.brg: Add more optimizations.
9365
9366         * mini-sparc.c: Replace multiply/divide with shifts if possible.
9367
9368 2004-04-01  Martin Baulig  <martin@ximian.com>
9369
9370         * mini.c (handle_box): New static function; moved the
9371         implementation of CEE_BOX here.
9372         (mono_method_to_ir): Added `constrained_call' variable.
9373         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
9374         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
9375         mono_method_get_constrained() to get the method.
9376
9377 2004-04-01  Martin Baulig  <martin@ximian.com>
9378
9379         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
9380         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
9381         (mono_method_to_ir): We don't need these macros anymore since
9382         mono_class_get_full() already takes care of it. 
9383
9384 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9385
9386         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
9387         use @function (as doesn't accept #function here) and check the return
9388         value of system and stop if fails.
9389
9390 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9391
9392         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
9393
9394 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
9395
9396         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
9397
9398         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
9399
9400         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
9401         #56223.
9402
9403         * basic-long.cs: Add test for negation of Int64.MinValue.
9404
9405 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
9406
9407         * mini-sparc.c: Update status.
9408
9409         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
9410
9411         * exceptions-sparc.c: Fix return value in filters.
9412
9413         * inssel-sparc.brg: Fix register allocation in some rules.
9414
9415 2004-03-28  Martin Baulig  <martin@ximian.com>
9416
9417         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
9418         if neccessary.  
9419
9420 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
9421
9422         * mini-x86.c (mono_arch_patch_code): Fix warnings.
9423         
9424         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
9425         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
9426         remove unused conv_u4 opcode.
9427
9428         * mini-x86.c: Remove valgrind workaround since it slows down things
9429         even when mono is not run under valgrind.
9430
9431 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
9432
9433         * mini-sparc.c: Update status.
9434
9435         * inssel-sparc.brg: Add some optimizations.
9436
9437         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
9438         future delay slot filling. Add support for varargs, tail calls and JMP.
9439
9440         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
9441         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
9442
9443         * inssel.brg: Fix register allocation in OP_ARGLIST.
9444
9445         * inssel.brg: Fix warnings.
9446
9447 2004-03-25  Martin Baulig  <martin@ximian.com>
9448
9449         * mini.c (inflate_generic_field): Removed.
9450         (mini_get_method): Removed, use mono_get_method_full(),
9451         (mini_get_class): Removed, use mono_class_get_full().
9452         (mono_method_to_ir): Pass our generic context to
9453         mono_field_from_token().        
9454
9455 2004-03-25  Martin Baulig  <martin@ximian.com>
9456
9457         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
9458         of a `MonoMethod *'.
9459         (mini_get_method): Take a `MonoGenericContext *' instead
9460         of a `MonoMethod *'.
9461         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
9462         a new local variable called `generic_context' which holds the
9463         current `MonoGenericContext *'; use it to lookup things.
9464
9465 2004-03-24  Martin Baulig  <martin@ximian.com>
9466
9467         * mini.c (mini_get_class): New static method; if we're inside a
9468         generic instance, inflate the class if neccessary.
9469         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
9470
9471 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
9472
9473         * iltests.il: New regression test for #55976.
9474
9475         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
9476         #55976.
9477
9478 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
9479
9480         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
9481         output.
9482
9483 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
9484
9485         * liveness.c: Consider SSA stores as well as loads when making vars
9486         volatile.
9487
9488         * exceptions.cs: New regression tests for register allocation.
9489         
9490 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
9491
9492         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
9493         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
9494           domain lock only to protect puntual access to data structures.
9495           Added access lock for sighash, jit_icall_hash_name, 
9496           jit_icall_hash_addr and domain->code_mp.
9497
9498 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
9499
9500         * driver.c: Print SIGSEGV handling method.
9501
9502         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
9503
9504         * mini.c (setup_jit_tls_data): Handle case when this is called
9505         multiple times for a thread.
9506
9507         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
9508         is different from fbxx_un. Fixes #54303. Also use constants instead of
9509         magic numbers in a lot of places.
9510
9511 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
9512
9513         * exceptions.cs: Fix cctor test when --regression is used.
9514
9515 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
9516
9517         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
9518         for Linux/ppc.
9519
9520 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
9521
9522         * inssel-ppc.brg: fixed register assignments for some rules.
9523
9524 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
9525
9526         * exceptions.cs: Add test for exceptions in static constructors.
9527
9528         * mini.c (mono_jit_compile_method_with_out): Move the calling of
9529         static constructors outside the domain lock. Fixes #55720.
9530
9531 2004-03-17  Martin Baulig  <martin@ximian.com>
9532
9533         * mini.c (get_generic_field_inst): Removed, this'll never happen.
9534         (inflate_generic_field): Take the `MonoMethod *' instead of the
9535         `MonoClass *' and added support for generic method.
9536         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
9537         have a `field->parent->gen_params', only inflate the field if it's
9538         an open constructed type.
9539
9540 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
9541
9542         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
9543         exception object instead of the preconstructed ones.
9544
9545 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9546
9547         * mini.c: reverted changed to sigsegv_signal_handler commited
9548         accidentally in the previous patch.
9549
9550 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9551
9552         * mini.c:
9553         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
9554         running --aot with an old assembly.
9555
9556 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
9557
9558         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
9559         point values.
9560
9561         * mini-sparc.c: Add support for v9 branches with prediction.
9562
9563 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
9564
9565         * mini.c (mini_init): #warning is GNUC only
9566
9567         * mini-sparc.h: implement __builtin_frame_address
9568         and __builtin_return_address for Sun C compiler
9569
9570 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
9571
9572         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
9573
9574 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
9575
9576         * basic-calls.cs: Add test for unaligned byref long argument passing.
9577
9578         * mini-ops.h: Add sparcv9 compare and branch instructions.
9579
9580         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
9581         v9 instructions if we have a v9 cpu.
9582
9583         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
9584         registers for global allocation.
9585
9586         * exceptions-sparc.c: Fixes.
9587         
9588 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
9589
9590         * liveness.c (mono_analyze_liveness): Optimized version.
9591
9592         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
9593
9594         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
9595         sparc work.
9596
9597         * basic-float.cs basic-calls.cs: New regression tests.
9598
9599 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
9600
9601         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
9602         sigaltstack implementation.
9603
9604         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
9605         
9606         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
9607         stuff if SIGSEGV_ON_ALTSTACK is not defined.
9608
9609 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
9610
9611         * mini.c: Fix warnings.
9612         
9613         * mini.c (mono_resolve_patch_target): New function which contains the
9614         arch independent part of the patching process.
9615
9616         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
9617         patching code to a separate function.
9618
9619 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
9620
9621         * mini.c (add_signal_handler): ifdef out on Windows
9622
9623 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
9624
9625         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
9626         cpu-sparc.md: Add exception handling support + other fixes.
9627
9628         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
9629         typed GC detection in --version.
9630
9631         * basic.cs exceptions.cs: New regression tests.
9632
9633         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
9634         the arch specific code can store data during a compilation.
9635
9636         * mini-ops.h: Add OP_SETFRET.
9637
9638         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
9639         function, register a separate icall for each arity, so the icalls can
9640         get a wrapper.
9641         
9642         * mini.c (mono_print_tree): Print negative offsets in a more readable
9643         form.
9644         
9645         * mini.c: Make signal handling work on sparc.
9646         
9647         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
9648
9649         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
9650
9651         * jit-icalls.c: Emulate truncl by aintl on solaris.
9652
9653         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
9654
9655 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
9656
9657         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
9658
9659 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
9660
9661         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
9662         a MarshalByRef type, inline a method that performs the check, taking into
9663         account that the object can be a proxy. Also implemented tow new opcodes:
9664         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
9665         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
9666         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
9667
9668 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
9669
9670         * mini-ppc.c: if a relative branch displacement is too big
9671         but it points to and area reachable with an absolute branch, 
9672         avoid the thunks.
9673
9674 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
9675
9676         * mini.c: optimize small copies in cpblk.
9677
9678 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
9679
9680         * basic-calls.cs basic-float.cs: New regression tests.
9681
9682         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
9683         negative offsets from %fp. Implement localloc. Fix local register 
9684         allocation. Fix the case when the this argument needs to be saved to
9685         the stack. Implement some missing opcodes.
9686
9687 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
9688
9689         * mini.c (mini_method_compile): Reenable global regalloc in methods
9690         with exception handlers.
9691
9692         * linear-scan.c (mono_varlist_sort): Fix warning.
9693
9694         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
9695
9696         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
9697         regalloc costs.
9698
9699         * liveness.c: Make all variables uses in exception clauses volatile, to
9700         prevent them from being allocated to registers. Fixes #42136.
9701
9702 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
9703
9704         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
9705         causes regressions.
9706
9707         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
9708         argument to mono_arch_regalloc_cost.
9709
9710         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
9711         precisely.
9712
9713 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
9714
9715         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
9716         Make the cost of allocating a variable to a register arch dependent.
9717
9718         * basic-calls.cs: Fix compilation of tests.
9719         
9720         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
9721         helper function to cut back on the number of #ifdefs needed.
9722
9723         * mini-ppc.c: Fix compilation.
9724
9725         * basic-calls.cs: New regression tests.
9726
9727         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
9728
9729         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
9730         of l0 since that is callee saved.
9731
9732         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
9733         to virtual calls.
9734
9735         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
9736         of delay instruction.
9737
9738         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
9739
9740         * mini.h (MonoCallInst): Add 'virtual' flag.
9741
9742         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
9743
9744 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
9745
9746         * *.cs: New regression tests.
9747
9748         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
9749         work.
9750
9751         * mini.c (mono_runtime_install_handlers): Fix build.
9752
9753         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
9754         'signal_stack_size' members.
9755
9756         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
9757         alternate signal stack.
9758
9759         * exceptions-x86.c: Add stack overflow handling.
9760
9761         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
9762         functions to arch independent code.
9763
9764         * mini.c (mono_print_tree): Print more detailed info for load_membase
9765         opcodes.
9766         
9767 2004-02-23  Martin Baulig  <martin@ximian.com>
9768
9769         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
9770
9771 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
9772
9773         * mini-x86.c: fixed reg allocation for div/rem.
9774
9775 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
9776
9777         * driver.c (mono_main): Report some configuratio options on --version.
9778
9779 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
9780
9781         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
9782         low in the address space. Correctly flush memory in thunks where we
9783         output native code.
9784
9785 2004-02-20  Martin Baulig  <martin@ximian.com>
9786
9787         * mini.c (mini_get_method): New static method; inflate all generic
9788         methods and methods in open generic instances.
9789         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
9790         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
9791
9792 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
9793
9794         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
9795
9796         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
9797
9798 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
9799
9800         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
9801
9802         * mini-sparc.c (flushi mono_arch_output_basic_block): make
9803         it compile using Sun's compiler.
9804
9805 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
9806
9807         * 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.
9808
9809         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
9810
9811 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
9812
9813         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
9814         code.
9815         * mini-ppc.c: handle calls outside of the allowed range with thunks
9816         allocated using the code manager.
9817         * tramp-ppc.c: use the code manager to hold generated native code.
9818         Fixed the magic trampoline to just patch vtable entries.
9819
9820 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
9821
9822         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
9823         independent file.
9824
9825 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
9826
9827         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
9828         PPC.
9829
9830         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
9831         if we have a working __thread implementation.
9832
9833         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
9834         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
9835
9836 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
9837
9838         * mini-x86.c: Fix compilation under gcc 2.
9839         
9840 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
9841
9842         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
9843         contains a call to the wrapped function.
9844
9845         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
9846         OP_<CALL>_IMM opcodes, and use them under X86.
9847         
9848         * mini.c (mono_jit_find_compiled_method): Fix warning.
9849
9850         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
9851
9852         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
9853
9854         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
9855         functionality to mini.c.
9856
9857         * mini.c (mono_create_jump_trampoline): New function to create a jump
9858         trampoline. Return a compiled method instead of a trampoline if it
9859         exists. Add a cache for jump trampolines.
9860
9861         * mini.c (mono_jit_find_compiled_method): New function to return a
9862         compiled method if it exists.
9863
9864         * mini-x86.c: Call mono_create_jump_trampoline instead of 
9865         mono_arch_create_jit_trampoline.
9866
9867         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
9868         a jump trampoline. Fixes #52092.
9869         
9870 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
9871
9872         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
9873         which is not up-to-date. Add check_corlib_version () instead.
9874
9875         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
9876         have to call it.
9877         
9878         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
9879         since newer valgrind versions do not need it.
9880
9881         * mini.c (mono_jit_compile_method_with_opt): New helper function to
9882         compile a method with a given set of optimizations.
9883
9884         * mini.c: Compile icall wrappers on-demand instead of at startup.
9885
9886         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
9887         wrapper for an icall.
9888
9889 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
9890
9891         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
9892         #54063.
9893
9894         * iltests.il: Add test for non-empty stack before switch instruction.
9895
9896 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
9897
9898         * mini.c: Add support for new stringbuilder marshalling conventions.
9899
9900         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
9901
9902 2004-02-01  Martin Baulig  <martin@ximian.com>
9903
9904         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
9905         in `ginst->mtype_argv'.
9906
9907 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
9908
9909         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
9910         facilitate grepping.
9911
9912 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
9913
9914         * mini.c: fixed buglet in initobj generic implementation for references.
9915
9916 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
9917
9918         * Makefile.am: make the version script conditional.
9919         * jit-icalls.c: handle missing truncl().
9920
9921 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
9922
9923         * exceptions.cs: Add more tests for double->int conversion.
9924
9925         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
9926         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
9927
9928 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
9929
9930         * driver.c: make --verbose --version emit an error
9931         if the loaded corlib doesn't match the runtime version.
9932
9933 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
9934
9935         * mini-ppc.h: export ppc_patch().
9936         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
9937         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
9938         on par or better than on MacOSX.
9939
9940 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
9941
9942         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
9943         mono_lookup_pinvoke_call.
9944
9945         * mini-x86.c: Under windows, the default pinvoke calling convention is
9946         stdcall. Fixes #52834.
9947
9948         * mini.c (optimize_branches): Add an upper bound to the number of
9949         iterations to prevent infinite loops on strange loops. Fixes #53003.
9950
9951 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
9952
9953         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
9954         and ISINST. Fixes #52093.
9955
9956         * objects.cs (test_0_vector_array_cast): New tests.
9957         
9958 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
9959
9960         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
9961         checking in Array.Set ().
9962
9963         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
9964         #52590.
9965
9966         * object.cs (test_0_multi_array_cast): New regression test.
9967
9968 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
9969
9970         * exceptions-ppc.c: fix build on Linux/PPC.
9971
9972 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
9973
9974         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
9975         running under valgrind.
9976         (x86_magic_trampoline): Fix build bustage.
9977
9978         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
9979         negative values as well. This is needed for the encoding of the line number
9980         info, since sometimes the line numbers are not in increasing order.
9981
9982 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
9983
9984         * cpu-pentium.md (localloc): Increase the size of the localloc 
9985         instruction since it is a loop under Win32.
9986
9987         * debug-mini.c (record_line_number): Get rid of unneccesary memory
9988         allocation.
9989
9990 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
9991
9992         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
9993         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
9994         Max Horn (max@quendi.de). Fix file names in comments.
9995
9996 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
9997
9998         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
9999         avoid stack overflow.
10000         (replace_usage): Avoid uninitialized variable warnings.
10001
10002         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
10003         and taking the address of valuetype variables.
10004
10005 2004-01-03  Patrik Torstensson
10006
10007         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
10008         for other purposes than FP later on.
10009
10010 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
10011
10012         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
10013         of tail calls.
10014
10015 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
10016
10017         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
10018
10019 2003-12-30  Patrik Torstensson <p@rxc.se>
10020
10021         * mini-x86.h: Decreased number of availiable fp regs.
10022         Solves corner cases with FP spilling.
10023
10024 2003-12-23  Patrik Torstensson <p@rxc.se>
10025
10026         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
10027         for floating point stack tracking / spilling on x86. 
10028         Fixes bug #49012.
10029         
10030         * basic-float.cs: added float mul overflow test.
10031
10032 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
10033
10034         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
10035
10036 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
10037
10038         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
10039         supports for cond branches that overflow the immediate
10040         overflow offset. mcs can compile simple programs.
10041
10042 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
10043
10044         * exceptions-ppc.c: exception handling support wip:
10045         finally handlers get run on exception.
10046
10047 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
10048
10049         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
10050         profiling.
10051
10052 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
10053
10054         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
10055         initial support for stack walking and unwinding.
10056
10057 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
10058
10059         * driver.c (mono_main): Make corlib-out-of-sync message more 
10060         descriptive. Also remove verify_corlib call.
10061
10062 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
10063
10064         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
10065         not overlap with other call's arguments, too.
10066
10067 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
10068
10069         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
10070         move to arch-specific code the choice of arch-specific
10071         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
10072         * mini.c: ensure emulation calls will not interleave
10073         with other calls.
10074
10075 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
10076
10077         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
10078         the magic trampoline stack frame is dropped before executing
10079         the new method.
10080
10081 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
10082
10083         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
10084         and integer to fp conversions. Added support for overflowing
10085         arguments on the stack. Reserve a couple more registers as temps.
10086         Added support for aot compilation (as output still needs to be
10087         tweaked, though).
10088
10089 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
10090
10091         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
10092         Don't overwrite return register in some corner cases.
10093
10094 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
10095
10096         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
10097         static constructors when AOT compiling.
10098
10099         * driver.c (mono_main): Call mono_check_corlib_version.
10100
10101 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
10102
10103         * cpu-g4.md, basic.cs: fixed div target register.
10104
10105 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
10106
10107         * mini-ppc.c, basic.cs: shl_imm fix with test.
10108
10109 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
10110
10111         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
10112         structures by value. Misc fixes.
10113         * objects.cs: more tests.
10114
10115 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
10116
10117         * mini-ppc.c: lconv.ovf.i implemented.
10118
10119 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10120
10121         * mini.c:
10122         (mini_init): don't error out if someone already called g_thread_init.
10123
10124 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
10125
10126         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
10127         to be any type per the spec. Fix abnormal memory usage when
10128         the same object is repeatedly thrown.
10129
10130 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
10131
10132         * mini.c: check for overruns in IL code.
10133
10134 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
10135
10136         * TODO: Add/remove some todo entries.
10137
10138 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
10139
10140         * driver.c (mono_main): Call mono_verify_corlib.
10141
10142 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
10143
10144         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
10145         This has been moved to mini.c
10146         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
10147         type being casted is marshalbyref it could be a proxy, so instead of
10148         emitting the type check code, emit a call to a runtime method that will
10149         perform the check by calling CanCastTo if needed.
10150
10151 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
10152
10153         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
10154         methods with large stack frames under Win32.
10155
10156 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
10157
10158         * Makefile.am: Distribute regression tests.
10159
10160         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
10161         at the end instead of inserting each variable into the sorted list.
10162
10163         * linear-scan.c (mono_varlist_sort): New helper function.
10164         
10165 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
10166
10167         * mini.c: ensure arguments and locals are within bounds.
10168
10169 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
10170
10171         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
10172         related fixes.
10173
10174 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
10175
10176         * mini.c (mono_cprop_copy_values): Fix crash.
10177
10178         * aot.c: Set verbosity back to 0.
10179         
10180 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
10181
10182         * regalloc.c: complete memory leak fix by Laurent Morichetti
10183         (l_m@pacbell.net).
10184
10185 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
10186
10187         * driver.c (main_thread_handler): Revert the previous patch.
10188
10189         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
10190         under valgrind.
10191
10192         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
10193         memory from the memory pool.
10194
10195         * driver.c (main_thread_handler): Turn on all optimizations when
10196         --aot is used.
10197
10198         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
10199         an array for better performance.
10200
10201         * regalloc.c (mono_regstate_assign): Fix memory leak.
10202
10203         * debug-mini.c (mono_debug_serialize_debug_info): New function to
10204         serialize the debug info.
10205
10206         * debug-mini.c (mono_debug_add_aot_method): New function to load the
10207         debug info from the serialized representation.
10208
10209         * aot.c: Save debug info into the generated file and load it when 
10210         loading a method.
10211
10212         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
10213
10214 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
10215
10216         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
10217         More FP-related fixes.
10218
10219 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
10220
10221         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
10222         and register allocation buglet. Hello world now runs.
10223
10224 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
10225
10226         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
10227         * tramp-ppc.c: fixed class init trampoline.
10228         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
10229
10230 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
10231
10232         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
10233         mini.c: more ppc changes/fixes.
10234
10235 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
10236
10237         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
10238         Also optimize the case when the arguments are the same in the caller 
10239         and in the callee.
10240
10241         * iltests.il: Add tests for tail calls with valuetype arguments.
10242
10243 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
10244
10245         * mini-ppc.c: fixes for struct return type.
10246
10247 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
10248
10249         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
10250         mono_spillvar_offset() to arch-specific code.
10251
10252 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
10253
10254         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
10255
10256 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
10257
10258         * exceptions-x86.c: Fix stack space leaks.
10259         
10260         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
10261         registers from the lmf if the method has save_lmf set.
10262
10263 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
10264
10265         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
10266         of icall wrappers into InvokeInDomain, since these are now per-domain.
10267
10268 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
10269
10270         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
10271         make some opcode emulation and intrinsic ops enabled/disabled 
10272         according to the architecture. More fixes.
10273
10274 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
10275
10276         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
10277
10278 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
10279
10280         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
10281         arch-specific handling for 'this' and struct return type to
10282         arch-specific code.
10283
10284 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10285
10286         * aot.c: prevent divide by zero error when reporting (it happened with
10287         Accessibility.dll).
10288
10289 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
10290
10291         * mini.h (inst_switch): Remove unused macro.
10292
10293 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10294
10295         * aot.c:
10296         (load_aot_module): free 'info->methods' and 'info' properly. No more
10297         "free(): invalid pointer blah" messages when you have an old aot
10298         compiled assembly.
10299
10300 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
10301
10302         * jit-icalls.c, mini.c: Added support for context static fields.
10303
10304 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
10305
10306         * mini.c (mono_method_blittable): Methods which set LastError are not 
10307         blittable either. Fixes #51108.
10308         
10309 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
10310
10311         * mini.c: flush icache.
10312         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
10313
10314 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
10315
10316         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
10317
10318 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
10319
10320         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
10321         safe on IA32.
10322
10323         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
10324         vararg calls.
10325
10326         * inssel.brg (CEE_MKREFANY): Fix AOT case.
10327
10328 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
10329
10330         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
10331         instruction when the result is discarded.
10332
10333         * iltests.il (test_0_div_regalloc): New regression test.
10334
10335         * arrays.cs: Fix compilation error.
10336
10337 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
10338
10339         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
10340         float rules to inssel-x86.brg: sane architectures with FP registers
10341         don't need to implement these rules.
10342
10343 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
10344
10345         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
10346
10347 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
10348
10349         * mini.h, inssel-long32.brg: fixed endianess issues in int64
10350         implementation of 32 bit systems.
10351
10352 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
10353
10354         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
10355         (Jeroen Zwartepoorte).
10356
10357 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
10358
10359         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
10360         the caller and the callee matches.
10361         
10362         * mini.c (mono_method_to_ir): Add comment.
10363
10364         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
10365         signbit is missing on some platforms.
10366
10367 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
10368
10369         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
10370
10371         * mini.c (setup_jit_tls_data): Call the new function.
10372         
10373         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
10374
10375         * mini-x86.c: Add experimental support for fast access to the lmf
10376         structure under NPTL/Linux 2.6.x.
10377
10378 2003-11-06  Martin Baulig  <martin@ximian.com>
10379
10380         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
10381         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
10382         the debugger.
10383
10384 2003-11-02  Martin Baulig  <martin@ximian.com>
10385
10386         * mini.c (inflate_generic_field): New static method.
10387         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
10388         generic instance and the field is declared in a generic type, call
10389         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
10390
10391 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
10392
10393         * mini.h mini.c (mono_method_same_domain): New function to return
10394         whenever the caller and the callee are in the same domain.
10395
10396         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
10397
10398 2003-10-30  Martin Baulig  <martin@ximian.com>
10399
10400         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
10401         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
10402         method parameters.
10403         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
10404         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
10405
10406 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
10407
10408         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
10409         propagation.
10410
10411         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
10412         object here, so it is in the correct appdomain etc.
10413
10414 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
10415
10416         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
10417         already done.
10418         (mono_method_to_ir): Avoid freeing the type created returned from
10419         mono_type_create_from_typespec, since it is put into an internal cache
10420         by the function. Fixes pointer.exe.
10421
10422         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
10423         trampolines for icalls and pinvokes as well. Fixes #33569.
10424
10425 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
10426
10427         * mini.c: Update after appdomain changes.
10428
10429         * mini.c (mono_jit_compile_method_inner): Allways compile native
10430         method wrappers in the root domain, since there can only be one
10431         instance of them, whose address is stored in method->info.
10432
10433 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
10434
10435         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
10436         environment variable. Instead detect automatically whenever running
10437         under valgrind using the magic macro RUNNING_ON_VALGRIND from
10438         valgrind.h.
10439
10440 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
10441
10442         * trace.c, trace.h: New files that implement the new trace option
10443         parsing. 
10444
10445         * driver.c: Document new --trace options.
10446
10447         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
10448         mini-x86.c: Apply:
10449
10450         -       if (mono_jit_trace_calls)
10451         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
10452
10453         * mini.h: prototypes.
10454         
10455 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
10456
10457         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
10458
10459         * mini.c inssel.brg: Implement typedefbyref opcodes.
10460
10461         * mini.c (mono_jit_compile_method): Remove unused local variable.
10462
10463         * mini.c (mono_jit_compile_method_inner): Ditto.
10464         
10465 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
10466
10467         * tramp-x86.c (x86_class_init_trampoline): Fix build.
10468         
10469         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
10470
10471 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
10472
10473         * mini.c (mono_no_aot): Remove unused global variable.
10474
10475         * mini.c: Thread safety fixes.
10476
10477 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
10478
10479         * mini.c (mono_create_class_init_trampoline): Add a lock around
10480         class_init_hash_addr.
10481
10482         * arrays.cs (test_0_newarr_emulation): Add new regression test for
10483         #30073.
10484
10485         * mini.c: Decompose the NEWARR instruction before decomposing its
10486         arguments. Fixes #30073.
10487
10488 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
10489
10490         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
10491         convention.
10492
10493 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
10494
10495         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
10496
10497         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
10498
10499         * driver.c: Add support for compiling icall wrappers to --compile.
10500
10501 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
10502
10503         * inssel.brg: The empty value in class->interface_offsets is -1, not
10504         0. Fixes #49287.
10505
10506 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
10507
10508         * objects.cs: New test for 'is' operator on an array of interfaces.
10509
10510 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
10511
10512         * tramp-ppc.c: update trampoline code to support jumps
10513         and class initialization.
10514
10515 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
10516
10517         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
10518
10519         * inssel.brg (OP_UNBOXCAST): Fix #46027.
10520
10521         * inssel.brg (OP_UNBOX): Remove unused rule.
10522
10523         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
10524         region instead of one for each method. Fixes #47813.
10525
10526 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
10527
10528         * exceptions.cs (test_0_nested_finally): New regression test for
10529         nested exception handlers.
10530
10531         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
10532
10533         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
10534
10535         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
10536         inlining.
10537
10538         * mini.c (mono_method_check_inlining): Make the inlining limit 
10539         configurable by an environment variable.
10540         
10541         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
10542
10543         * mini.h: Bump AOT file version.
10544
10545         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
10546         token, store the image along with the token, since the token might not 
10547         refer to the same image as the method containing the relocation, 
10548         because of inlining.
10549
10550 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
10551
10552         * mini.c (mono_precompile_assemblies): New function to compile
10553         all methods in all loaded assemblies.
10554
10555         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
10556
10557         * regalloc.h regalloc.c (MonoRegState): Change the type of 
10558         iassign and fassign to int*, since they can contain large negative
10559         values if the register is spilled. Also added some comments. Fixes
10560         #45817.
10561
10562         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
10563         under Win32. Fixes #42964.
10564
10565 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
10566
10567         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
10568
10569         * aot.c: Added support for AOT compiling methods which contain calls
10570         to wrappers. Currently, only remoting-invoke-with-check wrappers are
10571         handled.
10572         
10573         * driver.c (compile_all_methods): Run the compilation in a thread
10574         managed by mono. Fixes #44023.
10575
10576         * mini.c (mono_codegen): Print full method name in verbose output.
10577
10578         * mini-x86.c (mono_arch_patch_code): Fix warning.
10579         
10580         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
10581         jumps, since the method we are jumping to might be domain-specific.
10582
10583         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
10584
10585 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
10586
10587         * inssel.brg: string chars are unsigned.
10588
10589 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
10590
10591         * TODO: New todo item.
10592
10593         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
10594         which calls mono_runtime_class_init and patches the call site to
10595         avoid further calls.
10596         (mono_arch_create_class_init_trampoline): New arch specific function 
10597         to create a class init trampoline.
10598         (create_trampoline_code): Generalized so it can create
10599         class init trampolines as well.
10600
10601         * mini.c (helper_sig_class_init_trampoline): New helper variable.
10602         (mono_create_class_init_trampoline): New function to create and cache
10603         class init trampolines.
10604         (mono_find_class_init_trampoline_by_addr): New function to lookup the
10605         vtable given the address of a class init trampoline. Used by the
10606         patching process.
10607         (mono_codegen): Generate a call to a trampoline instead of
10608         mono_runtime_class_init in LDSFLD[A].
10609         (mono_codegen): Add relocations for the new trampoline.
10610         
10611         * mini.h mini-x86.c aot.c: Added a new relocation type: 
10612         MONO_PATCH_INFO_CLASS_INIT.
10613
10614         * mini.h: Bump AOT version number.
10615
10616         * aot.c: Create a copy of the loaded code instead of using the original
10617         so methods which call each other will be close in memory, improving
10618         cache behaviour.
10619         
10620         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
10621         patch since it breaks the regression tests.
10622         
10623         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
10624         for the register saving instruction sequence since the 
10625         frame_state_for function in glibc 2.3.2 don't seem to detect it.
10626
10627 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
10628
10629         * TODO: Fix todo item && remove another.
10630
10631 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
10632
10633         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
10634         previous checkin.
10635
10636         * aot.c: Moved the check for MONO_LASTAOT into the initialization
10637         function of the module.
10638
10639         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
10640         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
10641         --no-aot command line option.
10642
10643 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
10644
10645         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
10646         by Bernie Solomon (bernard@ugsolutions.com).
10647
10648         * inssel.brg: Refactor the interface offset table related code into
10649         its separate functions and add support for the AOT case.
10650
10651 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
10652
10653         * aot.c (mono_aot_get_method_inner): Fix memory leak.
10654         
10655         * aot.c: Added mono_aot_verbose variable and made all debugging
10656         output depend on the value of this variable.
10657
10658         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
10659         method_label and info_label.
10660
10661         * mini.h mini-x86.c aot.c: Added a new relocation type 
10662         MONO_PATCH_INFO_IID for klass->interface_id.
10663
10664         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
10665         the MonoJitInfo structure.
10666
10667         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
10668         a non-root appdomain in shared mode.
10669
10670 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
10671
10672         * aot.c: make aot loader less verbose. Remove free of unused variable.
10673
10674 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
10675
10676         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
10677
10678         * .cvsignore: Added *.dll.
10679
10680         * mini.c (mono_print_tree_nl): New function callable while debugging.
10681
10682         * mini.c (mono_print_code): Export this.
10683
10684         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
10685         patched code.
10686
10687 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
10688
10689         * mini.h (MonoCompile): Added 'jit_info' field.
10690
10691         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
10692         the cfg structure, since it is needed by the AOT compiler.
10693
10694         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
10695
10696         * aot.c: A major rewrite. Changes include:
10697         - save exception tables for methods which have them.
10698         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
10699         to g_module_symbol.
10700         - reworked the file format so it is now much smaller and needs
10701         fewer relocation entries.
10702         
10703 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
10704
10705         * aot.c (load_aot_module): Fix build bustage on platforms without
10706         Boehm GC.
10707
10708 2003-09-04  Martin Baulig  <martin@ximian.com>
10709
10710         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
10711
10712 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
10713
10714         * TODO: Some new optimization ideas.
10715
10716         * aot.c: Move AOT module loading logic here from mono_assembly_open.
10717
10718         * aot.c: Save the optimization flags used to compile the code into
10719         the AOT module.
10720
10721         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
10722         support emitting domain specific code.
10723         
10724         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
10725         no longer domain neutral. It can be made domain neutral by compiling 
10726         with --optimize=shared.
10727
10728         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
10729         between appdomains.
10730
10731         * driver.c mini.h mini.c: New --no-aot debugging option which disables
10732         loading of AOT code.
10733
10734         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
10735         
10736         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
10737         if there is no domain neutrality information.
10738
10739 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
10740
10741         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
10742         format version into the generated library.
10743
10744         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
10745         callee method into the caller since one of them could be shared.
10746
10747         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
10748         system exceptions from AOT code now works.
10749
10750         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
10751         method if it is domain neutral and the callee is not.
10752
10753         * graph.c (cfg_emit_one_loop_level): Fix warning.
10754
10755 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
10756
10757         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
10758         last checkin.
10759
10760 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
10761
10762         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
10763         is needed  by code which is executed before mono_runtime_init ().
10764         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
10765         
10766         * mini.c (mono_thread_abort): Fix warning.
10767         (mono_jit_compile_method): Call static constructor in the AOT case too.
10768
10769         * aot.c (mono_compile_assembly): Fix warning.
10770
10771 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
10772
10773         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
10774
10775 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
10776
10777         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
10778
10779         * cpu-pentium.md: Fix the length of call opcodes so they include the
10780         ESP restoring instruction. Fixes #47968.
10781
10782 2003-08-28  Martin Baulig  <martin@ximian.com>
10783
10784         * mini-x86.c (mono_arch_call_opcode): Added support for
10785         MONO_TYPE_GENERICINST.
10786
10787         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
10788
10789 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
10790
10791         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
10792         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
10793
10794         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
10795         metadata_section.
10796
10797 2003-08-26  Martin Baulig  <martin@ximian.com>
10798
10799         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
10800         when reporting an error, set this to the actual error location.
10801         (mono_method_to_ir): Report the correct error location if
10802         get_basic_blocks() returned an error.
10803
10804 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
10805
10806         * mini.c (mono_type_blittable): OBJECT is not blittable.
10807         (mono_method_blittable): Methods which have marshalling descriptors
10808         are not blittable either. Fixes #47842.
10809
10810 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
10811
10812         * driver.c mini.c: Use an environment variable instead of a global 
10813         variable. Also fix the build.
10814
10815         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
10816         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
10817         reporting this. 
10818
10819         * driver.c mini.c: Added --with-valgrind option to turn off some
10820         code which prevents mono from running under valgrind.
10821
10822         * mini.c (mono_emit_call_args): Fixed warning.
10823
10824         * mini.c (mono_emulate_opcode): Fixed warning.
10825
10826 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10827
10828         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
10829         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
10830         regalloc.c, regalloc.h: specify available registers in arch-specific
10831         code and support floats in the regallocator (patch by Laurent Morichetti 
10832         <l_m@pacbell.net>)
10833
10834 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
10835
10836         * mini.c: mono_thread_current() can be called only after
10837         mono_runtime_init(): rearrange code to not call it early on.
10838
10839 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
10840
10841         * mini.c: allocate jump tables in the code mempools.
10842
10843 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
10844
10845         * mini.c, mini.h: make sure per-thread data allocated by the jit is
10846         freed.
10847
10848 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
10849
10850         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
10851         12 to 16.  This fixes bug #47453.
10852
10853
10854 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
10855
10856         * mini-ppc.c: fixed indexed load and unsigned compares.
10857
10858 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
10859
10860         * mini.c: reenabled installation of handler for
10861           thread abort signal.
10862
10863 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10864
10865         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
10866         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
10867         until it's fixed and actually useful.
10868
10869 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
10870
10871         * inssel-long32.brg: couple more opcodes implemented.
10872
10873 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
10874         
10875         * mini-sparc.c: Even more opcodes implemeted.
10876
10877 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
10878
10879         * mini-sparc.c: More opcodes implemented.
10880
10881 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
10882
10883         * mini-sparc.c: More opcodes implemented.
10884
10885 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
10886
10887         * inssel-sparc.brg: Add some needed rules.  Direct
10888         copy from PPC.
10889         * Makefile.am: Use inssel-sparc.brg
10890         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
10891         an assert happy for now.
10892
10893 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
10894
10895         * mini-sparc.c: Fixed compile errors.
10896         * exceptions-sparc.c: Same.  We now produce a mono binary 
10897         on sparc-linux.  Yea.
10898
10899 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
10900
10901         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
10902         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
10903         They compile, but do not work.
10904
10905 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
10906
10907         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
10908         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
10909         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
10910         (ct@gentoo.org).
10911
10912 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
10913
10914         * mini.c: more opcodes implemented and better support for generics.
10915
10916 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
10917
10918         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
10919         * mini.c, mini.h: first cut at generics support: some new instructions 
10920         added and changed the behaviour of some of the existing ones.
10921
10922 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
10923
10924         * mini.c: Removed definition of metadata_shared mutex here.
10925
10926 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
10927
10928         * mini-x86.c: make vararg calls work for instance methods.
10929
10930 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
10931
10932         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
10933         returns the arguments in a separte list, now.
10934
10935 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
10936
10937         * aot.c, mini.c: updates for array type representation changes.
10938
10939 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
10940
10941         * mini.c: register function to perform jit shutdown.
10942
10943 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
10944
10945         * mini.c: use a faster allocator if possible.
10946
10947 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
10948
10949         * aot.c: some cleanups and portability changes.
10950
10951 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
10952
10953         * mini.c: use faster allocation for CEE_BOX if possible.
10954
10955 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
10956
10957         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
10958         Moved inlined mempcy code to its own function so that is can be
10959         reused. Added an inline memset function as well (optimized initobj).
10960         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
10961
10962 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
10963
10964         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
10965
10966 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
10967
10968         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
10969         arch code can setup the cpu for CLR execution, if needed.
10970         We use it on x86 to set the precision of FP operations.
10971
10972 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
10973
10974         * mini.c: disable some optimizations if we can guess they'll cost too
10975         much for a given method.
10976
10977 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
10978
10979         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
10980         
10981 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
10982         * mini.h mini.c mini-x86.c: Added instruction level coverage 
10983         info collection support.
10984
10985 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
10986
10987         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
10988         is now implemented in the profiling API. Get rid of a couple of
10989         unnecessary global variables.
10990
10991 2003-06-15  Nick Drochak <ndrochak@gol.com>
10992
10993         * basic-long.cs: tests for negative values for bigmul, and unsigned.
10994         * cpu-g4.md: add op_bigmul and op_bigmul_un
10995         * cpu_pentium.md: add op_bigmul_un
10996         * inssel-long32.brg: add rule for unsigned bigmul
10997         * mini-ops.h: define OP_BIGMUL_UN
10998         * mini-x86.c: THE BUG: handle (un)signed properly
10999         * mini.c: choose unsigned opcode if needed.
11000         This set of patches fixes bug #44291
11001
11002 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
11003
11004         * mini.c (optimize_branches): improved to handle all kinds of
11005         conditional branches.
11006
11007 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
11008
11009         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
11010         don't raise exceptions.
11011
11012 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
11013
11014         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
11015         to arch-specific files.
11016
11017 2003-06-09  Martin Baulig  <martin@ximian.com>
11018
11019         * Makefile.am (libs): Added $(LIBGC_LIBS).
11020
11021 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
11022
11023         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
11024         and OP_ATAN (fixes bug#44293).
11025
11026 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
11027
11028         * Makefile.am, mini-x86.c: rename cpu description array to
11029         pentium_desc, since some compilers define the 'pentium' preprocessor
11030         symbol.
11031
11032 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
11033
11034         * mini.c (mini_select_instructions): add explicit branch if the
11035         following block is not the false target of a conditional branch -
11036         we need this with any optimization that reorder or remove bblocks
11037
11038         * mini.c (optimize_branches): bug fixes
11039
11040 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
11041
11042         * mini.c (mono_method_to_ir): inline static readonly fields
11043
11044         * ssa.c (fold_tree): start cfold support for long (very simple
11045         cases only)
11046
11047         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
11048
11049 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
11050
11051         * inssel.brg: fixed memcpy (bug #44219).
11052
11053 2003-06-05  Dick Porter  <dick@ximian.com>
11054
11055         * driver.c: Set the glib log levels to not abort if g_message
11056         recurses.
11057
11058         g_set_prgname() has to happen before mini_init() so that the
11059         process handle gets the info.
11060         
11061 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
11062
11063         * driver.c: add intrins to the default optimizations to get wider
11064         exposure.
11065
11066 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
11067
11068         * mini.h: some large basic blocks will overflow a 16-bit
11069         integers for symbolic registers.
11070
11071 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
11072
11073         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
11074         (mono_arch_output_basic_block): fix bug 43499 
11075
11076 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
11077
11078         * mini.c: kill duplicated definition of mono_debug_format.
11079
11080 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
11081
11082         * mini-x86.c, arrays.cs: fixed register allocation bug.
11083
11084 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
11085
11086         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
11087
11088         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
11089
11090 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11091
11092         * mini.c:
11093         (print_method_from_ip): also print source location information if
11094         available.
11095
11096 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
11097
11098         * mini.c (mono_find_block_region): bug fix in region code
11099         (mini_method_compile): enable removing unreachable code again, but
11100         only in methods without exception clauses.
11101
11102 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
11103
11104         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
11105         Implemented arglist opcode and handling of TypedReference type.
11106         Fixed x86 call convention when a structure is returned.
11107         Minimal support for calling static vararg methods.
11108
11109 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
11110
11111         * mini.c (mini_method_compile):  always remove unreachable code,
11112         because the code in them may be inconsistent  (access to dead
11113         variables for example).
11114
11115 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
11116
11117         * driver.c, debug-mini.c: warning fixes.
11118
11119 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
11120
11121         * Makefile.am, jit.h, mini.h: install header for embedding mono.
11122
11123 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
11124
11125         * mini.c: thread-static fields are registered in mono_class_vtable(),
11126         so ensure the function is called before checking for them.
11127
11128 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
11129
11130         * mini.c (optimize_branches): fix for bug 43586
11131
11132         * jit-icalls.c (mono_llmult_ovf): added an additional check for
11133         overflow (fixes Bug #43639)
11134
11135 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
11136
11137         * mini.c, objects.cs: allow the use of stobj for primitive types.
11138
11139 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
11140
11141         * mini.c: be less strict about argument checking until we support
11142         running the verifier.
11143
11144 2003-05-27  Nick Drochak <ndrochak@gol.com>
11145
11146         * basic-long.cs: tests for (ulong)int * (ulong)int also
11147         * mini.c: use the same trick for (ulong)int * (ulong)int
11148
11149 2003-05-27  Nick Drochak <ndrochak@gol.com>
11150
11151         * basic-long.cs: add regression test for (long)int * (long)int
11152         * cpu-pentium.md: add op_bigmul specification
11153         * inssel-long32.brg: add OP_BIGMUL rule
11154         * mini-ops.h: add OP_BIGMUL
11155         * mini-x86.c: register allocator: handle case where src1 needs to be
11156         in EAX.
11157         * mini.c: substitute special BIGMUL opcode in the tree for 
11158         (long)int * (long)int
11159
11160 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
11161
11162         * jit-icalls.c: call the type ctor on field access if needed.
11163
11164 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
11165
11166         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
11167         to a method (including results of ldelema, bug#43207).
11168
11169 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
11170
11171         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
11172         colors to show exception handler blocks.
11173
11174         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
11175         (fix for pinvoke7.cs).
11176
11177 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
11178
11179         * mini.h, mini.c: ensure correct initialization order for types that
11180         require it. Prepare for lazy compilation of jit icall wrappers.
11181         Provide a name for opcode emulation to reduce unneeded mallocing.
11182
11183 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
11184
11185         * mini-x86.c: better register restoring code and profiling
11186         support for tail calls.
11187
11188 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
11189
11190         * mini.h, driver.c: prepare for leaf methods optimization.
11191
11192 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
11193
11194         * mini.c: get targets of branches before converting a method.
11195
11196 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
11197
11198         * mini.c (optimize_branches): added some experimental code (disbaled) 
11199
11200 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
11201
11202         * mini.c (optimize_branches): fix branch to branch optimization 
11203
11204         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
11205
11206         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
11207
11208         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
11209
11210         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
11211         if needed.
11212
11213 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
11214
11215         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
11216         enable use of interface variables again.
11217
11218         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
11219         I1 to registers because there is no simply way to sign extend 8bit
11220         quantities in caller saved registers on x86.
11221
11222         * inssel-float.brg: set costs of some rules to 2 so
11223         that monobure always select the arch. specific ones if supplied,
11224         regardless of the order we pass the files to monoburg.
11225
11226 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
11227
11228         * mini.c, mini-x86.c: since the magic trampoline for jumps
11229         can't patch the code directly, we do it as soon as the
11230         method gets compiled.
11231
11232 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
11233
11234         * mini-x86.c, mini.h: introduce a new patching method
11235         to support CEE_JMP and tail calls.
11236         * mini.c: obey tail.call. Don't precompile methods target
11237         of CEE_JMP.
11238         * tramp-x86.c: new trampoline code to handle methods
11239         reached through a jump.
11240
11241 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
11242
11243         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
11244         bit values to registers
11245
11246 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
11247
11248         * mini.c (mono_compile_get_interface_var): share interface
11249         variables if possible.
11250
11251 2003-05-16  Martin Baulig  <martin@ximian.com>
11252
11253         * debug-mini.c (mono_init_debugger): New function to initialize
11254         the debugger.  This is not in the debugger since it needs to
11255         access some of mini's internals.
11256
11257 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
11258
11259         * mini.c (mono_method_to_ir): inlining fixes/cleanups
11260
11261 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
11262
11263         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
11264         for value type handling.
11265
11266 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
11267
11268         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
11269         (mono_method_check_inlining): enable inlining of all kinds of wrappers
11270
11271 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
11272
11273         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
11274           the constructor through a proxy.
11275
11276 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
11277
11278         * jit-icalls.c, inssel.brg: fixes to array element address
11279         calculations.
11280
11281 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
11282
11283         * mini-x86.c (is_regsize_var): allocate pointer to registers
11284
11285 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
11286
11287         * driver.c: fixed typo, added intrins to the set of optimizations
11288         tested with regressions.
11289
11290 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
11291
11292         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
11293         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
11294         test case.
11295
11296 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
11297
11298         * inssel.brg: remove some common pop instructions without side effects
11299
11300 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
11301
11302         * inssel-x86.brg: fixed thinko in int to double conversions.
11303
11304 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
11305
11306         * mini.c, jit-icalls.c: added runtime thread-static variable support.
11307
11308 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
11309
11310         * inssel-long32.brg: two more missing instructions.
11311
11312 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
11313
11314         * mini.c (mono_emit_call_args): set the cil_code for all arguments
11315         if not already set.
11316
11317 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
11318
11319         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
11320         correctly.
11321
11322         * basic-float.cs: Added tests for negative zero.
11323
11324 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
11325
11326         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
11327         a couple of missing operations for long casts, with test cases.
11328
11329 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11330
11331         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
11332
11333 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
11334
11335         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
11336         code size estimation.
11337
11338 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
11339
11340         * mini.c (mono_jit_create_remoting_trampoline): make it work with
11341         abstract methods (fix bug 42542)
11342
11343         * aot.c: add ability to handle array types
11344         
11345 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
11346
11347         * mini.c: Call the _specific versions of the object allocation
11348         functions if possible.
11349
11350 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
11351
11352         * driver.c: call setlocale ().
11353
11354 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
11355
11356         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
11357         windows build.
11358
11359 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
11360
11361         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
11362
11363         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
11364         wrappers (fix bug 42122)
11365
11366 2003-05-04  Martin Baulig  <martin@ximian.com>
11367
11368         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
11369
11370         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
11371         s/mini_set_defaults/mono_set_defaults/g.
11372
11373 2003-05-04  Martin Baulig  <martin@ximian.com>
11374
11375         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
11376
11377 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
11378
11379         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
11380         (reported by Don Roberts).
11381
11382 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
11383
11384         * mini.c: temporarily work around two bugs for this release.
11385
11386 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
11387
11388         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
11389         that contains -export-dynamic and it makes using the ld script
11390         useless.
11391         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
11392
11393 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
11394
11395         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
11396         specific cpu.
11397
11398 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
11399
11400         * mini.c: make sure leave calls all the needed finally blocks,
11401         even when the target jumps out of multiple exception clauses.
11402
11403 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
11404
11405         * ldscript, Makefile.am: add linker script to reduce the number of
11406         exported symbols (should also fix the issues with libwine defining
11407         some of the same symbols in io-layer).
11408
11409 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
11410
11411         * driver.c (mini_main): Avoid assertion when no file name is given on 
11412         the command line.
11413
11414 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
11415
11416         * driver.c: added --version/-V command line option.
11417         Added the inline optimization in the regression tests.
11418
11419 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
11420
11421         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
11422         to the type in the method signature (fixes bug#42134).
11423
11424 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
11425
11426         * mini.c: when inlining, check this is not null only when needed (bug #42135).
11427
11428 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
11429
11430         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
11431
11432 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11433
11434         * driver.c: fixed bug #42100.
11435
11436 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
11437
11438         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
11439
11440 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
11441
11442         * mini.c: moved most of the code required to do inlining to its own
11443         function so it can be reused. Inline also ctors if appropriate.
11444
11445 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
11446
11447         * Makefile.am: Link with -export-dynamic so shared libs loaded by
11448         the runtime can call mono API functions.
11449
11450 2003-04-27  Martin Baulig  <martin@ximian.com>
11451
11452         * debug-mini.c (mono_debug_init_method): Added
11453         `guint32 breakpoint_id' argument; if the method has a breakpoint,
11454         send a notification to the debugger.
11455
11456         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
11457         running in the Mono Debugger, just pass the breakpoint number to
11458         mono_debug_init_method().
11459
11460         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
11461
11462 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
11463
11464         * mini.c: allow some more unsafe compares.
11465
11466 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
11467
11468         * mini-x86.c, Makefile.am: make distcheck works (partially from
11469         a patch by Richard Lee <r.h.lee@attbi.com>).
11470         * regset.c, regset.h: removed, they are unused.
11471
11472 2003-04-25  Dick Porter  <dick@ximian.com>
11473
11474         * driver.c: Usage reports the name as 'mono' not 'mini'
11475         * exceptions-x86.c: Build and run on freebsd
11476
11477 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
11478
11479         * Makefile.am: install the program with the 'mono' name and
11480         the library as libmono instead of mini and libmini.
11481
11482 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
11483
11484         * driver.c: provide the APIs for the embedding interface of the old jit.
11485
11486 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
11487
11488         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
11489
11490 2003-04-23  Martin Baulig  <martin@ximian.com>
11491
11492         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
11493
11494         * driver.c: Added `--debug' command line argument to enable
11495         debugging support.
11496
11497 2003-04-23  Martin Baulig  <martin@ximian.com>
11498
11499         * debug.[ch]: Removed.  The code is now in
11500         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
11501
11502         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
11503         last six months.
11504
11505 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
11506
11507         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
11508
11509 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11510
11511         * mini.c:
11512         (mini_cleanup): moved mono_runtime_cleanup call after the call to
11513         mono_domain_finalize.
11514         (mini_method_compile): use mono_method_profile* if the the option is
11515         enabled.
11516
11517 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
11518
11519         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
11520         methods with their wrapper.
11521
11522         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
11523         methods with their wrapper.
11524
11525         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
11526         their wrapper.
11527
11528         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
11529         wrapper.
11530
11531         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
11532         methods.
11533
11534 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
11535
11536         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
11537
11538 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
11539
11540         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
11541         of the mempool. This is slightly faster and uses less memory
11542
11543 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
11544
11545         * mini.c: avoid O(n) allocation for variables.
11546
11547 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
11548
11549         * mini.c: handle items on the stack after inlining methods.
11550
11551 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
11552
11553         * mini.c: make the method->opcode optimization dependent
11554         on MONO_OPT_INSTRINS and do it lazily.
11555
11556 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
11557
11558         * driver.c: print overall results at the end of regression run.
11559
11560 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
11561
11562         * inssel.brg: don't overwrite symbolic registers.
11563
11564 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
11565
11566         * inssel-x86.brg: fix conversion from long to float.
11567
11568 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
11569
11570         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
11571
11572 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
11573
11574         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
11575
11576         * driver.c: Added --print-vtable option as in the old JIT.
11577
11578 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
11579
11580         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
11581
11582 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
11583
11584         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
11585
11586 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
11587
11588         * mini.c regalloc.c regalloc.h: Fix memory leak.
11589
11590 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
11591
11592         * aot.c (mono_aot_get_method): register all used strings
11593
11594 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
11595
11596         * mini.c: always intern strings references with ldstr at compile time.
11597
11598 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
11599
11600         * Makefile.am: add BUILT_SOURCES.
11601
11602 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
11603
11604         * driver.c: give a better error message when the assembly to execute
11605         doesn't have an entry point.
11606
11607 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
11608
11609         * Makefile.am: added hack for automake
11610
11611         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
11612         correct sematics.
11613
11614         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
11615
11616 22003-04-07  Martin Baulig  <martin@ximian.com>
11617
11618         * Makefile.am: Added Makefile.am.
11619
11620         * debugger-main.c: Removed, this is now in the debugger where it
11621         belongs.
11622
11623         * mini.pc.in: Call this package `mini' for the moment.
11624
11625
11626
11627
11628
11629
11630
11631