2008-08-19 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
2
3         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
4
5         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
6
7         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
8         as the patch type.
9
10         * mini.c (mono_resolve_patch_target): Ditto.
11         
12         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
13         (encode_klass_ref): Add support for encoding VARs/MVARs.
14
15         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
16
17         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
18         the handling of the got entries into a separate 'decode_got_entry' function.
19         Add support for RGCTX_FETCH.
20
21         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
22         clobbered by the trampoline code.
23
24         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
25         not clobbered by the indirect calling code.
26
27 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
28
29         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
30         to fix the build.
31
32 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
33
34         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
35         signature using the compilation mempool otherwise we would leak it.
36
37 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
38
39         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
40         mono_emit_abs_call ().
41
42         * patch-info.h: Add GENERIC_CLASS_INIT.
43
44         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
45
46         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
47         as their target as a near call.
48
49         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
50         ABS handling code.
51         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
52
53         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
54         call to a runtime function described by a patch.
55
56         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
57         mono_emit_abs_call, this has the advantage that the ABS handling code in
58         mono_codegen () can handle them both, and can handle other stuff in the
59         future without additional code.
60
61         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
62         entry.
63         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
64         abs addresses.
65
66         * mini.h: Add missing bblock related prototypes.
67
68         * mini.h (MonoCompile): Remove unused reverse_inst_list and
69         reverse_inst_list_len fields.
70
71         * mini.c: Refactor this file a bit by moving branch optimizations to 
72         branch-opts.c.
73
74         * method-to-ir.c: Merge generic sharing changes missed earlier.
75
76         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
77
78         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
79         shared patches. Process METHODCONST as a shared patch.
80
81         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
82         as it crashes on the 2.0 mscorlib.
83
84         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
85         to cause crashes.
86         
87         * aot-compiler.c: Use is_plt_patch () in a few additional places.
88         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
89         by IMT.
90
91         * aot-compiler.c: Reorganize the got handling code to be a bit more
92         understandable.
93
94 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
95
96         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
97         mono_patch_info_equals/hash, and use it to massively simplify
98         get_plt_index ().
99
100         * mini.c (mono_patch_info_hash): Simplify this and add support for
101         more patch types.
102
103         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
104
105         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
106         handling code, since an offset is not enough to identify a trampoline.
107
108         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
109
110 2008-08-17  Mark Probst  <mark.probst@gmail.com>
111
112         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
113
114         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
115
116         * mini-ops.h: Argument and result types for OVF_CARRY ops.
117
118         * decompose.c: PPC decompositions for various ops.
119
120         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
121
122 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
123
124         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
125         call the generic trampoline code using a call, instead of a jump, to
126         remove some special casing from the generic trampoline code.
127
128         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
129         (mono_codegen): Ditto.
130
131         * aot-compiler.c aot-runtime.c: Ditto.
132
133         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
134
135         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
136         helper function to find the offset corresponding to a lazy fetch trampoline.
137
138         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
139         when doing generic sharing.
140
141         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
142         places.
143         
144         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
145         mini-trampolines.c to be with the other trampoline creation functions.
146
147         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
148         as it is equal to method->signature in most cases, add a 
149         mono_emit_method_call_full variant which takes a signature and an imt
150         argument as well.
151
152 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
153
154         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
155         to this function, since it could be computed easily from the method 
156         argument.
157         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
158         more.
159
160         * method-to-ir.c mini.c: Remove references to 
161         compile_generic_method_wo_context.
162
163         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
164         generic method calls.
165         
166         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
167         dimensional non-szarrays.
168
169         * mini.c (mini_init): Register mono_array_new_1.
170
171         * jit-icalls.c (mono_array_new_1): New jit icall.
172
173         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
174         pointing to the method.
175
176         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
177         method addresses belonging to METHOD_JUMP patches in the 
178         jump_target_got_slot_hash.
179         (mono_aot_load_method): Ditto.
180
181         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
182         METHOD_JUMP patches.
183
184         * mini.c (mini_create_jit_domain_info): New helper function which 
185         initializes/frees domain->runtime_info.
186         (mini_free_jit_domain_info): Ditto.
187         (mini_init): Install the domain hook functions with the runtime.
188
189         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
190         information maintained by the JIT.
191
192         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
193         insertion into jump_table_hash into mono_codegen (), also implement proper
194         locking.
195
196         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
197         tail calls, it is already done by the aot code.
198         
199         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
200         mechanism on amd64.
201
202         * iltests.il.in: Make the jmp test a bit more complex.
203
204         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
205         generic instances which doesn't have a token.
206
207         * aot-runtime.c (decode_method_ref): Ditto.
208         
209         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
210         can handle this case now.
211         (handle_box): Ditto.
212
213 2008-08-15  Geoff Norton  <gnorton@novell.com>
214
215         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
216         debugging check.
217
218 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
219
220         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
221         calling generic methods.
222
223         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
224
225         * aot-runtime.c (decode_patch_info): Ditto.
226
227         * mini.c (mono_resolve_patch_target): Ditto.
228         
229         * patch-info.h: Add METHOD_RGCTX.
230
231         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
232
233 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
234
235         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
236         arguments in registers.
237
238         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
239         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
240
241         * mini.c (mini_method_compile): Abort aot compilation for generic
242         methods if generic sharing is disabled.
243         
244         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
245         an mrgctx.
246
247         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
248         requiring an mrgctx.
249
250         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
251         store instructions when converting a vcall to a normal call.
252
253         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
254         mono_arch_find_jit_info.
255
256 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
257
258         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
259         avoid calling mono_method_full_name () for every method even if the
260         env var is not set.
261         (check_inline_caller_method_name_limit): Ditto.
262
263 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
264
265         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
266         assemblies in one run.
267
268         * aot-compiler.c (mono_compile_assembly): Only print out a count of
269         skipped methods if it is not 0.
270
271         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
272
273 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
274
275         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
276           MONO_ARCH_HAVE_UNWIND_TABLE.
277
278         Contributed under MIT/X11 license.
279
280 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
281
282         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
283           from default optimizaton list on Winx64.
284
285         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
286
287         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
288           the LMF from the MonoJitTlsData structure.
289
290         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
291
292         Contributed under MIT/X11 license.
293
294 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
295
296         * mini.c (sigsegv_signal_handler): Fix the build.
297
298         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
299         assembly->aot_module.
300
301         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
302         hash table. This simplifies and speeds up a lot of code, and fixes support
303         for .netmodules.
304
305         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
306         with the runtime.
307
308         * mini-exceptions.c: Ditto.
309         
310         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
311         'native_offset' argument, since these are computed in the 
312         mono_find_jit_info () function.
313
314         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
315         is used by exceptions-ppc.c.
316
317         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
318         mono_arch_find_jit_info ().
319         
320         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
321         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
322         generic code in mini-exceptions.c.
323
324 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
325
326         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
327
328         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
329         
330         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
331         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
332         called while holding the loader lock. Fixes #415608.
333         (mono_aot_get_method_from_token_inner): Ditto.
334
335 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
336
337         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
338         to reduce differences between this and the generic implementation in
339         mini-exceptions.c.
340         (ves_icall_get_frame_info): Ditto.
341
342         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
343
344         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
345         longer neccesarry.
346
347         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
348         mono_arch_get_call_filter () and make it non-static, for consistency with the
349         other architectures.
350
351 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
352
353         * mini.c:
354         * local-propagation.c:
355         * mini-x86.c: Correct the name of arch defines.
356
357 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
358
359         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
360         NO_EMULATE_LONG_SHIFT_OPS define.
361
362 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
363
364         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
365         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
366
367         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
368         MACH fixes. Merged from the 2.0 branch.
369
370         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
371
372         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
373         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
374
375         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
376
377         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
378         mono_marshal_get_native_wrapper () signature changes.
379
380 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
381
382         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
383         conversion bug under arm.
384
385 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
386
387         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
388
389         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
390         with overflow checking.
391
392 2008-08-05  Marek Habersack  <mhabersack@novell.com>
393
394         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
395         to the genmdesc.pl file
396
397 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
398
399         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
400         arg_array in the soft-float versions of the LOAD/STORE macros.
401
402         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
403         implementation.
404
405         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
406
407 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
408
409         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
410         a float HFA. Fixes #413621.
411
412 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
413
414         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
415         frame_size to args_size. Fixes build.
416
417 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
418
419         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
420         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
421
422         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
423         the stack are not unaligned. Fixes #413247.
424         
425 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
426
427         * mini.c: update jitted methods performance counters.
428
429 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
430
431         * mini-exceptions.c: increase the exceptions thrown performance
432         counter in mono_handle_exception ().
433
434 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
435
436         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
437         can work with netmodules.
438
439 2008-07-28  Geoff Norton  <gnorton@novell.com>
440
441         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
442         regression tests.
443
444 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
445
446         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
447         correct place.
448
449 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
450
451         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
452           The float param registers and other param registers must be the 
453           same index on Windows x64.
454
455         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
456           ArgValuetypeAddrInIReg argument case.  Setting the argument
457           op to OP_VTARG_ADDR (OP_REGOFFSET)).
458
459         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
460           variable computed above as the copy length for arguments of storage
461           type ArgValuetypeAddrInIReg.
462
463         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
464           ArgValuetypeAddrInIReg argument case.  This case will rely on
465           mono_arch_emit_outarg_vt to emit the correct code later in the process.
466
467         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
468           a 32 byte stack allocation for all calls.  We will omit the adjustment for
469           jump and tail call instructoins as they do not follow the typical call behavior.
470
471         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
472           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
473           local variable and pass the local variable by reference to the called method.
474
475         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
476           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
477           of a struct is passed in a register it must be saved with the other
478           volatile argument on the stack.
479
480         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
481           frame pointer the stack adjustment value must be saved to the unwind 
482           info structure.
483
484         Contributed under MIT/X11 license.
485
486 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
487
488         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
489         which got lost in the merge.
490
491 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
492
493         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
494         build.
495
496         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
497         
498         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
499         icalls, since they won't be patched.
500
501         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
502         different code sequence when running under valgrind to prevent some valgrind
503         errors.
504
505         * iltests.il.in: Add new regression test.
506
507         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
508         end with a throw.
509
510         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
511         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
512
513         * iltests.il.in: Add new test.
514
515         * aot-compiler.c: Fix some warnings.
516
517         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
518         Fixes #412494.
519
520 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
521
522         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
523         (mini_usage_jitdeveloper): Add a missing --wapi option.
524
525 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
526
527         * mini-codegen.c: Simplify the is_fp macros.
528         (free_up_ireg): Remove, use free_up_reg instead.
529         (free_up_reg): Fix the fp case.
530
531 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
532
533         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
534         lowered earlier.
535
536         * exceptions-x86.c: Merge some changes which seemed to have got lost
537         in the linear-ir merge.
538
539         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
540
541         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
542         long vreg volatile even if the variable was already created.
543
544         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
545         volatile variables.
546
547 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
548
549         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
550
551         * mini.c (mono_jit_compile_method_inner): Add support for 
552         MONO_EXCEPTION_BAD_IMAGE.
553
554         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
555         mini_method_get_context () returns NULL. Fixes #356531.
556
557         * mini.c (mono_method_to_ir): Ditto.
558         
559         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
560         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
561
562 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
563
564         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
565         in the LDFTN implementation.
566
567 2008-07-25  Mark Probst  <mark.probst@gmail.com>
568
569         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
570         code, patch calls to icalls, too, even if they're not in the
571         shared generic code hash.  Fixes #411962.
572
573 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
574
575         * cpu-x86.md: Increase the length of the fcall opcodes.
576
577         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
578         calls returning floats.
579
580         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
581         on NEWARR.
582         
583         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
584         missed earlier.
585
586         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
587         into the domain->method_code_hash.
588
589         * aot-compiler.c: Fix win32 build.
590
591         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
592         
593         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
594         gshared NEWARR implementation.
595
596         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
597
598         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
599         can be used outside of method_to_ir.
600
601         * mini.h (MonoCompile): Add arg_types field.
602
603         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
604         
605         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
606         the values of the local arg_array and param_types array.
607
608 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
609
610         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
611         got accesses might only get generated later when NEWOBJ is decomposed.
612         
613         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
614         looking up the native code of the target method when a delegate is called
615         for the first time.
616
617         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
618         optimization.
619
620         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
621
622         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
623         AOT work on platforms without a working dlsym implementation.
624
625         * mini.h: Bump AOT image format version.
626         
627 2008-07-24  Mark Probst  <mark.probst@gmail.com>
628
629         * mini-exceptions.c: Free a MonoType with
630         mono_metadata_free_type() instead of g_free().
631
632         * aot-runtime.c: Free a MonoType.
633
634 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
635
636         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
637         optimization.
638
639         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
640         fp stack on x86.
641
642 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
643         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
644         profiler hook.
645
646 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
647
648         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
649         NEWOBJ calls on valuetypes.
650
651         * iltests.il.in: Add new test.
652
653         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
654
655 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
656
657         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
658         is no longer needed.
659
660         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
661         non register sized integer arguments.
662         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
663         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
664         emit_memcpy2 ().
665
666         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
667         CEE_MONO_RETOBJ.
668         
669         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
670         two a binop with different sized arguments is emitted.
671
672         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
673         instruction in the ins==NULL case.
674
675 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
676
677         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
678
679         * mini-x86.c: Fix osx build.
680
681         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
682         opcodes as well.
683
684         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
685         instruction for non int sized variables.
686
687         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
688         implementation.
689
690 2008-07-23  Robert Jordan  <robertj@gmx.net>
691
692         * method-to-ir.c: Fix MSVC build.
693
694 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
695
696         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
697         a non int sized type, widen it to an int since newer versions of gcc seem to
698         generate code which needs this.
699
700         * ssa2.c abcremoval2.c: Fix warnings.
701
702         * *: Merge the Linear IR branch.
703
704         The original branch is at trunk/branches/vargaz/mini-linear-il, and
705         the ChangeLog file there describes all the changes done over the years. 
706         Further documentation can be found at www.mono-project.com/Linear_IL.
707
708 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
709
710         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
711           The float param registers and other param registers must be the 
712           same index on Windows x64.
713
714         Contributed under MIT/X11 license.
715
716 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
717
718         * mini.c: Make the previous fix GC safe.
719
720 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
721
722         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
723
724 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
725
726         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
727           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
728           ArgValuetypeAddrInIReg instead.
729
730         Contributed under MIT/X11 license.
731
732 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
733
734         * mini-codegen.c (get_register_spilling): Fix a warning.
735
736 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
737
738         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
739         for types which the initialization fails. Raises the provided exception
740         at the right stop after cleanup.
741
742 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
743
744         * aot-compiler.c: Free most of the memory allocated during compilation.
745
746         * mini.c (mini_parse_debug_options): Fix a leak.
747         
748         * mini.c (mini_method_compile): Don't add the method to the jit info tables
749         during aot compilation.
750
751 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
752
753         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
754         it has too much register pressure.
755
756 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
757
758         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
759
760 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
761
762         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
763         on x86.
764
765         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
766         on amd64 similar to the way it is done on arm.
767
768         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
769
770         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
771         consistency, normalize error messages, avoid loading aot-only modules in
772         normal mode.
773
774         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
775         for consistency.
776
777         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
778
779 2008-07-11  Martin Baulig  <martin@ximian.com>
780
781         * debug-debugger.h
782         (MonoDebuggerInfo): Add `interruption_request'.
783
784 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
785
786         * aot-compiler.c (emit_plt): Remove some dead code.
787
788         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
789
790         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
791         return the plt info offset belonging to a given plt entry.
792
793         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
794         mono_aot_get_plt_info_offset.
795         
796         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
797         similar to the amd64 code by makeing jumps through a separate jump table 
798         instead of embedding the jump addresses into the code.
799
800 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
801
802         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
803         method.
804
805 2008-07-10  Martin Baulig  <martin@ximian.com>
806
807         * mini.c (mini_method_compile): Disable generics sharing when
808         running in the debugger.
809
810 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
811
812         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
813
814         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
815         the local register allocator from running out of registers on x86 when 
816         using aot.
817
818 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
819
820         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
821         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
822         C4146.
823
824         Contributed under MIT/X11 license.
825
826 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
827
828         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
829         speed up the assembler.
830
831 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
832
833         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
834         support.
835
836         * mini.c: Move the soft float handling macros a bit earlier, add 
837         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
838         place.
839
840         * mini.h: Add prototype for mono_arch_fixup_jinfo.
841
842         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
843         read-only to help catch code allocation requests.
844         
845         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
846         and turn it off when using --aot-only or when compiling with --aot=full.
847
848         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
849         jump table for switches from the normal domain mempool, not the code
850         manager.
851
852         * mini-trampolines.c (get_unbox_trampoline): New function to return an
853         unbox trampoline which handles aot-only mode too.
854
855         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
856         an AOTed unbox trampoline.
857
858         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
859
860 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
861
862         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
863         ""
864
865         Contributed under MIT/X11 license.
866
867 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
868
869         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
870           the unwind information for the method at the end of the allocated block.
871           
872         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
873           MonoCompileArch to hold the unwind info for SEH on Winx64
874         
875         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
876           frame pointer info for the method being compiled.
877           
878         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
879           the call to mono_exception_from_token.
880           
881         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
882           storing the method prolog information in a format that the Winx64 SEH can understand.  This
883           information is stored a the end of the method block because it is all 32-bit offset based.
884
885         Contributed under MIT/X11 license.
886
887 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
888
889         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
890
891         * wapihandles.c: Fix warnings.
892
893         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
894         mode.
895
896         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
897         mono_jit_compile_method in aot-only mode since that calls the type 
898         initializer.
899         
900         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
901         get_delegate_invoke_impl in aot-only mode.
902
903         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
904
905 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
906
907         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
908
909         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
910         is on by default.
911
912         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
913
914         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
915         init trampoline from the AOT file as well.
916
917         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
918         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
919         code.
920
921         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
922         mono_init.
923
924         * exceptions-amd64.c: Add _full variants for the remaining exception code
925         creation functions as well, allow emission of relocatable code, remove
926         caching since that is now done by the caller.
927
928         * mini-exceptions.c: Add _full variants for the remaining exception code
929         creation functions as well, add aot-only support.
930
931         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
932         if we can determine a proper token for them.
933         (add_wrappers): Add a few more wrappers.
934         (emit_method_code): Remove some dead code.
935         (emit_trampolines): Emit exception code too.
936
937         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
938
939         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
940         mono_array_new_va which avoids varargs.
941
942         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
943
944         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
945         mono_arch_create_specific_trampoline () in all places.
946
947         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
948         a bit so it can be used for other things as well.
949         
950         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
951         on demand as well.
952
953         * exceptions-amd64.c: Rename the caching from the exception code creation
954         functions, it is done by the caller instead.
955         
956         * exceptions-amd64.c: Change the signature of the exception code creation 
957         functions to allow the creation of relocatable code later.
958
959         * mini-exceptions.c: Add a set of functions to query the various 
960         runtime-generated exception functions.
961
962         * mini.c mini-exceptions.c: Use the newly added functions instead of the
963         mono_arch_.. () functions.
964         
965 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
966
967         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
968
969         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
970
971         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
972         (mini_get_vtable_trampoline): Ditto.
973
974         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
975         code in the AOT case by returning the code size and a list of relocations to
976         the caller.
977
978         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
979
980 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
981
982         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
983           clean the stack.
984
985         Contributed under MIT/X11 license.
986
987 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
988
989         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
990         so the buffer size can be computed correctly. Fixes #404735.
991
992         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
993         normally as cfg->debug_info is already freed.
994
995 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
996
997         * mini-amd64.c: For calls returning vtypes in registers, don't store
998         the return address on the stack, instead allocate a separate local for
999         it. Fixes #404729.
1000
1001 2008-07-05  Mark Probst  <mark.probst@gmail.com>
1002
1003         * mini-trampolines.c, mini.h: Add an argument to
1004         mono_create_jit_trampoline_in_domain() for turning off the adding
1005         of the sync wrapper.
1006
1007         * mini.c: Use the JIT trampoline without sync instead of
1008         ldftn_nosync in static RGCTX invoke wrappers so that the call can
1009         be patched.
1010
1011 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1012
1013         * driver.c: Turn on GSHARED optimization by default.
1014
1015 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
1016
1017         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
1018         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
1019
1020         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
1021         create a variant of the generic trampoline code callable from AOTed trampolines.
1022
1023         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
1024         trampoline code callable from AOTed trampolines.
1025
1026         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
1027
1028 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1029
1030         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
1031         pass-through manner.
1032
1033         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
1034         and don't fail sharing for them anymore.
1035
1036         * mini-exceptions.c: Handle exceptions in shared generic methods.
1037
1038         * generic-sharing.c: When checking the context of a generic
1039         method, also check its class's context.  Don't treat wrappers as
1040         sharable.
1041
1042         * mini-trampolines.c: Some code factored out to
1043         metadata/generic-sharing.c.  Handle the MRGCTX case.
1044
1045         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
1046         we must deal with the method being of another instantiation of the
1047         class.  Add static rgctx invoke wrappers to generic methods.
1048
1049 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1050
1051         * mini.c: Provide all jit infos of generic shared methods with a
1052         generic jit info.
1053
1054         * mini-exceptions.c: Handle the new situation that a generic info
1055         might be available, but not info about the this/vtable/mrgctx
1056         variable.
1057
1058 2008-07-03  Mark Probst  <mark.probst@gmail.com>
1059
1060         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
1061         generic methods.
1062
1063 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
1064
1065         * dominators.c (check_dominance_frontier): Fix a warning.
1066
1067         * mini.h: Add some missing prototypes.
1068
1069         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
1070
1071         * driver.c (mono_jit_init_version): Correct the comments since the first
1072         argument should be the name of the root domain, not a filename.
1073
1074         * aot-runtime.c (make_writable): Error out if this is called while running
1075         with --aot-only.
1076         (load_aot_module): Ditto.
1077
1078         * aot-compiler.c: Really fix the computation of method indexes.
1079
1080         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
1081         optimizations as this is no longer called frequently.
1082
1083         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
1084         method and the invoke impl code and pass it to the delegate trampoline instead of
1085         just the delegate class.
1086
1087 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
1088
1089         * aot-compiler.c: Fixup the computation of method indexes.
1090         (add_wrappers): Create the base methods of the runtime invoke wrappers using
1091         the method builder infrastructure.
1092
1093         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
1094         has no header.
1095
1096         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
1097         mode, load the method right away instead of creating a trampoline.
1098
1099         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
1100
1101         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
1102         some checks a bit.
1103
1104 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
1105
1106         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
1107         (mono_aot_load_method): Use method_index instead of method->token.
1108
1109         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
1110         can handle icalls etc. properly.
1111
1112         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1113
1114         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
1115
1116         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
1117         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
1118         JIT_ICALL_ADDR patch type.
1119
1120         * patch-info.h: Add JIT_ICALL_ADDR patch type.
1121
1122         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
1123         request flag.
1124         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
1125
1126         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
1127
1128 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
1129
1130         * mini.c: Use domain->jit_code_hash_lock for controlling access to
1131         domain->jit_code_hash.
1132
1133 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
1134
1135         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
1136
1137 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
1138
1139         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
1140         get_this_arg_from_call, let it compute it when needed.
1141
1142         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
1143         gsctx from code only when needed.
1144
1145         * mini-trampolines.c (get_generic_context): Rename this to 
1146         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
1147         it can be called by the arch backends.
1148
1149         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
1150
1151 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
1152
1153         * driver.c (mono_main): Add experimental --aot-only command line option.
1154
1155         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
1156         set.
1157
1158 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
1159
1160         * driver.c (DllMain): Remove mono_module_handle.
1161
1162         Contributed under MIT/X11 license.
1163
1164 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
1165
1166         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
1167         for emitting methods which are not in the source assembly. Detect and report
1168         failure of assembling+linking.
1169         
1170         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
1171
1172         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
1173
1174 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
1175
1176         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
1177
1178 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
1179
1180         * mini.h: Remove some obsolete prototypes.
1181
1182         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
1183
1184 2008-06-24  Mark Probst  <mark.probst@gmail.com>
1185
1186         * mini.c (get_object_generic_inst): Variable-sized arrays are not
1187         supported by Visual Studio, so use alloca().
1188
1189 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
1190
1191         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
1192         Fixes #402585.
1193
1194 2008-06-23  Mark Probst  <mark.probst@gmail.com>
1195
1196         * mini.c: Fail sharing of a generic method if it contains an open
1197         catch clause (because we don't pass MRGCTXs yet).
1198
1199 2008-06-23  Mark Probst  <mark.probst@gmail.com>
1200
1201         * mini.c: When compiling a method with generic sharing, insert the
1202         method instantiated with an all-Object generic context into the
1203         jit info table, instead of the context of the first instantiation
1204         of the method we happen to compile.
1205
1206 2008-06-18  Martin Baulig  <martin@ximian.com>
1207
1208         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
1209         `major_version' and `minor_version'.
1210
1211 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1212
1213         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
1214         mono_method_is_generic_sharable_impl() takes an additional
1215         argument specifying whether to treat type variables as reference
1216         types.
1217
1218 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1219
1220         * mini.h: Removed obsolete prototypes.
1221
1222 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1223
1224         * mini.c: Don't fail generic sharing for initobj and sizeof - we
1225         already handle them.
1226
1227 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1228
1229         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
1230         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
1231         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
1232         tramp-x86.c: Added a MonoGenericContext* argument to
1233         mono_arch_get_unbox_trampoline() so that it can call other
1234         functions which require it.
1235
1236 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1237
1238         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
1239         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
1240         mono_arch_get_this_arg_from_call() takes a
1241         MonoGenericSharingContext* as well.
1242
1243 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1244
1245         * mini.c: Factor out code for emitting unbox into emit_unbox() and
1246         implement generic sharing of unbox.
1247
1248 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1249
1250         * mini.c: Don't compute the vtable to determine whether a field is
1251         special static, because it might not work for open types.
1252
1253 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1254
1255         * mini.c: Removed the unused token_type and token_source arguments
1256         from get_runtime_generic_context_ptr().
1257
1258 2008-06-17  Marek Habersack  <mhabersack@novell.com>
1259
1260         * mini.c (ADD_BINOP): fix the build
1261
1262 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
1263
1264         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
1265         a widening op.
1266
1267 2008-06-16  Mark Probst  <mark.probst@gmail.com>
1268
1269         * mini.h: Removed class relations enum that's not used anymore.
1270
1271 2008-06-16  Mark Probst  <mark.probst@gmail.com>
1272
1273         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
1274
1275         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
1276         the lazy fetch trampoline access code.
1277
1278 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
1279
1280         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
1281
1282 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
1283
1284         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
1285
1286         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
1287
1288         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
1289
1290 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
1291
1292         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
1293         intrinsics.
1294
1295         * mini-ops.h: Add MIN/MAX_UN opcodes.
1296
1297         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
1298         intrinsics.
1299
1300         * basic-math.cs: Add more min/max tests.
1301
1302         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
1303
1304 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1305
1306         * mini.c: Small fix in the prologue of emit_castclass.
1307
1308 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
1309
1310         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
1311
1312         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
1313         do not work even for unsigned types. Fixes #400014.
1314
1315         * basic-math.cs: Add regression tests for unsigned Min/Max.
1316
1317 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1318
1319         * mini.c: Added additional context_used argument to several
1320         functions, which will be needed for sharing generic methods.  Use
1321         GET_RGCTX macro wherever appropriate.  Declare only one
1322         context_used in mono_method_to_ir().
1323
1324 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1325
1326         * mini.c, generic-sharing.c: Removed generic class relations.
1327
1328         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
1329         functions due to MRGCTX changes.
1330
1331 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1332
1333         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
1334         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
1335         with calculated IMT.
1336
1337         * mini.c: Generic sharing of calls via generic interfaces.
1338
1339         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
1340         generic method with non-constant MonoGenericContext*.  Instead,
1341         the context is taken out of the method itself.
1342
1343 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1344
1345         * mini.c: Generic sharing of ldvirtftn.
1346
1347 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1348
1349         * mini.c: Generic sharing of ldftn.
1350
1351 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1352
1353         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
1354
1355 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1356
1357         * mini.c: Generic sharing of the special case of ldtoken followed
1358         by a call to GetTypeFromHandle.
1359
1360 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1361
1362         * mini.c: Generic sharing of box for nullable types.
1363
1364 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
1365
1366         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
1367         are passed on the stack. Fixes #324807.
1368
1369 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
1370
1371         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
1372         for the ArgValuetypeAddrInIReg case.
1373
1374         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
1375         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
1376
1377         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
1378         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
1379         local variable and pass the local variable by reference to the called method.
1380           
1381         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
1382         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
1383
1384         Contributed under MIT/X11 license.
1385
1386 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
1387
1388         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
1389
1390         * debug-mini.c (mono_debug_print_vars): Release memory after printing
1391         everything.
1392
1393 2008-06-10  Martin Baulig  <martin@ximian.com>
1394
1395         * debug-mini.c
1396         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
1397
1398 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
1399
1400         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
1401         possible error when no arguments are passed.
1402
1403         Contributed under MIT/X11 license.
1404
1405 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
1406
1407         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
1408         where the file name is NULL.
1409
1410 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
1411
1412         * mini.c: Fix s390 build.
1413
1414 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
1415
1416         * trace.c (mono_trace_parse_options): Fix warnings.
1417
1418         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
1419
1420 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
1421
1422         * mini.c (remove_block_if_useless): Avoid printing the method name.
1423         
1424         * mini.c: Remove needless setting of ins->cil_code which is now done by 
1425         MONO_INST_NEW.
1426
1427         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
1428         LMF. Not yet used.
1429
1430         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
1431         translated code after it has been patched.
1432
1433 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
1434
1435         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
1436         avoid problems during code patching on SMP systems.
1437         (emit_call): Avoid adding a patch info which is already added by 
1438         emit_call_body.
1439         (mono_arch_emit_exceptions): Ditto.
1440
1441 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
1442
1443         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
1444         MONO_TYPE_ISSTRUCT already checks for it.
1445
1446 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
1447
1448         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
1449           structs with floats on Winx64 the float registers are not used.  
1450           The integer registers are always used..
1451         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
1452           only one register will be used and only if the size of the struct 
1453           is 1,2,4, or 8 bytes.
1454
1455         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
1456           to work for Winx64.
1457
1458         Contributed under MIT/X11 license.
1459
1460 2008-06-05  Martin Baulig  <martin@ximian.com>
1461
1462         * debug-debugger.c (debugger_lookup_class): Also call
1463         mono_class_setup_methods() here; we're only called from RTI.
1464
1465 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
1466
1467         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
1468         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
1469         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
1470         Post-process object files and add dtrace-generated object, if necessary.
1471
1472         Contributed under MIT/X11 license.
1473
1474 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1475
1476         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
1477         element class.
1478
1479         * mini.c: Generic sharing for unbox.any and castclass.
1480
1481 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1482
1483         * mini.c: Ignore tailcall prefix in shared generic code and when
1484         doing calls which require a vtable/rgctx argument.
1485
1486 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1487
1488         * mini.c: Don't free the JIT info.
1489
1490         * driver.c: Changes in the JIT info table testing code.
1491
1492 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
1493
1494         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
1495         interruption. Fix some warnings.
1496
1497         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
1498         interruption_checkpoint.
1499
1500 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
1501
1502         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
1503         from embedding applications.
1504
1505 2008-06-02  William Holmes  <billholmes54@gmail.com>
1506
1507         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
1508           reserving 32 bytes on the stack when making calls. 
1509
1510         Contributed under MIT/X11 license.
1511
1512 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
1513
1514         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
1515         the linear IL branch.
1516
1517         * driver.c: Print out more information for --version on arm.
1518
1519 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
1520
1521         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
1522         bb_exit instead, since out of line bblocks might not actually be emitted
1523         out-of-line.
1524         
1525         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
1526         maximum epilog size for out of line bblocks if tracing is enabled.
1527
1528         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
1529
1530 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
1531
1532         * arrays.cs: Regression tests for allocating arrays with negative sizes.
1533
1534 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
1535
1536         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
1537         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
1538         opcodes.
1539
1540 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
1541
1542         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
1543         the 'value' to store is a constant.
1544
1545         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
1546
1547         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
1548         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
1549
1550 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
1551
1552         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
1553         for accessing method->generic_container.
1554
1555 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
1556
1557         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
1558         
1559         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
1560
1561         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
1562
1563         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
1564         fails.
1565
1566 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
1567
1568         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
1569
1570         * mini.c: Handle the case when mono_class_vtable () fails.
1571
1572 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
1573         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
1574         the stat profiler.
1575
1576 2008-05-22  Mark Probst  <mark.probst@gmail.com>
1577
1578         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
1579         together with domain sharing.
1580
1581 2008-05-22  Mark Probst  <mark.probst@gmail.com>
1582
1583         * mini.c: Treat callvirts to final methods like non-virtual calls
1584         when doing generic sharing, i.e. look them up in the runtime
1585         generic context.
1586
1587 2008-05-22  Mark Probst  <mark.probst@gmail.com>
1588
1589         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
1590         with computed types (for generic sharing).
1591
1592         * mini.c: Generic sharing for mkrefany and refanyval.
1593
1594 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
1595
1596         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
1597         possible.
1598
1599         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
1600         the generic sharing code.
1601         
1602         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
1603         when needed.
1604
1605 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
1606
1607         * mini.h: Remove the declaration of mono_aot_init_vtable ().
1608
1609 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
1610
1611         * driver.c: updated copyright date
1612
1613 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
1614
1615         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
1616         needed.
1617
1618 2008-05-19  Martin Baulig  <martin@ximian.com>
1619
1620         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
1621         pointing to the new `_mono_debug_using_mono_debugger' variable.
1622
1623         * driver.c
1624         (mono_main): Check mono_debug_using_mono_debugger() rather than
1625         the `MONO_INSIDE_MDB' environment variable to check whether we're
1626         inside the debugger.
1627
1628 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
1629
1630         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
1631         argument.
1632
1633 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
1634
1635         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
1636
1637         * mini.c: Added mini_assembly_can_skip_verification. This
1638         function checks if the assembly requested to skip verification. 
1639         Fixes part of #387274.
1640
1641 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
1642
1643         * mini.c (mini_get_method): Disable the check for open generic classes when
1644         using generic sharing.
1645
1646         * generics.cs: Add a test #387034.
1647
1648         * mini.c (mini_get_method): Check whenever the method class is an open generic
1649         type, and return NULL in that case, causing a verification error. Fixes
1650         #384123.
1651
1652 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
1653
1654         * driver.c (mono_main): Revert r102623. The right
1655         thing to do is to enable the verifier under verifiable
1656         unless a --security flag was passed.
1657
1658         We need this non-trivial behavior for --verify-all otherwise
1659         mcs-compileall won't be able to use it. As it needs everything to
1660         be verified under validil.
1661
1662 2008-05-06  Martin Baulig  <martin@ximian.com>
1663
1664         Fix #383749.
1665
1666         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
1667         (mono_debugger_thread_cleanup): Likewise.
1668         (mono_debugger_extended_notification): Likewise.
1669
1670 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
1671
1672         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
1673         against both inflated and non-inflated methods. We need to check against the
1674         generic definition for cases where the instantiated method is not visible.
1675         We need to check against the inflated types for cases where the instantiation
1676         changes any super type. This fixes #382986.
1677
1678         Note that this doesn't need to be applied to other parts of mono_method_to_ir
1679         that check for visibiliy as generic params only appears as the type subject
1680         of tokens on call opcodes. Field manipulation and ldftn must always
1681         target an exact type.
1682
1683 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
1684
1685         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
1686         if no related --security flag is passed.
1687
1688 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
1689
1690         * mini-arch.h: Prepare support for ppc64.
1691
1692         Contributed under MIT/X11 license.
1693
1694 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
1695
1696         * aot-runtime.c: Prepare support for ppc64.
1697
1698         Contributed under MIT/X11 license.
1699
1700 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
1701
1702         * mini-ops.h: Prepare support for ppc64.
1703
1704         Contributed under MIT/X11 license.
1705
1706 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
1707
1708         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
1709
1710         Contributed under MIT/X11 license.
1711
1712 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
1713
1714         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
1715         assemblies, since aot_name is not a full path, causing us to load MS.NET 
1716         assemblies on windows.
1717
1718 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
1719
1720         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
1721         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
1722         * main.c: Use UTF-8 encoded command line instead of Windows default code
1723         page on Windows to support Unicode.
1724         * driver.c (DllMain): New function for mixed-mode assembly support.
1725         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
1726         export __stdcall functions without decoration.
1727
1728         Contributed under MIT/X11 license.
1729
1730 2008-04-28  Mark Probst  <mark.probst@gmail.com>
1731
1732         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
1733         saving it very early.
1734
1735 2008-04-28  Mark Probst  <mark.probst@gmail.com>
1736
1737         * mini.h, mini.c: Lots of code for accessing the old RGCTX
1738         deleted.  The only way to access the new RGCTX is via the
1739         trampline.
1740
1741         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
1742         vtable instead of the RGCTX to static methods.
1743
1744         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
1745         accessing the new RGCTX.
1746
1747         * generic-sharing.c: There is no separation between self, type
1748         arguments and other types in the RGCTX anymore.
1749
1750 2008-04-25  Jonathan Chambers <joncham@gmail.com>
1751
1752         * mini-amd64.c (add_general): Remove previous stack adjustment.
1753         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
1754         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
1755         for 32 bytes of stack space reserved for all calls.
1756         
1757         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
1758         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
1759         adjustment.
1760         
1761         Code contributed under MIT/X11 license.
1762
1763 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
1764
1765         * mini.c (mini_method_verify): Only verify non-inflated methods, check
1766         against the root definition, peeling out method and type instantiations.
1767         Cache verify success results, code that fails verification is still
1768         checked multiple times.
1769
1770 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
1771
1772         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
1773
1774 2008-04-23  Jonathan Chambers <joncham@gmail.com>
1775
1776         * mini-amd64.c (add_general): Always increment stack on Win64.
1777         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
1778         on Win64.
1779         
1780         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
1781         stack based argument handling on Win64.
1782         
1783         Code contributed under MIT/X11 license.
1784
1785 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
1786
1787         * Makefile.am (version.h): Add support for git-svn.
1788
1789 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
1790
1791         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
1792         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
1793         avoiding allocations and libc functions which might deadlock.
1794         
1795         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
1796         'no-gdb-backtrace' option is set.
1797
1798         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
1799
1800         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
1801
1802 2008-04-21  Martin Baulig  <martin@ximian.com>
1803
1804         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
1805         and `get_lmf_addr'; `notification_address' is no longer a pointer.
1806
1807 2008-04-21  Martin Baulig  <martin@ximian.com>
1808
1809         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
1810         `thread_vtable', `event_handler_ptr' and `event_handler'.
1811
1812 2008-04-21  Martin Baulig  <martin@ximian.com>
1813
1814         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
1815         allows delayed initialization of the `executable_code_buffer' when
1816         attaching.
1817
1818 2008-04-21  Martin Baulig  <martin@ximian.com>
1819
1820         * mini.h (mono_debugger_create_notification_function): Removed.
1821         * tramp-*.c (mono_debugger_create_notification_function): Removed.
1822
1823         * mdb-debug-info64.s
1824         (MONO_DEBUGGER__notification_function): Added this in the .text section.
1825
1826         * mdb-debug-info32.s
1827         (MONO_DEBUGGER__notification_function): Added this in the .text section.
1828
1829         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
1830         currently only works on x86 and x86_64, so don't create it on ppc.
1831
1832 2008-04-21  Martin Baulig  <martin@ximian.com>
1833
1834         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
1835
1836         * mini.c
1837         (mini_method_compile): In the fp elimination check, check
1838         `debug_options.mdb_optimizations' in addition to
1839         mono_debug_using_mono_debugger().       
1840
1841         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
1842         disable some JIT optimizations which are only disabled when
1843         running inside the debugger.
1844         Added `--help-debug' option to describe the debugging options.
1845         (parse_debug_options): New static function to parse the `--debug'
1846         options, so we can easily add more stuff in future.
1847
1848 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
1849
1850         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
1851         the method has no body.
1852
1853 2008-04-19  Jonathan Chambers <joncham@gmail.com>
1854
1855         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
1856         assembly is not allowed in MSVC 64-bit compiler. 
1857         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
1858         as we get floating point exceptions everywhere.
1859         
1860         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
1861         correctly align arguments for call to throw_exception.
1862         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
1863         
1864         Code contributed under MIT/X11 license.
1865
1866 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
1867
1868         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
1869
1870 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
1871
1872         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
1873
1874         * mini-amd64.c (NEW_INS): Set cil_code.
1875
1876         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
1877         from mini-amd64.c so all debugger related logic is in one place.
1878
1879         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
1880         later won't have a random ip assigned to them.
1881
1882 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
1883
1884         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
1885         the arch specific function initializes code_size.
1886         (mono_create_delegate_trampoline): Ditto.
1887
1888         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
1889         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
1890         platforms.
1891
1892         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
1893         running under the debugger.
1894
1895         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
1896         debugger.
1897
1898         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
1899         debugger. Also move the disabling of optimizations here from driver.c.
1900         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
1901         debugger.
1902
1903         * mini.h (MonoCompile): Add a few new flags.
1904
1905 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
1906
1907         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
1908         so the cil_code field of created MonoInst's is properly set.
1909         (mini_select_instructions): Ditto.
1910
1911         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
1912         (MONO_INST_NEW_CALL): Ditto.
1913
1914         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
1915         in many places so the ins->cil_code field is properly initialized.
1916
1917         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
1918         place.
1919
1920 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
1921
1922         * mini.c (mini_method_compile): Print a different message when compiling a 
1923         shared method.
1924         
1925         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
1926         > 1.
1927
1928 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
1929
1930         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
1931         SSE2 instructions.
1932
1933         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
1934         
1935 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
1936
1937         * mini.c (handle_stack_args): Make this return void since its return value was
1938         never used. Also set cfg->unverifiable for invalid IL instead of calling
1939         G_BREAKPOINT ().
1940
1941 2008-04-10  Mark Probst  <mark.probst@gmail.com>
1942
1943         * mini.c: Make sure "this" is live in catch clauses with type
1944         variables in shared generic code.
1945
1946 2008-04-08  Mark Probst  <mark.probst@gmail.com>
1947
1948         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
1949         generic_class_is_reference_type() to ensure the proper behaviour
1950         when sharing generic code and the type in question is a type
1951         argument.
1952
1953 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
1954
1955         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
1956         race conditions when printing thread dumps. Fixes #377738.
1957
1958 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
1959         
1960         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
1961         shows up when both MonoInst arguments can cause aliasig.
1962         There is likely no way in the current JIT to trigger this problem, but
1963         it showed up in the development of generics sharing, when in a new
1964         opcode both args of an OP_GROUP can be aliases (addresses of a local).
1965         When the generics sharing code will be committed, its tests will be
1966         valid also for this bug.
1967
1968 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
1969
1970         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
1971         PATCH_INFO_METHOD.
1972
1973         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
1974         NULL.
1975
1976 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
1977
1978         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
1979         use a more detailed exception message for InvalidCastException.
1980
1981         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
1982
1983         * driver.c (mono_main): Add --debug=casts option to turn on better 
1984         InvalidCastException message details.
1985
1986         * mini.c (mini_get_debug_options): New helper function to return the address of
1987         the debug_options variable.
1988
1989         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
1990         the jit_tls TLS variable.
1991
1992         * mini.c (mono_jit_tls): New TLS variable.
1993
1994         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
1995         option is used.
1996
1997 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
1998
1999         * mini.h: Removed verifer related stuff. This code was moved to verify.c
2000
2001         * mini.c: Removed verifer related stuff, code moved to verify.c.
2002
2003         * driver.c: Using code from verify.c instead of mini.c.
2004
2005 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
2006
2007         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
2008         longer valid.
2009
2010 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
2011
2012         * mini.c (check_for_method_verify): Enabling verification of
2013         corlib if mono_verify_all is set. Bugs in the verifier preventing that
2014         have been fixed.
2015
2016 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
2017
2018         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
2019         caller saved registers as well.
2020         
2021         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
2022         saved registers as well.
2023
2024 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
2025
2026         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
2027
2028         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
2029         code.
2030
2031 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
2032
2033         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
2034         to get_call_info.
2035         (get_call_info): Take a gsctx argument instead of 'cfg'.
2036
2037 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
2038
2039         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
2040         mono_verify_all is set.
2041
2042         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
2043
2044         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
2045
2046 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
2047
2048         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
2049         an exception.
2050
2051         * driver.c mini.c mini.h: Add a --verify-all development option to test the
2052         verifier and the code generated by the compiler.
2053
2054 2008-03-25  Mark Probst  <mark.probst@gmail.com>
2055
2056         * mini.c: Generic sharing of the non-nullable case of the box
2057         instruction.
2058
2059 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
2060
2061         * inssel.brg: Fix the build.
2062
2063         * iltests.il.in: Add a test for lconv.ovf.u8.un.
2064
2065 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
2066
2067         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
2068         Array:Address. Fixes #372410.
2069
2070         * iltests.il.in: New tests for readonly prefix.
2071
2072 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
2073
2074         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
2075         mini-trampolines.c.
2076
2077         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
2078         mini-exceptions.c.
2079
2080         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
2081         
2082         * mini.c (mono_decompose_op_imm): New helper function.
2083
2084         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
2085         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
2086         return value.
2087
2088         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
2089         mono_arch_output_basic_block. Fix warnings.
2090
2091         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
2092         for now.
2093
2094 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
2095
2096         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
2097         since the extra frame is now detected automatically inside the loop.
2098
2099         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
2100         opts which are now in mono_peephole_ins ().
2101         
2102         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
2103
2104         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
2105         frames and skip duplicate managed-to-native frames. Fixes #367665.
2106
2107         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
2108         opts which are now in mono_peephole_ins ().
2109         (mono_arch_peephole_pass_2): Ditto.
2110
2111         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
2112
2113         * mini-codegen.c (mono_peephole_ins): New helper function containing the
2114         arch independent peephole optimizations.
2115
2116         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
2117         opts which are now in mono_peephole_ins ().
2118
2119         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
2120         
2121         * mini-s390.c (mono_arch_output_basic_block): Fix build.
2122
2123         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
2124         pattern.
2125
2126         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
2127         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
2128         opcode. 
2129
2130 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
2131
2132         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
2133         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
2134         return value.
2135
2136         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
2137         mono_arch_output_basic_block. Fix warnings.
2138
2139 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2140
2141         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
2142         conv.ovf.u.un.
2143
2144 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2145
2146         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
2147         conv.ovf.u.un.
2148
2149         * iltests.il: Add new tests.
2150
2151 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
2152
2153         * mini.c: Removed Windows version macros.
2154
2155 2008-03-20  Mark Probst  <mark.probst@gmail.com>
2156
2157         * generic-sharing.c: Put reflection types in the extensible part
2158         of the runtime generic context.
2159
2160         * mini.c: Generic sharing of the GetTypeHandle special case of the
2161         ldtoken instruction.
2162
2163 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2164
2165         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
2166
2167         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
2168         
2169         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
2170         consistency with the other version on the linear IR branch.
2171
2172         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
2173
2174         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
2175
2176         * iltests.il.in: Add new tests.
2177
2178 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
2179
2180         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
2181
2182         * iltests.il.in: Add new tests.
2183
2184 2008-03-19  Mark Probst  <mark.probst@gmail.com>
2185
2186         * mini.c: Two variables with the same name were declared in
2187         nesting contexts and one wasn't initialized.  Fixed.
2188
2189 2008-03-19  Mark Probst  <mark.probst@gmail.com>
2190
2191         * mini.c: Generic sharing of the initobj instruction.
2192
2193 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
2194
2195         * mini.c: make the test to optimize ldtoken from typeof() more
2196         precise.
2197
2198 2008-03-18  Mark Probst  <mark.probst@gmail.com>
2199
2200         * mini.c: Generic sharing of the initobj instruction for reference
2201         types.
2202
2203 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
2204
2205         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
2206         the mono_breakpoint_clean_code() code to perform bound checks.
2207
2208 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
2209
2210         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
2211         mono_arch_patch_callsite() to include the start of the managed method
2212         to be able to perform bound checks.
2213
2214 2008-03-17  Mark Probst  <mark.probst@gmail.com>
2215
2216         * mini.c: Generic sharing for the isinst instruction.
2217
2218 2008-03-17  Mark Probst  <mark.probst@gmail.com>
2219
2220         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
2221         inssel-long32-mips.brg: Added opcodes for doing indirect calls
2222         with the runtime generic context argument.
2223
2224         * mini.c: Share calls to several types of unsharable methods by
2225         putting the address of the method code in the runtime generic
2226         context and doing an indirect call.
2227
2228         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
2229         to switches.
2230
2231 2008-03-16  Mark Probst  <mark.probst@gmail.com>
2232
2233         * generic-sharing.c: Change due to a change in the runtime genric
2234         context API.
2235
2236 2008-03-15  Martin Baulig  <martin@ximian.com>
2237
2238         * tramp-x86.c
2239         (mono_arch_nullify_class_init_trampoline): Add call to
2240         mono_breakpoint_clean_code() to make things work when running
2241         inside the debugger.
2242
2243         * tramp-amd64.c
2244         (mono_arch_nullify_class_init_trampoline): Add call to
2245         mono_breakpoint_clean_code() to make things work when running
2246         inside the debugger.
2247
2248 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
2249
2250         * inssel-long.brg (reg): Fix 64 bit build.
2251
2252 2008-03-14  Mark Probst  <mark.probst@gmail.com>
2253
2254         * mini.c, mini.h: Share static generic code by passing it an
2255         implicit argument pointing to the runtime generic context.
2256
2257         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
2258         inssel-long32-mips.brg: New opcodes for calling shared static,
2259         which need to be passed the runtime generic context.
2260
2261         * mini-amd64.c, mini-x86.c: Save the runtime generic context
2262         argument on the stack in the prologue if needed.  New function for
2263         finding the runtime generic context argument from the registers
2264         saved by the trampoline.
2265
2266         * mini-amd64.h, mini-x86.h: Specify which register to use for the
2267         runtime generic context argument.
2268
2269         * tramp-amd64.c: Also restore the register used for the runtime
2270         generic context argument.
2271
2272         * mini-trampoline.c: Resolve shared static calls by consulting the
2273         runtime generic context via the new argument.
2274
2275         * generic-sharing.c: Add an argument to sharability-checking
2276         functions that specifies whether type variables should be treated
2277         as sharable type arguments.
2278
2279         * inssel-x86.brg: Removed a superfluous, buggy rule.
2280
2281         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
2282         to switches.
2283
2284 2008-03-14  Martin Baulig  <martin@ximian.com>
2285
2286         * debug-debugger.c (main_thread_handler): Call
2287         mono_runtime_run_main() without sending any notifications.
2288
2289         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
2290
2291 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
2292
2293         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
2294
2295 2008-03-14  Mark Probst  <mark.probst@gmail.com>
2296
2297         * tramp-x86.c: Fixed register restore offsets in the trampoline
2298         code for ECX and EDX.
2299
2300 2008-03-12  Geoff Norton  <gnorton@novell.com>
2301
2302         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
2303         different ucontext_t implementations.
2304         * exceptions-arm.c: Use the above defines to get exceptions working on 
2305         iPhone (based on a patch by Luke Howard lukeh@padl.com)
2306         * mini-arm.c: Implement iPhone icache support (based on a patch by
2307         Luke Howard lukeh@padl.com)
2308
2309 2008-03-12  Mark Probst  <mark.probst@gmail.com>
2310
2311         * mini.c: Enable generic sharing of calls to non-static
2312         non-interface non-generic non-value-type methods.
2313
2314         * mini-trampolines.c: Resolve calls from shared generic code.
2315
2316 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
2317
2318         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
2319
2320         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
2321
2322 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
2323
2324         * mini.c: some fixes for the AOT compiler.
2325
2326 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
2327
2328         * cpu-amd64.md: Add clob:1 to some float opcodes.
2329
2330 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
2331
2332         * mini.h: Added MiniVerifierMode enumeration.
2333
2334         * mini.c: Added mini_verifier_set_mode to control
2335         the usage of the new verifier.
2336
2337         * mini.c (mono_method): Integrated the new verifier.
2338
2339         * driver.c: Extended --security option with validil and
2340         verifiable options to activate the new verifier.
2341
2342 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
2343
2344         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
2345         optimization to ctors taking 0 or 2 arguments too.
2346
2347         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
2348         a bit.
2349
2350         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
2351
2352         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
2353
2354 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
2355
2356         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
2357         non-aot case as well.
2358
2359         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
2360
2361         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
2362         changes.
2363
2364         * aot-compiler.c (encode_patch): Ditto.
2365
2366         * mini.h (G_MININT32): Fix the definition of this.
2367
2368 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
2369
2370         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
2371
2372         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
2373
2374 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
2375
2376         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
2377         methods returning vtypes in registers.
2378         (mono_arch_allocate_vars): Ditto.
2379
2380         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
2381
2382         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
2383
2384         * generics.cs: Add a test from the linear IR branch.
2385
2386         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
2387
2388         * mini.c (inline_method): Cache failed inline attempts.
2389
2390 2008-03-04  Mark Probst  <mark.probst@gmail.com>
2391
2392         * mini.c: For shared methods of generic classes put the location
2393         of "this" into the MonoGenericJitInfo.
2394
2395         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
2396         register out of a MonoContext by register number.  Add the generic
2397         sharing context as an argument to mono_arch_find_this_argument().
2398
2399         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
2400         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
2401         for new arch function.
2402
2403         * mini-exception.c: Handle open exception clauses in shared
2404         generic code.
2405
2406         * mini-trampolines.c: Supply additional argument to
2407         mono_arch_find_this_argument().
2408
2409 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
2410
2411         * Makefile.am (regtests): Run the bench.exe tests last.
2412
2413 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
2414
2415         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
2416         a bit.
2417
2418 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
2419
2420         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
2421         with MS.
2422
2423         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
2424         
2425         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
2426
2427         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
2428         whose class has no cctor.
2429
2430         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
2431
2432 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
2433
2434         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
2435         unverified.
2436
2437 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
2438
2439         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
2440         to be in sync with the code on the linear IR branch.
2441
2442         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
2443
2444         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
2445
2446 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
2447
2448         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
2449
2450         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
2451
2452         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
2453
2454         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
2455
2456         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
2457         
2458         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
2459         body.
2460
2461 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
2462
2463         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
2464         OP_LOADR4_MEMBASE emission.
2465
2466         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
2467         (mono_spillvar_offset_float): Ditto.
2468
2469         * mini-mips.c (mono_arch_emit_prolog): Ditto.
2470
2471         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
2472         emission.
2473
2474         * basic-long.cs: Add regression tests for them.
2475
2476         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
2477         use.
2478         (mono_arch_allocate_vars): Fix representation of single-precision float
2479         argument.
2480         (mono_arch_output_basic_block): Ditto.
2481
2482         * inssel-mips.brg: Ditto, remove duplicate items.
2483
2484         * mini-mips.c (emit_load_volatile_arguments): New function to handle
2485         arguments of tail calls as on other platforms.
2486         (mono_arch_output_basic_block): Handle tail calls.
2487
2488         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
2489         register.
2490
2491         * objects.cs (test_5_pass_static_struct): Add test for it.
2492
2493         Contributed under MIT/X11 license.
2494
2495 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
2496
2497         * Makefile.am: Use gmcs for compiling the regression tests.
2498
2499         * *.2.cs *.2.il: Rename to *.cs and *.il.
2500
2501 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
2502
2503         * regalloc.h: Make the vassign array smaller.
2504
2505         * mini.c (mini_method_compile): Remove an unused field in cfg.
2506
2507         * mini-codegen.c: Add a bunch of micro optimizations.
2508
2509 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
2510
2511         * regalloc.h: Remove some unused fields.
2512
2513 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
2514
2515         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
2516
2517         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
2518
2519 2008-02-22  Mark Probst  <mark.probst@gmail.com>
2520
2521         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
2522
2523         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
2524         trampoline: Fetch an entry from the runtime generic context.  If
2525         it's NULL, jump to the actual trampoline to fill the runtime
2526         generic context.  Otherwise, return it.
2527
2528         * mini.c: Call the lazy fetch trampoline to get entries out of the
2529         runtime generic context.
2530
2531         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
2532         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
2533         tramp-sparc.c: Stubs for the lazy fetch trampoline.
2534
2535 2008-02-21  Mark Probst  <mark.probst@gmail.com>
2536
2537         * mini.c: Fetch data out of the extensible part of the runtime
2538         generic context instead of calling a helper function.
2539
2540         * generic-sharing.c: Some functions moved into
2541         metadata/generic-sharing.c.  Helper function for fetching other
2542         types now checks and asserts against extensible rgctx (just for
2543         debugging purposes - the helper function isn't called anymore
2544         unless for debugging).
2545
2546 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
2547
2548         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
2549         for tail calls up to the point that the tests in iltests.exe run. Also add a
2550         dummy CKFINITE implementation.
2551         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
2552         needed for trampoline LMF frames.
2553
2554         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
2555         trampoline LMF frames.
2556
2557 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
2558
2559         * mini.c (inline_method): clean any pending loader error when inlining fail.
2560         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
2561
2562 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
2563
2564         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
2565
2566         * aot-runtime.c (decode_patch_info): Ditto.
2567
2568         * mini.c (mono_resolve_patch_target): Ditto.
2569         
2570         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
2571         icall wrappers.
2572
2573         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
2574         
2575         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
2576         if it references an icall address.
2577
2578 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
2579
2580         * cpu-s390x.md: Remove some more unused opcodes.
2581         
2582         * cpu-s390x.md: Remove some unused opcodes.
2583
2584         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
2585         mono_op_imm_to_op ().
2586
2587         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
2588         instead of a switch statement.
2589         
2590         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
2591         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
2592
2593         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
2594         
2595         * mini-codegen.c: Remove unused mono_regstate2_... functions.
2596
2597         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
2598         -1.
2599
2600 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
2601
2602         * driver.c (mono_main): Improve error reporting when an assembly cannot be
2603         opened. Fixes #362607.
2604
2605         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
2606
2607         * iltests.il.in: Add a test for static methods in interfaces.
2608
2609 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
2610
2611         * genmdesc.c (build_table): Fix a crash on older glib versions.
2612
2613         * cpu-sparc.md: Remove some unused opcodes.
2614         
2615         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
2616         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
2617
2618         * cpu-amd64.md: Remove some unused opcodes.
2619
2620         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
2621         like the other opcodes.
2622
2623 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
2624
2625         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
2626
2627         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
2628
2629         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
2630         variables 'cfg' instead of 'm' for consistency.
2631
2632         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
2633
2634         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
2635         argument holding the vtype return address, to avoid the ambigious use of
2636         cfg->ret for this purpose.
2637
2638         * mini.c (NEW_RETLOADA): Use vret_addr if set.
2639
2640         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
2641         
2642         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
2643         new mono_print_ins () function which only takes one argument.
2644
2645 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
2646
2647         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
2648         macro arguments.
2649
2650 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
2651
2652         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
2653
2654         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
2655
2656         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
2657         opcodes and other small changes.
2658
2659         * mini-ops.h: Add some new opcodes from the linear IR branch.
2660
2661         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
2662
2663         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
2664         opcodes, use the REG_MEMBASE opcodes instead.
2665         
2666         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
2667         opcodes, use the REG_MEMBASE opcodes instead.
2668         
2669         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
2670         linear IR branch.
2671
2672         * mini.c (mono_op_imm_to_op): New helper function.
2673
2674         * mini-ops.h: Add some opcodes from linear IR branch.
2675
2676 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
2677
2678         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
2679         <tsv@solvo.ru>.
2680
2681 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
2682
2683         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
2684         OP_ICONV_TO_R4/R8.
2685
2686         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
2687
2688 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
2689
2690         * aot-compiler.c (emit_method_code): Add an assert.
2691
2692         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
2693         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
2694         methods.
2695
2696 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
2697
2698         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
2699         some load/store opcodes so they are consistent. 
2700         (mono_arch_emit_prolog): Simplify some code.
2701
2702         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
2703
2704         * objects.cs: Add tests for large argument offsets on ARM.
2705
2706         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
2707         stack offsets. Fixes #359651.
2708
2709         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
2710
2711         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
2712
2713         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
2714
2715         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
2716
2717         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
2718
2719         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
2720         rid of CEE_CONV_R_UN.
2721
2722         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
2723
2724 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
2725
2726         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
2727
2728         * mini.c (mono_normalize_opcodes): Add some more opcodes.
2729
2730         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
2731
2732         * cpu-amd64.md: Remove some unused opcodes.
2733
2734         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
2735
2736         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
2737
2738         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
2739         arch specific functions for its parts. Call the peephole pass after local
2740         regalloc so the prolog can compute a more accurate max_offset.
2741         
2742         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
2743         the corresponding OP_I/OP_L opcodes.
2744
2745         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
2746
2747         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
2748
2749 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
2750
2751         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
2752         as they are handled in mini.c.
2753
2754         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
2755         
2756         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
2757         case since it is handled in mini.c.
2758
2759         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
2760
2761         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
2762
2763         * *.c: Use the new opcodes in the IR and back end code.
2764
2765         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
2766
2767         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
2768
2769 2008-02-06  Mark Probst  <mark.probst@gmail.com>
2770
2771         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
2772         an assert because it has a race condition.
2773
2774 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
2775
2776         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
2777
2778         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
2779
2780         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
2781
2782         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
2783         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
2784
2785 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
2786
2787         * cpu-amd64.md (move): Correct the maximum size of move.
2788
2789 2008-02-05  Mark Probst  <mark.probst@gmail.com>
2790
2791         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
2792         the generic class init trampoline to return quickly if the class
2793         is already inited.
2794
2795 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
2796
2797         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
2798         issues where an 32 bit callsite cannot be patched by a 64 bit address.
2799
2800 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
2801
2802         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
2803         branch.
2804
2805 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
2806
2807         * objects.cs: Add some soft-float tests.
2808
2809         * mini.c: Fix a couple more soft-float issues.
2810
2811         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
2812
2813         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
2814         avoid a REX prefix.
2815
2816 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
2817
2818         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
2819         exception happens while compiling a virtual method.
2820
2821 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
2822
2823         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
2824         
2825         * mini-sparc.c: Fix build.
2826
2827         * mini-sparc.c (get_call_info): Add support for generic sharing.
2828
2829         * mini-exceptions.c: Add a FIXME.
2830
2831 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
2832
2833         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
2834         altstack handling code.
2835
2836         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
2837         
2838         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
2839
2840         * mini-s390.c: Add support for generic sharing.
2841
2842         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
2843         Fix CAS on s390.
2844         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
2845
2846         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
2847
2848         * mini-s390x.c: Add support for generic sharing.
2849         
2850         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
2851         Fix CAS on ia64.
2852         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
2853
2854         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
2855         can be used since it takes a 16 bit signed immediate.
2856
2857         * inssel-s390x.brg: Fix OP_SETRET.
2858
2859         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
2860
2861         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
2862
2863         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
2864
2865         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
2866
2867         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
2868         in one place.
2869
2870         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
2871         stuff.
2872
2873         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
2874         of the unused mono_arch_patch_delegate_trampoline stuff.
2875
2876 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
2877
2878         * basic-long.cs: Move the fp related tests to basic-float.cs.
2879
2880         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
2881
2882         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
2883
2884         * basic-calls.cs: Add a test for proper float argument passing.
2885
2886         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
2887         if the context corresponds to an exception received through a signal.
2888
2889         * exceptions.cs: Add a test for nullref handling at the start of a try
2890         clause.
2891
2892         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
2893
2894         * jit-icalls.c (mono_break): New JIT icall.
2895
2896         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
2897
2898         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
2899
2900 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
2901
2902         * cpu-*.md: Get rid of unused opcodes.
2903
2904         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
2905
2906         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
2907         by all platforms.
2908
2909         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
2910         define.
2911
2912         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
2913         the arch independent trampoline code in mini-trampolines.c.
2914
2915         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
2916
2917         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
2918
2919         * mini-s390.h: Remove an unused define.
2920         
2921         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
2922         the arch independent trampoline code in mini-trampolines.c.
2923
2924         * mini-arm.c (mono_arch_emit_prolog): Fix build.
2925
2926 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
2927
2928         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
2929
2930         * mini-s390.c (mono_arch_emit_prolog): Fix build.
2931
2932         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
2933
2934         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
2935
2936         * cpu-amd64.md: Use smaller sizes for int opcodes.
2937
2938         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
2939
2940         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
2941         objects.cs.
2942
2943         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
2944         debugging.
2945
2946         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
2947         instead of though a pointer to save an indirection when accessing elements of
2948         the array.
2949
2950         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
2951         some typos.
2952         (NOT_IMPLEMENTED): New helper macro.
2953         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
2954         of a bb.
2955
2956         * *.c: Use the new helper macro.
2957
2958 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
2959
2960         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
2961
2962 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
2963
2964         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
2965         stack slots.
2966
2967 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
2968
2969         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
2970         profiling is enabled.
2971         
2972         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
2973         the end.
2974         (mono_arch_emit_prolog): Add more first bblock optimizations.
2975
2976         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
2977         in order if possible.
2978         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
2979         bblock, since the arguments are still in their original registers.
2980
2981         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
2982
2983 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
2984
2985         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
2986         as well.
2987
2988         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
2989         offset 0.
2990
2991         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
2992
2993         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
2994         process async exceptions received while in unmanaged code.
2995
2996         * mini.c (mini_init): Install a callback with the runtime which will be called
2997         when a thread receives an async exception while in unmanaged code.
2998
2999         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
3000
3001         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
3002
3003 2008-01-16  Wade Berrier  <wberrier@novell.com>
3004
3005         * cpu-g4.md:
3006         * cpu-arm.md:
3007         * cpu-s390x.md:
3008         fix build
3009
3010 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
3011
3012         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
3013         compilation with sun cc.
3014
3015         * cpu-*.md: Fix the build.
3016
3017         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
3018
3019         * mini-amd64.h: Add some comments to the MonoLMF structure.
3020
3021         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
3022         
3023         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
3024         in the LMF structure if possible. This saves two instructions in the
3025         managed->native wrappers.
3026
3027         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
3028
3029 2008-01-16  Mark Probst  <mark.probst@gmail.com>
3030
3031         * generic-sharing.c: New type argument lookup code which uses the
3032         runtime generic context template.
3033
3034 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
3035
3036         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
3037
3038         * mini-arm.c (add_general): Fix arm eabi parameter passing.
3039         (mono_arch_output_basic_block): Fix localloc implementation.
3040
3041         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
3042
3043         * mini-ia64.c (peephole_pass): Fix ia64 build.
3044
3045         * mini-amd64.c (peephole_pass): Fix a warning.
3046         
3047         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
3048         at a constant offset from sp/fp.
3049
3050         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
3051         instead of obtaining it from *lmf in the managed method case.
3052
3053 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
3054
3055         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
3056
3057 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
3058
3059         * mini.h (MonoInstList): New type.
3060         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
3061         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
3062         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
3063         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
3064         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
3065         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
3066         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
3067         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
3068         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
3069         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
3070         MONO_INST_LIST_FOR_EACH_ENTRY,
3071         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
3072         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
3073         mono_inst_list_first, mono_inst_list_last,
3074         mono_inst_list_next, mono_inst_list_prev): New instruction
3075         list handling interfaces.
3076         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
3077         list head 'ins_list'.
3078         (MonoInst): Replace next pointer with list head 'node'.
3079         (MonoCallInst): Make 'out_args' a MonoInstList.
3080         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
3081         (MonoCompile): Delete reverse_inst_list and
3082         reverse_inst_list_len.
3083         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
3084         mono_arch_lowering_pass, mono_arch_local_regalloc,
3085         mono_arch_output_basic_block, mono_arch_emit_prolog):
3086         Convert to new instruction lists.
3087         (insert_after_ins): Delete.
3088         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
3089         instruction lists.
3090         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
3091         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
3092         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
3093         mono_emulate_opcode, mono_emit_load_got_addr,
3094         inline_method, mono_method_to_ir, mono_print_bb_code,
3095         print_dfn, decompose_pass, nullify_basic_block,
3096         replace_out_block_in_code, remove_block_if_useless,
3097         merge_basic_blocks, move_basic_block_to_end,
3098         try_unsigned_compare, optimize_branches, mono_print_code,
3099         mini_select_instructions, remove_critical_edges): Likewise.
3100         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
3101         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
3102         mono_arch_output_basic_block, mono_arch_emit_prolog):
3103         Likewise.
3104         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
3105         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3106         mono_arch_output_basic_block): Likewise.
3107         (inst_list_prepend, insert_after_ins): Delete.
3108         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
3109         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
3110         instruction lists.
3111         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
3112         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
3113         mono_arch_emit_prolog): Likewise.
3114         * cfold.c (mono_constant_fold): Likewise.
3115         * liveness.c (visit_bb, mono_analyze_liveness,
3116         optimize_initlocals): Likewise.
3117         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
3118         * graph.c (mono_draw_code_cfg): Likewise.
3119         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
3120         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
3121         mono_ssa_cprop): Likewise.
3122         * abcremoval (get_relations_from_previous_bb, process_block):
3123         Likewise.
3124         * local-propagation (mono_cprop_invalidate_values,
3125         mono_local_cprop_bb): Likewise.
3126         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
3127         peephole_pass, mono_arch_output_basic_block,
3128         mono_arch_emit_prolog): Likewise.
3129         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
3130         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3131         mono_arch_emit_prolog): Likewise.
3132         (insert_after_ins): Delete.
3133         * aliasing.c (print_code_with_aliasing_information,
3134         mono_build_aliasing_information, mono_aliasing_deadce):
3135         Convert to new instruction lists.
3136         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
3137         peephole_pass, NEW_INS, mono_arch_lowering_pass,
3138         mono_arch_local_regalloc, mono_arch_output_basic_block):
3139         Likewise.
3140         (insert_after_ins): Delete.
3141         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
3142         peephole_pass, mono_arch_output_basic_block): Convert to
3143         new instruction lists.
3144         * mini-codegen (InstList, inst_list_prepend,
3145         insert_after_ins): Delete.
3146         (insert_before_ins, get_register_force_spilling,
3147         get_register_spilling, free_up_ireg, free_up_reg,
3148         create_copy_ins, create_spilled_store, alloc_int_reg,
3149         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
3150         to new instruction lists.
3151         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
3152         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3153         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
3154         (insert_after_ins): Delete.
3155         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
3156         mono_arch_local_regalloc, mono_arch_output_basic_block,
3157         mono_arch_call_opcode): Convert to new instruction lists.
3158         (insert_after_ins): Delete.
3159         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
3160         peephole_pass, mono_arch_output_basic_block,
3161         mono_arch_emit_prolog): Convert to new instruction lists.
3162
3163 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
3164
3165         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
3166
3167         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
3168         Fixes #353182.
3169
3170         * Makefile.am (version.h): Make this work with non-bash shells.
3171
3172 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
3173
3174         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
3175
3176 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
3177
3178         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
3179         the InitializeArray optimization.
3180
3181 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
3182
3183         * mini.c driver.c: Don't include os/gc_wrapper.h.
3184
3185 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
3186
3187         * mini.c (print_jit_stats): Print GC statistics if available.
3188
3189 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
3190
3191         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
3192
3193 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
3194
3195         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
3196
3197 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
3198
3199         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
3200         
3201         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
3202
3203         * driver.c (mono_main): Ditto.
3204
3205 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
3206
3207         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
3208
3209         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
3210         in the vtable can't be encoded.
3211         (compile_method): Ditto.
3212
3213 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
3214
3215         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
3216         defined.
3217
3218         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
3219         lmf->rbp.
3220
3221         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
3222         the top LMF entry belongs to the current method.
3223
3224         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
3225
3226 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
3227
3228         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
3229         
3230         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
3231
3232         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
3233
3234         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
3235
3236         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
3237
3238         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
3239         implementation.
3240
3241         * basic-float.cs: Add an ulong->double cast test.
3242
3243 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
3244
3245         * mini.c (mono_method_to_ir): Fix a warning.
3246
3247 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
3248
3249         * mini-ops.h: Add OP_SWITCH.
3250
3251         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
3252         CEE_SWITCH in back-end code, use OP_SWITCH instead.
3253
3254 2007-12-11  Geoff Norton  <gnorton@novell.com>
3255
3256         * mini-s390x.c: Minor change to the MAX() define to allow
3257         it to compile with other gcc versions.
3258
3259 2007-12-11  Geoff Norton  <gnorton@novell.com>
3260
3261         * cpu-s390x.md:
3262         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
3263
3264 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
3265
3266         exceptions-arm.c (mono_arch_get_restore_context): Restore
3267         the frame pointer.
3268
3269         exceptions-arm.c (throw_exception): Save the frame pointer.
3270         This is a partial fix for #323747. Only the client side is
3271         fixed.
3272
3273 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
3274
3275         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
3276         was using an unrelated variable to log the class which
3277         needed the cctor to be called. This was crashing on arm.
3278
3279 2007-12-09  Robert Jordan  <robertj@gmx.net>
3280
3281         * mini-x86.c (mono_arch_emit_epilog):
3282         Consider all kinds of 64-bit types. Fixes #323114.
3283
3284 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
3285
3286         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
3287
3288 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
3289
3290         * mini-amd64.c (peephole_pass): Add a missing instruction check.
3291
3292 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3293
3294         * mini.c: run type ctor before allocating an object, not only
3295         when running it's constructor method (fixes at least part of bug #342507).
3296
3297 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
3298         
3299         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
3300         
3301         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
3302         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
3303         function.
3304
3305         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
3306         mono_generic_class_init_trampoline () the same as it is done with the other
3307         trampolines.
3308
3309         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
3310         aot-runtime.c aot-compiler.c: Implement AOT support.    
3311
3312 2007-12-07  Mark Probst  <mark.probst@gmail.com>
3313
3314         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
3315         build for archs which don't have the vtable trampoline defined
3316         yet.
3317
3318 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
3319
3320         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
3321
3322         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
3323
3324         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
3325
3326         * tramp-<ARCH>.c: Use the new helper function.
3327
3328 2007-12-07  Mark Probst  <mark.probst@gmail.com>
3329
3330         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
3331         trampoline call, which takes a vtable argument.
3332
3333         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
3334         OP_TRAMPCALL_VTABLEs like other calls.
3335
3336         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
3337         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
3338         call.  Implemented a support function which fetches the vtable
3339         from a register set.
3340
3341         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
3342         Implemented a generic class init trampoline, using the
3343         OP_TRAMPCALL_VTABLE opcode.
3344
3345         * mini.c: Implemented static field access when sharing generic
3346         code.  This implies initing the class using the new
3347         OP_TRAMPCALL_VTABLE call.
3348
3349 2007-12-07  Mark Probst  <mark.probst@gmail.com>
3350
3351         * mini.c: Don't compile methods with sharing enabled if their
3352         classes are disabled for sharing.
3353
3354 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
3355
3356         * inssel.brg: Add a missing sign extension to the GETCHR and array access
3357         opcodes. Fixes #346563.
3358
3359         * objects.cs: Add a new test.
3360
3361         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
3362
3363         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
3364         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
3365
3366 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
3367
3368         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
3369
3370 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
3371
3372         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
3373         code stream.
3374
3375 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
3376
3377         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
3378
3379         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
3380         optimization in the AOT case.
3381         
3382 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
3383
3384         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
3385         
3386         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
3387
3388         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
3389
3390         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
3391
3392         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
3393         is created by the inlined delegate ctor.
3394
3395         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
3396
3397         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
3398
3399 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
3400
3401         * cpu-x86.md: Fix the length of ckfinite.
3402
3403 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
3404
3405         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
3406         
3407         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
3408         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
3409
3410         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
3411
3412         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
3413         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
3414
3415 2007-11-28  Martin Baulig  <martin@ximian.com>
3416
3417         * mini-x86.c
3418         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
3419         after creating the trampoline.
3420
3421 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
3422
3423         * aot-runtime.c (load_aot_module): Check runtime version if needed.
3424
3425         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
3426         the same version.
3427
3428         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
3429         instead of the calling method to help AOT.
3430
3431         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
3432
3433 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
3434
3435         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
3436         is defined.
3437
3438 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
3439
3440         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
3441         
3442         * aot-compiler.c (compile_method): Correct check for generic method definitions.
3443         (encode_method_ref): No need to handle generic method definitions specially.
3444
3445         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3446
3447         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
3448         decode_klass_info.
3449
3450         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
3451         encode_klass_info.
3452         (compile_method): Enable generic sharing.
3453
3454 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
3455
3456         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
3457         (mini_method_compile): Add preliminary support for AOTing shared generic code.
3458
3459         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
3460         generic code.
3461
3462         * mini-trampolines.c: Fix a warning.
3463
3464         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
3465         NEW_PCONST.
3466         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
3467         (generic_class_is_reference_type): Remove unused function.
3468
3469         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
3470         in the generic vtable trampoline case.
3471
3472         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
3473         
3474         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
3475         return an AOT method based on a vtable slot.
3476
3477         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
3478
3479         * mini.c (mini_get_vtable_trampoline): Export this.
3480
3481 2007-11-22  Martin Baulig  <martin@ximian.com>
3482
3483         * debug-debugger.h
3484         (MonoDebuggerInfo): Move `debugger_version' up.
3485
3486 2007-11-22  Martin Baulig  <martin@ximian.com>
3487
3488         * mini-amd64.c
3489         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
3490
3491         * mini-trampolines.c
3492         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
3493         after compiling the method.
3494
3495 2007-11-20  Martin Baulig  <martin@ximian.com>
3496
3497         * debug-mini.c
3498         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
3499         (mono_debugger_remove_breakpoint): Likewise.
3500         (mono_debugger_check_breakpoints): Likewise.
3501
3502         * debug-debugger.c: Implement the new breakpoint interface here.
3503
3504 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
3505
3506         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
3507         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
3508
3509         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
3510
3511 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
3512
3513         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
3514
3515         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
3516         mini.c.
3517
3518         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
3519         mini.c.
3520
3521         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
3522         returning a vtype in a register.
3523
3524         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
3525         here from the arch specific code.
3526
3527         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
3528         mini.c.
3529
3530         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
3531         (mono_arch_emit_prolog): Increment maximum prolog size.
3532
3533         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
3534         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
3535
3536         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
3537         MonoGenericSharingContext.
3538
3539         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
3540         MonoGenericSharingContext. Allocate memory from the cfg mempool.
3541
3542 2007-11-15  Mark Probst  <mark.probst@gmail.com>
3543
3544         * mini.c, mini.h, generic-sharing.c: Functions for producing code
3545         which extract fields out of the runtime generic context.  Full
3546         sharing of the NEWARR opcode.
3547
3548 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3549
3550         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
3551         --enable-minimal=ssa.
3552
3553 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
3554
3555         * mini-trampolines.c (mono_delegate_trampoline): Update after 
3556         mono_marshal_get_delegate_invoke () signature change.
3557
3558 2007-11-13  Mark Probst  <mark.probst@gmail.com>
3559
3560         * mini.c: Removed the shared context in favor of the generic
3561         sharing context.  Allocate the MonoJitInfo structure with room for
3562         the generic sharing context if it's needed.
3563
3564         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
3565         domain-internals.h now.
3566
3567         * mini-x86.c: Pass the generic sharing context to get_call_info ().
3568
3569         * generic-sharing.c: Several changes for working without a shared
3570         context and instead operating on open types instead.
3571
3572 2007-11-12  David S. Miller  <davem@davemloft.net>
3573
3574        * inssel-sparc.brg: Fix double instruction emit.
3575
3576 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
3577
3578         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
3579         Get/Set/Address methods.
3580         
3581         * mini.c debug-debugger.c mini-trampolines.c: Update after 
3582         mono_marshal_get_delegate_invoke signature change.
3583
3584 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
3585
3586         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
3587         This can happens with dynamic methods. Fixes the other bug in #322722.
3588
3589 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
3590
3591         * tramp-arm.c (mono_arch_patch_callsite): Support patching
3592         BX call sequence.
3593
3594         * mini-arm.c (arm_patch): Implement patching of BX call
3595         sequence. Fixes one of the bugs in #322722.
3596
3597 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
3598
3599        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
3600        under Linux.  We only need to flush every 32-byte cache line.    
3601
3602 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
3603
3604         * mini.c:
3605         move_basic_block_to_end: Add branches when needed, eventually creating
3606         a new BB.
3607         optimize_branches: added a parameter that tells if it's ok to create
3608         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
3609         and avoid calling move_basic_block_to_end when it's not ok.
3610         Fixes bug 318677.
3611
3612 2007-11-07  Mark Probst  <mark.probst@gmail.com>
3613
3614         * mini.c: Abort inlining call to InitializeArray if something
3615         looks wrong.  Let the icall handle it, which now has proper safety
3616         checks.
3617
3618 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
3619
3620         * mini.c (mono_spill_call): add support for soft-float.
3621
3622         * mini.c (mono_method_to_ir): add support for soft-float
3623         to inlined functions that return float.
3624
3625         * mini.c (mono_method_to_ir): add support for soft-float
3626         to cee_stsfld opcode on float fields.
3627
3628 2007-11-05  Geoff Norton  <gnorton@novell.com>
3629
3630         * mini-x86.h: Fix the structure access for X86 Leopard.
3631
3632
3633 2007-11-05  Martin Baulig  <martin@ximian.com>
3634
3635         * mini-trampolines.c
3636         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
3637         after compiling the method to notify the debugger.
3638
3639 2007-11-05  Martin Baulig  <martin@ximian.com>
3640
3641         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
3642
3643 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
3644
3645         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
3646         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
3647
3648 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
3649
3650         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
3651         native-to-managed wrappers.
3652         
3653 2007-11-01  Geoff Norton  <gnorton@novell.com>
3654
3655         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
3656         members.
3657
3658 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
3659
3660         * mini.c, mini-x86.c: when getting back from unmanaged code
3661         to managed via a marshaled delegate we also need to set the
3662         right domain.
3663
3664 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3665
3666         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
3667         for amd64.
3668
3669 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3670
3671         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
3672         let the debugger or other external agents to tell the JIT when
3673         a sw breakpoint has been inserted in the code that the JIT needs
3674         to be able to inspect.
3675
3676 2007-10-31  Martin Baulig  <martin@ximian.com>
3677
3678         * debug-debugger.h
3679         (MonoDebuggerInfo): Remove `runtime_class_init'.
3680
3681 2007-10-30  Martin Baulig  <martin@ximian.com>
3682
3683         * debug-mini.h
3684         (mono_debugger_thread_created): Added `MonoThread *' argument.
3685         (mono_debugger_extended_notification): New public method.
3686         (mono_debugger_trampoline_compiled): New public method.
3687
3688         * debug-mini.c
3689         (MonoDebuggerThreadInfo): Added `thread' and
3690         `extended_notifications' fields.
3691
3692         * debug-debugger.c
3693         (debugger_executable_code_buffer): New static variable.
3694
3695         * debug-debugger.h
3696         (MonoDebuggerInfo): Added `executable_code_buffer',
3697         `executable_code_buffer_size', `breakpoint_info_area',
3698         `breakpoint_table' and `breakpoint_table_size'.
3699
3700 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
3701
3702         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
3703         that IP  either is an unused value or the vtable pointer. IMT 
3704         calls use vtable + offset now. Reduced by almost half the size
3705         of IMT entries.
3706
3707 2007-10-26  Jonathan Chambers <joncham@gmail.com>
3708
3709         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
3710         defines to access param registers. Replace long usage with
3711         gsize as sizeof(long) != sizeof(void*) on Win64.
3712
3713         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
3714         on Win64. Fix intrinsic, use _AddressOfReturnAddress
3715         instead of non-existant _GetAddressOfReturnAddress.
3716
3717         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
3718         param registers. Save/restore %rdi and %rsi in MonoLMF.
3719
3720         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
3721         param registers. Modify (throw_exception) signature to take 
3722         %rdi and %rsi on Win64. 
3723
3724         Code is contributed under MIT/X11 license.
3725
3726 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3727
3728         * helpers.c: unlink debugging output files.
3729
3730 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
3731
3732         * mini.c: Move mono_create_ftnptr () to object.c.
3733
3734 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
3735
3736         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
3737         optional. This function can now be used to disassemble code generated
3738         outside the JIT such as trampolines and IMT thunks.
3739
3740         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
3741
3742         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
3743         vtable pointer from a ldr instruction.
3744
3745         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
3746         new IMT call sequence.
3747
3748         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
3749         call sequence for interface invocations.
3750
3751         * mini-arm.c (mono_arch_emit_imt_argument): added, required
3752         for imt support. This function is empty since IMT on ARM requires no
3753         special handling on the IR side.
3754
3755         * mini-arm.c (mono_arch_find_imt_method): added, required for
3756         imt support.
3757
3758         * mini-arm.c (mono_arch_find_this_argument): added, required
3759         for imt support.
3760
3761         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
3762         a ldr instruction to load a value stored in the code stream.
3763
3764         * mini-arm.c (mono_arch_build_imt_thunk):added, required
3765         for imt support.
3766
3767
3768 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
3769
3770         * mini.c (mini_init): Install the jump trampoline callback.
3771
3772 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3773
3774         * mini-trampolines.c: handle synchronized methods with the common
3775         vtable trampoline (bug #335601).
3776
3777 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
3778
3779         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
3780
3781         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
3782         64 bit platforms.
3783
3784         * mini-ia64.h mini-ia64.c: Add support for IMT.
3785
3786         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
3787         prolog. Fixes #331958.
3788
3789 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
3790
3791         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
3792
3793 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3794
3795         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
3796         trampoline.
3797
3798 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3799
3800         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
3801         trampoline.
3802
3803 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
3804
3805         * mini-x86.c, mini-x86.h: x86 support for the common vtable
3806         trampoline.
3807
3808 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
3809
3810         * mini-trampolines.c: changed the magic rampoline to understand
3811         the common vtable trampoline method: the method to invoke is
3812         determined by the vtable displacement of the call.
3813
3814 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3815
3816         * mini.c, mini.h: register the common vtable trampoline if the
3817         architecture supports it.
3818
3819 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3820
3821         * cpu-amd64.md: use the correct max length for tls_get.
3822
3823 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
3824
3825         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
3826         CEE_STELEM_ANY. Fixes #333696.
3827
3828 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
3829
3830         * exceptions-x86.c: provide more graceful handling of the case where
3831         we followed a bogus function pointer from managed code (bug #332866).
3832
3833 2007-10-11  Mark Probst  <mark.probst@gmail.com>
3834
3835         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
3836         replaces the generic_shared flag and will carry more information
3837         in the future.
3838
3839         * generic-sharing.c: Added mini_type_stack_size() which allows
3840         allows open types if given a generic sharing context.
3841         mini_get_basic_type_from_generic() takes a
3842         MonoGenericSharingContext* instead of a MonoCompile* now.
3843
3844         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
3845         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
3846         mini-sparc.c, mini-x86.c: Trivial changes required by the two
3847         changes above.  Just passing arguments through to the right
3848         places.
3849
3850 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
3851
3852         * mini-arm.c: unify the call emission to emit_code_seq().
3853
3854 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
3855
3856         * tramp-arm.c: reduced the trampoline size.
3857
3858 2007-10-10  Mark Probst  <mark.probst@gmail.com>
3859
3860         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
3861         variable handling out of arch-specific code.
3862
3863 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
3864
3865         * mini-arm.c: implemented fast delegate dispatch.
3866
3867 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
3868
3869         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
3870         that fp elimination is turned off if the space required by locals is too
3871         big. Fixes #331958.
3872
3873 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3874
3875         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
3876         ARM to the new style trampoline.
3877
3878 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
3879
3880         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
3881
3882         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
3883
3884 2007-10-09  Martin Baulig  <martin@ximian.com>
3885
3886         * debug-debugger.h
3887         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
3888         `field_info_offset_offset'.     
3889
3890 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
3891
3892         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
3893         removed more internal usage of the r11 register and made it available
3894         to the register allocator.
3895
3896 2007-10-08  Mark Probst  <mark.probst@gmail.com>
3897
3898         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
3899         when sharing generics and treat type variables as references.
3900
3901 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
3902
3903         * mini-ppc.c: started removing the internal uses of register r11
3904         to eventually allow the register allocator to manage it as an
3905         additional available register.
3906
3907 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
3908
3909         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
3910
3911 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
3912
3913         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
3914         specific trampolines as they are not performance critical as a jump
3915         target (maybe align as before only for AOT code?). This saves about
3916         200 KB of native code on x86 for monodevelop startup.
3917
3918 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
3919
3920         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
3921         monodevelop startup.
3922
3923 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
3924
3925         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
3926
3927         * mini-sparc.h mini-sparc.c: Implement IMT support.
3928
3929         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
3930         its smaller and doesn't clobber sparc_g1.
3931
3932         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
3933
3934 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
3935
3936         * mini-ppc.c: optimized the size of the IMT thunks a bit.
3937
3938 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
3939
3940         * mini-ppc.c: implemented fast delegate invocation.
3941
3942 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
3943
3944         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
3945
3946 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
3947
3948         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
3949         code to the new style trampoline in preparation for IMT support.
3950
3951 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
3952
3953         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
3954         systems already. This also reduces the specific trampiline sizes and
3955         prepares for the use of r12 as the IMT identifier register.
3956
3957 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3958
3959         * mini-mips.h: endianess fix (simplified from a patch by
3960         Thomas Kunze <thommy@tabao.de>, bug #323737).
3961
3962 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
3963
3964         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
3965         to access ucontext fields and enable netbsd support
3966         (partially from Magnus Henoch <mange@freemail.hu>).
3967
3968 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3969
3970         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
3971         use the preprocessor from the CPP env var if it is set.
3972
3973 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
3974
3975         * mini-trampolines.c: fixed an assertion and moved it earlier in the
3976         code, before interface_offset gets used.
3977
3978 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
3979
3980         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
3981         mono_class_setup_vtable () before accessing klass->vtable.
3982
3983 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
3984
3985         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
3986         hackish.
3987
3988 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3989
3990         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
3991         IMT slots (this saves hundreds of KB of memory in programs like
3992         IronPython and Monodevelop).
3993
3994 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
3995
3996         * mini.c: print the delegate counter.
3997
3998 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
3999
4000         * mini-x86.c: make it easier to enable the debugging code for IMT
4001         slots.
4002
4003 2007-09-28  Martin Baulig  <martin@ximian.com>
4004
4005         * debug-debugger.h
4006         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
4007         `mono_method_klass_offset' and `mono_method_token_offset'.
4008
4009 2007-09-20  Mark Probst  <mark.probst@gmail.com>
4010
4011         * mini.c: First generics sharing implementation.  Can only share
4012         in very simple cases.  If sharing doesn't work it falls back to
4013         dedicated compilation.
4014
4015         * mini.h: Flag in MonoCompile to specify whether generic
4016         compilation is shared.  Flags enum for marking which generic inst
4017         of a context is used.  Prototypes for helper functions.
4018
4019         * generic-sharing.c: Helper functions for generic method sharing.
4020
4021         * optflags-def.h: Optimization flag (gshared) for enabling generic
4022         method sharing added.
4023
4024         * Makefile.am: generic-sharing.c added.
4025
4026 2007-09-19 Daniel Nauck <dna@mono-project.de>
4027
4028         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
4029
4030 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
4031         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
4032         fixes bug 325507.
4033
4034 2007-09-19  Martin Baulig  <martin@ximian.com>
4035
4036         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
4037         mono_debug_cleanup() is now part of mono_cleanup().
4038
4039 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
4040
4041         * driver.c (mono_main): Fix a warning.
4042
4043 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
4044
4045         * aot-compiler.c: Optimize various parts when processing large assemblies.
4046         Fixes ##325568.
4047
4048         * mini.c (mono_patch_info_hash): Improve hash function.
4049
4050 2007-09-14  Jonathan Chambers <joncham@gmail.com>
4051
4052         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
4053         
4054         Code is contributed under MIT/X11 license.
4055
4056 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4057
4058         * mini.c (mini_init): Fix a leak.
4059
4060         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
4061
4062 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4063
4064         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
4065
4066 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4067
4068         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
4069
4070 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
4071
4072         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
4073         variance tests.
4074
4075         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
4076
4077         * mini.c (handle_alloc): Enable managed allocators in AOT code.
4078
4079         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
4080
4081         * aot-runtime.c (decode_patch_info): Ditto.
4082
4083 2007-09-12  Jonathan Chambers <joncham@gmail.com>
4084
4085         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
4086         static case. Cache delegates in architecture specific code, 
4087         based on number of parameters.
4088         
4089         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
4090         in architecture specific code, based on number of parameters.
4091         
4092         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
4093         caching happen in architecture specific code now.
4094         
4095         Code is contributed under MIT/X11 license.
4096
4097 2007-09-12  Jonathan Chambers <joncham@gmail.com>
4098
4099         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
4100         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
4101         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
4102
4103         Code is contributed under MIT/X11 license.
4104
4105 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
4106         * mini.c: (mono_thread_abort) Fixed bug #82416.
4107
4108 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
4109
4110         * mini.: hook the new managed GC allocation feature into the JIT.
4111
4112 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4113
4114         * mini.c: implementation for the new runtime tls opcode.
4115
4116 2007-09-11  Martin Baulig  <martin@ximian.com>
4117
4118         * debug-debugger.h
4119         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
4120         `mono_method_inflated_offset'.
4121
4122 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
4123
4124         * driver.c mini.h mini.c: Add a new devel command line option for injecting
4125         async exceptions into a method.
4126
4127         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
4128         purpose of testing whenever the unwinder works at every instruction.
4129
4130 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
4131
4132         * mini.c: check accessibility of method used in ldftn (fixes
4133         bug #82635).
4134
4135 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
4136
4137         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
4138
4139         * inssel.brg: Fix a warning.
4140
4141 2007-09-03  Martin Baulig  <martin@ximian.com>
4142
4143         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
4144         now takes the `main_method' as argument.
4145
4146 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
4147
4148         * cpu-sparc.md (endfilter): Add missing src1:i argument.
4149
4150 2007-08-30  Jonathan Chambers <joncham@gmail.com>
4151
4152         * driver.c: include the cil-coff.h header on Windows.
4153         
4154         Code is contributed under MIT/X11 license.
4155
4156 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
4157
4158         * mini.c, driver.c: don't include the cil-coff.h header.
4159
4160 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
4161
4162         * mini.c: flag places that needs fixes fo soft-float support.
4163
4164 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
4165
4166         * mini.h, inssel-float.brg: fix soft-float constant loads on big
4167         endian systems (partially from Dean Jenkins, bug #81924).
4168
4169 2007-08-28  Mark Probst  <mark.probst@gmail.com>
4170
4171         * mini.c (check_linkdemand): Remove embedded reference object in
4172         call to LinkDemandSecurityException.
4173         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
4174         with an IntPtr instead of a reference object.
4175
4176 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
4177
4178         * mini.c (handle_initobj): Handle alignment properly.
4179
4180         * inssel.brg (mini_emit_memset): Ditto. 
4181
4182         * inssel.brg (mini_emit_memcpy): Ditto. 
4183
4184         * inssel-sparc.brg: Ditto.              
4185
4186         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
4187
4188 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
4189
4190         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
4191         exceptions raised in unmanaged code. Fixes part of #82594.
4192
4193 2007-08-24  Mark Probst  <mark.probst@gmail.com>
4194
4195         * mini.c (mono_method_to_ir), declsec.c
4196         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
4197
4198 2007-08-22  Martin Baulig  <martin@ximian.com>
4199
4200         * debug-mini.h
4201         (MonoDebuggerThreadInfo): New typedef.
4202         (mono_debugger_thread_table): New global variable.
4203         (mono_debugger_thread_created): New public function.
4204         (mono_debugger_thread_cleanup): New public function.
4205
4206         * debug-debugger.h
4207         (MonoDebuggerInfo):
4208         - removed `get_current_thread' and `lookup_assembly'.
4209         - removed `data_table'.
4210         - added `thread_table'.
4211
4212         * mini.c
4213         (mono_thread_start_cb): Call mono_debugger_thread_created().
4214         (mono_thread_attach_cb): Likewise.
4215         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
4216         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
4217         initial domain.
4218
4219         * driver.c (mono_main): Move mono_debug_init() up, before calling
4220         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
4221
4222 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4223
4224         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
4225         together when passing several arguments of type double (gives a small
4226         speedup and saves a few bytes of generated code).
4227
4228 2007-08-20  Jb Evain  <jbevain@novell.com>
4229
4230         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
4231
4232 2007-08-20  Jb Evain  <jbevain@novell.com>
4233
4234         * mini.c (mono_method_to_ir): throw MethodAccessException
4235         and FieldAccessException instead of InvalidProgramException.
4236
4237 2007-08-20  Mark Probst  <mark.probst@gmail.com>
4238
4239         * mini.c: CoreCLR security checks.
4240
4241         * mini.h: Removed MonoSecurityMode (moved to
4242         metadata/security-manager.h) and mono_security_mode global var
4243         (replaced by set/get functions in security-manager.h).
4244
4245         * driver.c: Added "core-clr-test" security mode for testing.  Used
4246         set-function for setting security mode.
4247
4248 2007-08-17  Mark Probst  <mark.probst@gmail.com>
4249
4250         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
4251         the new jit_info_table.
4252
4253         * driver.c: Test code for the new jit_info_table (enabled by the
4254         define MONO_JIT_INFO_TABLE_TEST).
4255
4256 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
4257
4258         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
4259         detection of call <REG> instruction sequence. Fixes build on freebsd.
4260
4261 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
4262
4263         * mini-exceptions.c: Fix a warning.
4264
4265 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
4266
4267         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
4268         stack overflow handling code on amd64 too.
4269
4270         * mini-exceptions.c (mono_setup_altstack): Make this use 
4271         mono_thread_get_stack_bounds ().
4272
4273         * mini-x86.h: Disable sigaltstack on solaris x86.
4274
4275 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
4276
4277         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
4278
4279 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
4280
4281         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
4282
4283 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
4284
4285         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
4286
4287         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
4288
4289 2007-08-03  Neale Ferguson <neale@sinenomine.net>
4290
4291         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
4292         due to alignment.
4293
4294 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
4295
4296         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
4297         to be emitted (bug #82281).
4298
4299 2007-08-01  Martin Baulig  <martin@ximian.com>
4300
4301         Merged the `debugger-dublin' branch.
4302
4303         * debug-debugger.h (MonoDebuggerInfo):
4304         Removed the `old_*' compatibility entries.
4305         Added `debugger_version' and `data_table'.
4306         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
4307         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
4308
4309         * debug-mini.c
4310         (MiniDebugMethodBreakpointInfo): Add `address_list'.
4311         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
4312         instead of a `gconstpointer'.
4313         (mono_debugger_insert_method_breakpoint): Return a
4314         `MonoDebugMethodAddressList *'.
4315
4316 2007-06-28  Martin Baulig  <martin@ximian.com>
4317
4318         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
4319
4320 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
4321
4322         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
4323         __builtin_frame_address () since it is broken on older gcc versions.
4324
4325 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4326
4327         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
4328         on the stack overflow handling and made the managed stack overflows
4329         catchable in most cases using soft guard pages.
4330         * exceptions-x86.c: added code to restore the protection in the soft
4331         guard pages at the end of exception handling.
4332
4333 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
4334
4335         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
4336
4337 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4338
4339         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
4340         exception handling.
4341
4342 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4343
4344         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
4345         signal handling support until it has been ported to the new mechanism.
4346         * mini.c: fixed stack overflow detection and use the new
4347         architecture code  to handle signals on the altstack.
4348
4349 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
4350
4351         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
4352         stack overflows on the alt stack.
4353
4354 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
4355
4356         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
4357         stack overflows on the alt stack.
4358
4359 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
4360
4361         * exceptions-ppc.c: cleanup preparing for altstack support.
4362
4363 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
4364
4365         * exceptions-arm.c: cleanup preparing for altstack support.
4366
4367 2007-07-27  Mark Probst  <mark.probst@gmail.com>
4368
4369         * mini.c (print_jit_stats): Output hazard pointer stats.
4370
4371 2007-07-26  Mark Probst  <mark.probst@gmail.com>
4372
4373         * driver.c, mini.c: Replaced security mode flags with a single
4374         enum variable.
4375
4376 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4377
4378         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
4379
4380 2007-07-25  Mark Probst  <mark.probst@gmail.com>
4381
4382         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
4383         (which doesn't do anything yet) for activating Core CLR
4384         (Silverlight) security.
4385
4386 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
4387
4388         * mini-codegen.c: work around a possible gcc bug on arm.
4389
4390 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4391
4392         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
4393         message for platforms that don't support AOT compilation.
4394
4395 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4396
4397         * mini.h, mini.c, driver.c: temporary smcs hack.
4398
4399 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
4400
4401         * mini-arm.h, mini-arm.c: arm EABI fixes.
4402
4403 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
4404
4405         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
4406         case.
4407
4408         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
4409         trampolines taking a method argument.
4410
4411         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
4412
4413         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
4414         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
4415
4416         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
4417         JIT compilation throws an exception. Fixes #82050.
4418
4419 2007-07-19  Mark Probst  <mark.probst@gmail.com>
4420
4421         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
4422         with the MONO_EXCEPTION_ defines.
4423
4424 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
4425
4426         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
4427         #82117.
4428         
4429         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
4430         the cause of an assertion.
4431
4432 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
4433
4434         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
4435         removed.
4436
4437 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
4438
4439         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
4440         assert. Should fix #82103.
4441
4442 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
4443
4444         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
4445         here too. Fixes #82095.
4446
4447         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
4448         addresses.
4449
4450         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
4451
4452         * mini-amd64.h: Enable IMT for amd64.
4453         
4454         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
4455
4456 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
4457
4458         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
4459
4460 2007-07-12  Mark Probst  <mark.probst@gmail.com>
4461
4462         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
4463         as soon as check_linkdemand sets an exception_type.
4464
4465 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
4466
4467         * mini-x86.c: fixed offsets for IMT call sequence.
4468         * mini-x86.h: enable IMT again.
4469
4470 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
4471
4472         * trace.c (mono_trace_enter_method): Decode MonoType too.
4473
4474         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
4475
4476         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
4477
4478         * mini-amd64.c: Add preliminary IMT implementation.
4479         
4480 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
4481
4482         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
4483         understand the new IMT-base interface invocation (thanks to
4484         Daniel Nauck for the report and the remote debugging session).
4485
4486 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4487
4488         * mini-x86.c: size and speed optimizations for the IMT bsearch.
4489
4490 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
4491
4492         * Makefile.am (aotcheck): Make this actually use the AOTed code.
4493
4494 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
4495
4496         * mini-trampolines.c: implement AOT IMT support.
4497         * mini-x86.h: enable IMT support for wider testing.
4498
4499 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
4500
4501         * inssel.brg (emit_imt_argument): Add aot support here.
4502
4503         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
4504
4505 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4506
4507         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
4508         of the IMT implementation, partially from massi, with my
4509         implementation of the bsearch sequence. Disabled by default until
4510         the AOT code is implemented.
4511
4512 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
4513
4514         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
4515
4516         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
4517
4518 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4519
4520         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
4521         arch-independent IMT JIT code from Massimiliano
4522         Mantione (massi@ximian.com) with small cleanups from me.
4523
4524 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
4525
4526         * Makefile.am: fix svn invocation to get the svn revision to be
4527         independent of the local language (build fix).
4528
4529 2007-07-09  Mark Probst  <mark.probst@gmail.com>
4530
4531         * mini.c (inline_method): Reset cfg->exception_type if the
4532         inlining is aborted.  Fixes: 82049.
4533
4534 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
4535
4536         * mini.c: remove assert from exception handling code when exception_ptr
4537         is not set.
4538
4539 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
4540
4541         * mini.c (mono_codegen): Add an assert.
4542
4543         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
4544         enter and leave code.
4545         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
4546
4547 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4548
4549         * mini-ppc.c: fixed memory corruption for localloc(0)
4550         (bug #81852).
4551
4552 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
4553         
4554         * mini.c: Fix warnings.
4555
4556 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
4557
4558         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
4559         to emit better double->int conversions.
4560
4561 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4562
4563         * mini.c: the provided Min/Max optimizations are valid for unisgned
4564         ints.
4565
4566 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
4567
4568         * 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
4569
4570 2007-06-28  Miguel de Icaza  <miguel@novell.com>
4571
4572         * mini.c (mono_running_on_valgrind): Add support for reporting the
4573         method and  its boundaries to valgrind.
4574
4575 2007-06-28  Martin Baulig  <martin@ximian.com>
4576
4577         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
4578
4579 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
4580
4581         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
4582
4583         * generic.2.cs: Add new test case.
4584
4585 2007-06-25  Martin Baulig  <martin@ximian.com>
4586
4587         Merged the `debugger-dublin' branch.
4588
4589         * debug-mini.c
4590         (mono_debugger_insert_method_breakpoint): New public method.
4591         (mono_debugger_remove_method_breakpoint): Likewise.
4592         (mono_debugger_check_breakpoints): New static method.
4593         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
4594
4595         * debug-debugger.h (MonoDebuggerInfo):
4596         Renamed (to keep backward compatibility in the vtable):
4597         `insert_breakpoint' -> `old_insert_breakpoint'.
4598         `remove_breakpoint' -> `old_remove_breakpoint'.
4599         `create_string' -> `old_create_string'.
4600         `lookup_class' -> `old_lookup_class'.
4601         `lookup_type' -> removed; changed into a dummy field.
4602         `lookup_assembly' -> `old_lookup_assembly'.
4603         Added (same functionality, but different signature):
4604         `create_string', `lookup_class', `lookup_assembly'
4605         Added new:
4606         `get_method_addr_or_bpt', `remove_method_breakpoint',
4607         `runtime_class_init'.
4608
4609         * debug-debugger.c: Merged the `debugger-dublin' branch.
4610
4611 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
4612
4613         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
4614         well.
4615         (peephole_pass): Likewise.
4616
4617 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
4618
4619         * driver.c: hopefully make setaffinity work also for ancient
4620         versions of linux.
4621
4622 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
4623
4624         * driver.c : win32 build fix.
4625
4626 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
4627
4628         * driver.c: check for the MONO_NO_SMP env var and bind to a single
4629         processor if it is set.
4630
4631 2007-06-21  Martin Baulig  <martin@ximian.com>
4632
4633         * debug-mini.h: New file.
4634
4635         * debug-mini.c
4636         (mono_debugger_insert_breakpoint_full): Moved here from
4637         ../metadata/mono-debug-debugger.c.
4638         (mono_debugger_remove_breakpoint): Likewise.
4639         (mono_debugger_breakpoint_callback): Likewise.
4640
4641 2007-06-15  Raja R Harinath  <rharinath@novell.com>
4642
4643         * jit-icalls.c (mono_helper_compile_generic_method): Update to
4644         changes in MonoGenericClass.
4645
4646 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
4647
4648         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
4649
4650 2007-06-14  Raja R Harinath  <rharinath@novell.com>
4651
4652         * jit-icalls.c (mono_helper_compile_generic_method): Update to
4653         removal of MonoGenericMethod.
4654
4655 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4656
4657         * mini-exceptions.c: hooks for the exception events profiling API.
4658
4659 2007-06-14  Randolph Chung  <tausq@debian.org>
4660
4661         * Makefile.ma: Add hppa target.
4662         * mini-arch.h: Include mini-hppa.h
4663         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
4664         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
4665         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4666
4667 2007-06-14  Randolph Chung  <tausq@debian.org>
4668
4669         * inssel.brg: Add rules for "chained" compare-branch operations so that
4670         a single compare op can affect multiple branches.  Adjust cost for
4671         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
4672         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
4673         cost for some rules so that they can more easily be overridden by
4674         per-arch rules (with fixes from lupus).
4675         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4676
4677 2007-06-13  Randolph Chung  <tausq@debian.org>
4678
4679         * mini-ops.h: Reorder branch ops so that they match the order of the
4680         corresponding CEE_* ops.  The code expects them this way.
4681         Add new ops for HPPA target.
4682         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4683
4684 2007-06-13  Randolph Chung  <tausq@debian.org>
4685
4686         * mini-exceptions.c: Handle cases where the stack grows towards
4687         larger addresses.
4688         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4689
4690 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
4691
4692         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
4693         counter.
4694         * driver.c: explain where a non-matching corlib is found.
4695
4696 2007-06-13  Mark Probst  <mark.probst@gmail.com>
4697
4698         * mini.c (print_jit_stats): Output dynamic code allocation stats.
4699
4700 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
4701
4702         * mini-exceptions.c: Generate a method profile leave event during
4703         an exception to ensure that the profiler gets notified.
4704
4705 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
4706
4707         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
4708         branch.
4709
4710         * cpu-amd64.md: Add long_and/or/xor opcodes.
4711
4712 2007-06-06  Wade Berrier  <wberrier@novell.com>
4713
4714         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
4715         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
4716         length of instruction shr_imm (expected 8, got 10)
4717
4718 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
4719
4720         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
4721
4722 2007-06-06  Mark Probst  <mark.probst@gmail.com>
4723
4724         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
4725         MonoInternalHashTable again (fixed bug in the internal hash table
4726         code).
4727
4728 2007-06-06  Mark Probst  <mark.probst@gmail.com>
4729
4730         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
4731         Have to figure out what makes it crash the SWF regression.
4732
4733 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
4734
4735         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
4736
4737 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4738
4739         * mini.c: optimize out the type check when storing null in a
4740         reference array.
4741
4742 2007-06-04  Mark Probst  <mark.probst@gmail.com>
4743
4744         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
4745         MonoInternalHashTable.
4746
4747 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
4748
4749         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
4750         signed integer methods.
4751
4752 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
4753
4754         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
4755         permanently since the current approach doesn't work.
4756
4757 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
4758
4759         * inssel.brg (stmt): Only call delegate->invoke_impl if 
4760         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
4761
4762 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
4763
4764         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
4765         the sreg2==rdx case.
4766         
4767         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
4768         account if it contains a rex prefix.
4769         (peephole_pass): Handle OP_FMOVE as well.
4770
4771 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
4772
4773         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
4774         as it causes regressions.
4775
4776 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
4777
4778         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
4779         static case as well.
4780
4781         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
4782
4783         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
4784         (mono_arch_get_this_arg_from_call): Ditto.
4785
4786         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
4787
4788         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
4789         invoke_impl field.
4790
4791         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
4792         (mono_arch_get_this_arg_from_call): Ditto.
4793
4794         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
4795         
4796         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
4797         try to create optimized invoke code and use that for further invocations. 
4798         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
4799
4800         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
4801
4802 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
4803
4804         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
4805         sealed classes or methods.
4806         *devirtualization.cs: tests for the new optimization
4807
4808 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
4809
4810         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
4811         by the update_volatile () function.
4812
4813 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
4814
4815         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
4816         require it.
4817
4818         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
4819
4820 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
4821
4822         * mini.c: Add configure checks for header files.
4823         * mini-x86.c: Add configure checks for header files.
4824         * trace.c: Add configure checks for header files.
4825         * aot-runtime.c: Add configure checks for header files.
4826         * aot-compiler.c: Add configure checks for header files.
4827         * driver.c: Add configure checks for header files.
4828         * mini-codegen.c: Add configure checks for header files.
4829         
4830         Code is contributed under MIT/X11 license.
4831
4832 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
4833
4834         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
4835         icompare_imm -128 + op_iclt. Fixes #81703.
4836
4837 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
4838
4839         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
4840
4841 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
4842
4843         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
4844         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
4845         so that all isinst checks now use "interface_bitmap".
4846
4847 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
4848
4849         * cpu-amd64.md (jmp): Fix a warning.
4850
4851         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
4852
4853         * basic.cs: Add new regression test.
4854
4855         * basic.cs: Remove test which is now in basic-long.cs.
4856
4857         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
4858
4859         * basic-long.cs: Add new test.
4860         
4861 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
4862
4863         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
4864
4865 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
4866
4867         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
4868
4869         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
4870         places.
4871         
4872         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
4873         throwing code a bit.
4874
4875         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
4876         the exception throwing code a bit.
4877
4878         * mini-x86.c (get_call_info): Allocate result from a mempool.
4879
4880 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
4881
4882         * aot-compiler.c (find_typespec_for_class): Fix the assert.
4883
4884         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
4885
4886         * mini.h (MonoCompile): Add 'token_info_hash' field.
4887
4888         * mini.c: Save token->method associations during compilation so the AOT 
4889         compiler can use it.
4890         
4891         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
4892         which reference generic classes and methods.
4893
4894 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
4895
4896         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
4897
4898         * aot-compiler.c (compile_method): Fix a typo in a comment.
4899
4900         * aot-runtime.c (decode_cached_class_info): Skip generic types.
4901
4902         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
4903         everything generic.
4904
4905         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
4906
4907 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
4908
4909         * mini.h (MonoCompile): Add 'args' field.
4910
4911         * mini.c (mono_compile_create_vars): Store variables representing the arguments
4912         into cfg->args.
4913
4914         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
4915
4916 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
4917
4918         * mini.c (mono_compile_get_interface_var): Remove this unused function.
4919
4920         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
4921
4922         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
4923         opcodes for some opcodes.
4924
4925         * mini.h *.brg *.c: Use the new opcodes.
4926
4927 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
4928
4929         * mini.h: Bumped aot revision.
4930
4931         * inssel.brg: modified code generation of type checks for interfaces
4932         to use the new "MonoClass.interface_bitmap" instead of the old
4933         "MonoClass.interface_offsets".
4934
4935 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
4936
4937         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
4938
4939 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
4940
4941         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
4942         64 bit platforms.
4943
4944 2007-04-27  Neale Ferguson <neale@sinenomine.net>
4945
4946         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
4947
4948 2007-04-27  Wade Berrier  <wberrier@novell.com>
4949
4950         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
4951         mini.h) to fix build.
4952
4953 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
4954
4955         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
4956         
4957         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
4958         causes the corlib unit tests to fail.
4959
4960 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
4961
4962         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
4963
4964         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
4965
4966         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
4967         opcodes to the comparison relations.
4968
4969         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
4970         opcodes to their types.
4971         
4972         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
4973
4974         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
4975         it in cfg->arch.cinfo.
4976
4977         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
4978
4979         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
4980         cfg->cil_offset_to_bb.
4981
4982 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
4983
4984         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
4985         created becase of initlocals.
4986
4987 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
4988
4989         * mini-alpha.c cpu-alpha.md: More alpha port work from 
4990         Sergey Tikhonov <tsv@solvo.ru>.
4991
4992 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
4993
4994         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
4995
4996 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
4997
4998         * cpu-s390.md (break): Correct the length of break instruction.
4999
5000 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5001
5002         * mini.c: fix a couple of soft-float issues and comments.
5003
5004 2007-04-15  Miguel de Icaza  <miguel@novell.com>
5005
5006         * trace.c (is_filenamechar): - is also a filename char.
5007
5008 2007-04-15  Neale Ferguson <neale@sinenomine.net>
5009
5010         * mini-s390.c: Correct checking for enum type in return value processing.
5011
5012 2007-04-14  Raja R Harinath  <rharinath@novell.com>
5013
5014         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
5015         (version.h): Makefile is in the build directory.
5016
5017 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
5018
5019         * mini-amd64.h: fix for assertion failure on Solaris/amd64
5020
5021 2007-04-11  Martin Baulig  <martin@ximian.com>
5022
5023         * mini.c (can_access_member): Fix handling of generic classes;
5024         fixes #81259.
5025
5026 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
5027
5028         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
5029
5030 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
5031
5032         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
5033
5034 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
5035
5036         * mini-codegen.c: make sure the right spill amount is
5037         used for fp or integer registers (fixes the float_sub_spill() on ppc).
5038
5039 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
5040
5041         * mini-ppc.c: fixes for the fp_branch_nan test.
5042
5043 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
5044
5045         * basic.cs: Comment out new test which still fails on ia64.
5046
5047 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5048
5049         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
5050
5051 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5052
5053         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
5054
5055 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
5056
5057         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
5058         on 64 bit machines. Fixes part of #80738.
5059
5060         * basic.cs: Add regression test.
5061
5062 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
5063
5064         * inssel.brg basic.cs: Revert previous change to fix build.
5065
5066         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
5067         platforms.
5068         
5069         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
5070
5071         * basic.cs: Add new regression test.
5072
5073 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
5074
5075         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
5076         many arguments.
5077
5078 2007-03-16  Neale Ferguson <neale@sinenomine.net>
5079
5080         * cpu-s390x.md: Correct length of break instruction.
5081
5082 2007-03-16  Neale Ferguson <neale@sinenomine.net>
5083
5084         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
5085         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
5086
5087 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
5088
5089         * *.c: Begin WIN64 port.
5090         * mini.c:  Use correct register in profiler.
5091         * mini-amd64.c: No inline assembly on Win64.
5092         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
5093         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
5094         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
5095         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
5096         mono_arch_ip_from_context for Win64.
5097         
5098         Contributed under MIT/X11 license.
5099
5100 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
5101
5102         * exceptions-amd64.c (seh_handler): Ditto.
5103
5104         * exceptions-x86.c (seh_handler): Fix a memory leak.
5105
5106 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
5107
5108         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
5109         mini-s390x.c: fixed peephole optimizations to deal
5110         correctly with 1 and 2 byte reload avoidance.
5111
5112 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
5113
5114         * cpu-s390.md, cpu-s390x.md: update localloc length.
5115
5116 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
5117
5118         * cpu-g4.md: added missing descriptions.
5119
5120 2007-03-14  Miguel de Icaza  <miguel@novell.com>
5121
5122         *  Makefile.am: Add support so the tail tests are not executed on
5123         PowerPC as that is a known limitation of the PowerPC port.
5124
5125 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
5126
5127         * runmdesc.bat:  Move to msvc directory.
5128         
5129 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
5130
5131         * runmdesc.bat:  Run executable that was produced by the current
5132         target and sent via an argument.
5133         
5134 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
5135
5136         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
5137         #81102.
5138
5139         * generics.2.cs: Add regression test.
5140
5141 2007-03-09  Wade berrier  <wberrier@novell.com>
5142
5143         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
5144
5145 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
5146
5147         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
5148         AOT code depends on this.
5149
5150 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
5151
5152         * mini.c: more precise tracking of types in the eval stack
5153         (part of fix for bug #81044).
5154
5155 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
5156
5157         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
5158
5159         * aot-compiler.c (encode_patch): Remove an obsolete comment.
5160
5161 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
5162
5163         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
5164
5165         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
5166
5167 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
5168
5169         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
5170         a pointer on 64 bit systems. Fixes #80190.
5171
5172         * iltests.il: Add new regression test.
5173
5174 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5175
5176         * mini.c: inline a constant for Environment.IsRunningOnWindows.
5177
5178 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
5179
5180         * trace.c: Remove an erroneous alignemnt check when tracing.
5181           Fixes --trace on OSX86.
5182
5183 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
5184
5185         * mini-$(arch).h: initialize SP in context for all the archs.
5186
5187 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
5188
5189         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
5190         regressions in the thread tests.
5191
5192 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
5193
5194         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
5195         - fixed implementation of LOCALLOC opcode
5196         - implemented non-un compare for floats
5197         - code cleanup
5198         - implementation of FDIV and CKFINITE opcodes
5199         - fixes for latest mono updates
5200         - additional arch opcodes
5201
5202 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
5203
5204         * Makefile.am: simplify and merge rules for cross-compilation.
5205
5206 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
5207
5208         * local-propagation.c: Actually *apply* the fix for bug 80591...
5209
5210 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
5211
5212         * mini-exceptions.c: backuot part of the last change
5213         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
5214
5215 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
5216         * inssel.brg: Fix bug 59286.
5217
5218
5219 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
5220
5221         * mini-exceptions.c: patch from Zoltan to correctly check for
5222         stack boundaries (using the stack register, not the frame register),
5223         fixes bugs #80724, #79717.
5224
5225 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
5226
5227         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
5228         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
5229
5230         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
5231         presence of frame pointer elimination.
5232
5233 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
5234         
5235         * mini-x86.h: NetBSD UCONTEX_REG defines.
5236
5237 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
5238
5239         * inssel-amd64.brg: Fix amd64 build.
5240
5241 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
5242
5243         * mini.h: remove extern to workaround what looks likes gcc bug 26905
5244         on amd64.
5245
5246 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
5247
5248         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
5249         ends.
5250
5251         * mini-<ARCH>.c: Use mono_is_regsize_var ().
5252
5253 2007-01-30 Mark Mason <mason@broadcom.com>
5254
5255            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
5256            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
5257            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
5258            beginning support for CEE_JMP [not quite working yet]
5259            * tramp-mips.c: LMF handling now works
5260         
5261 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
5262
5263         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
5264
5265         * mini.h (NULLIFY_INS): New macro.
5266
5267 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5268
5269         * mini.c: statistical profiler fix for windows, patch
5270         from Tor Lillqvist (tml@novell.com).
5271
5272 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
5273         * local-propagation.c: Fix bug 80591.
5274
5275 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
5276
5277         * Makefile.am: put back the --export-dynamic option as with
5278         the previous gmodule flags (thanks to Robert Jordan).
5279
5280 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
5281
5282         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
5283
5284         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
5285         simplify and speed up the local register allocator. Also rename some fields
5286         like iassign->vassign.
5287         
5288         * regalloc.c: Remove some functions which are no longer used since their
5289         inlined version is in mini-codegen.c.
5290         
5291         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
5292
5293         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
5294
5295 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
5296
5297         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
5298         narrowing. Fixes #80622.
5299
5300         * iltests.il: Add new regresssion test. 
5301
5302 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
5303
5304         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
5305         debug-debugger.c, debug-debugger.h: warning fixes.
5306         * driver.c: updated copyright year and made it fit in one line.
5307
5308 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
5309
5310         * aot-runtime.c: updated to use mono-dl instead of gmodule.
5311
5312 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
5313
5314         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
5315
5316         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
5317
5318         * iltests.il: Add new test for bug #80507.
5319
5320 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5321
5322         * mini-arm.h: use soft-float also on vfp for now.
5323
5324 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
5325
5326         * mini.c: fix some more soft-float issues.
5327
5328 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
5329
5330         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
5331
5332 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
5333         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
5334         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
5335         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
5336
5337 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
5338
5339         * mini-arm.c: typo fix.
5340
5341 2007-01-23  Neale Ferguson <neale@sinenomine.net>
5342
5343         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
5344
5345 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
5346
5347         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
5348         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
5349
5350         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
5351
5352         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
5353
5354         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
5355         
5356         * inssel.brg: Fix a warning.
5357
5358         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
5359
5360         * abcremoval.c ssa.c ssapre.c: Update after this change.
5361         
5362         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
5363
5364         * dominators.c (df_set): Use mono_bitset_union_fast.    
5365
5366 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
5367
5368         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
5369         mini-codegen.c: reduce relocations and memory usage for the cpu
5370         description.
5371
5372 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
5373
5374         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
5375
5376         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
5377         to reduce their size.
5378
5379 2007-01-19 Mark Mason <mason@broadcom.com>
5380
5381         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
5382         * mini-mips.c: more configuration macros, support long conditional branches, additional
5383         asserts, fix epilog instrumentation.
5384         * mini-mips.h: use standard stack walk
5385         * cpu-mips.md: increase size of div, rem and conditional branches
5386         
5387 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
5388
5389         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
5390         to cpu spec data.
5391
5392 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
5393
5394         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
5395         (compile_method): Ditto.
5396
5397         * aot-runtime.c (decode_klass_info): Ditto.
5398
5399         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
5400         needed by the code generated by inssel.brg. Also fix a warning.
5401
5402 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
5403
5404         * mini.c: deal with enums that become genericinsts by
5405         being nested in a generic class (bug #79956).
5406
5407 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
5408
5409         * mini.c: match the generic definition to check for
5410         private access with generic types (bug #78431).
5411
5412 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
5413
5414         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
5415         to make life easier for people cross-compiling that insist on not
5416         using scratchbox.
5417
5418 2007-01-17 Mark Mason <mason@broadcom.com>
5419
5420         * inssel-long.brg: patch to deal with mips missing flags
5421         * inssel-long32-mips.brg: implement overflow checks
5422         * insset-mips.brg: implement overflow checks
5423         * mini-mips.h: implement conditional exception handling
5424         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
5425           Remove unused code, minor cleanups.
5426         * exceptions-mips.c: minor cleanups
5427         * mini-ops.h: add mips conditional exception ops
5428         * cpu-mips.md: add mips conditional exception ops
5429
5430         
5431 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
5432
5433         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
5434         to deal with mips missing of flags.
5435
5436 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
5437
5438         * exceptions-ppc.c: execute fault handlers.
5439
5440 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
5441
5442         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
5443
5444 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
5445
5446         * mini.c: handle also floating point values in initialize_array.
5447
5448 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
5449
5450         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
5451         array initialization and make it conditional on the intrins option.
5452
5453 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
5454
5455         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
5456         relocations and put the patch info names close to the enum definition.
5457
5458 2007-01-15 Mark Mason <mason@broadcom.com>
5459
5460         * basic.cs, exceptions.cs: break up large tests to increase debugability.
5461
5462 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5463
5464         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
5465
5466 2007-01-12  Raja R Harinath  <rharinath@novell.com>
5467
5468         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
5469
5470 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
5471
5472         * Makefile.am: distribute the mips sources.
5473
5474 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5475
5476         * mini-codegen.h: handle bug #80489 here, by excluding ecx
5477         directly.
5478
5479 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
5480
5481         * cpu-x86.md: back out for now as this triggers other regressions.
5482
5483 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
5484
5485         * cpu-x86.md: force src1 and dest regpair for long shift instructions
5486         to eax:edx, so ecx can't get allocated to them (bug #80489).
5487
5488 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
5489
5490         * mini.c, mini-exceptions.c: enabled running fault handlers
5491         (bug #80469).
5492
5493 2007-01-03  Miguel de Icaza  <miguel@novell.com>
5494
5495         * driver.c: If nothing fail, do not use the string "failed",
5496         because it makes it very annoying to view test result logs on the
5497         web. 
5498
5499 2006-12-30  Miguel de Icaza  <miguel@novell.com>
5500
5501         * debug-debugger.c (mono_debugger_main): Rename "main" to
5502         "main_method" to prevent a warning.
5503
5504         Remove a warning for unused field.
5505
5506 2006-12-28  Martin Baulig  <martin@ximian.com>
5507
5508         * debug-debugger.c
5509         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
5510
5511 2006-12-22  Martin Baulig  <martin@ximian.com>
5512
5513         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
5514         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
5515         seperate `.mdb_debug_info' section, so we can access it from the
5516         debugger even if the binary is stripped.
5517
5518         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
5519         from the `.mdb_debug_info' here to prevent the linker from
5520         removing that section.
5521
5522         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
5523         mdb-debug-info64.s.
5524
5525 2006-12-19  Robert Jordan  <robertj@gmx.net>
5526
5527         * mini-x86: enable the code to return small structures in
5528         registers for FreeBSD as well. Fixes bug #80278.
5529         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
5530
5531 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5532
5533         * mini-x86.c: align the stack when calling the profiler
5534         function instrumenting the prolog (on OSX).
5535
5536 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
5537
5538         * mini.c: emit a break opcode where Debugger.Break () is called.
5539
5540 2006-12-13  Miguel de Icaza  <miguel@novell.com>
5541
5542         * mini.c (mono_method_to_ir): Provide useful information on this
5543         assert, to prevent others from debugging like I did.
5544
5545 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
5546
5547         * mini.c: enable code which was incorrectly commented
5548         (bug #80235).
5549
5550 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
5551
5552         * mini-x86.c: enable on OSX, too, the code to return small
5553         structures in registers.
5554
5555 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
5556
5557         * mini-x86.c: remove the use of the dynamic code manager here, too.
5558
5559 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
5560
5561         * mini.h, debug-debugger.c, tramp-*.c: fixed 
5562         mono_debugger_create_notification_function() to use
5563         mono_global_codeman_reserve () instead of a dynamic code manager.
5564
5565 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
5566
5567         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
5568         ves_array_element_address() jit icall and use a generated
5569         managed method instead (which is about 4 times faster for a rank 3
5570         array access).
5571
5572 2006-11-29  Mark Mason  <mason@broadcom.com>
5573
5574         * basic-calls.cs: additional tests for passing
5575         structures as function arguments.
5576
5577 2006-11-29  Mark Mason  <mason@broadcom.com>
5578
5579         * mini-mips.h: disable custom exception handling
5580         * mini-mips.c: throw/rethrow should use jalr to call
5581         exception stubs.  Fixed bug with passing structures
5582         by value. More support for tracing floating point
5583         functions.
5584
5585 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5586
5587         * mini.c: fixed typo in the soft-float ldind.r4 handling
5588         (bug #80086).
5589
5590 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
5591
5592         * mini.c, mini.h, driver.c: added --runtime command line
5593         option to select a different runtime than the autodetected one.
5594         * jit.h: added API for embedders to initialize with a specific
5595         runtime version.
5596
5597 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
5598
5599         * mini.c: handle also boxing of r4 values (bug #80024).
5600
5601 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
5602
5603         * mini-ppc.c: force indirect calls until we reserve
5604         enough address space for all the generated code.
5605
5606 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
5607
5608         * exceptions-arm.c: workaround bugs in the libc definition
5609         of struct ucontext.
5610
5611 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
5612
5613         * inssel.brg: fixes from me and Mark Mason.
5614
5615 2006-11-23  Dick Porter  <dick@ximian.com>
5616
5617         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
5618         semaphore display now we've fixed the initial value
5619
5620 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
5621
5622         * inssel.brg: partially revert the last change to fix the build.
5623
5624 2006-11-21  Mark Mason  <mason@broadcom.com>
5625
5626         * inssel.brg: Add and use compare-and-branch macros to support
5627         architectures that do not have condition code registers (ie. MIPS).
5628         * *-mips.{c,brg,md}: Fix copyright statements
5629
5630 2006-11-20  Mark Mason  <mason@broadcom.com>
5631
5632         * Makefile.am: remove mini-codegen.c from list of MIPS sources
5633         * mini.c: Allow GET_CONTEXT to be specified by the arch port
5634         * mini.h: Added declaration for mono_print_ins()
5635         * mini-codegen.c: added ins_spec initializer for MIPS
5636         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
5637         vreg to be virtual and hreg to be non-virtual.
5638         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
5639         is not yet working/implemented correctly.
5640         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
5641         non-static, fixup calls to print_ins() from other parts in the file.
5642
5643 2006-11-20  Mark Mason  <mason@broadcom.com>
5644
5645         * basic-calls.cs: added tests for passing structures as arguments
5646         to calls.
5647
5648 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
5649
5650         * inssel-long32.brg: optimize signed division by power of two.
5651
5652 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
5653
5654         * mini-arm.c: added support for interworking with thumb code
5655         (mono must be still be built using the ARM instruction encoding).
5656
5657 2006-11-19  Miguel de Icaza  <miguel@novell.com>
5658
5659         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
5660         verifier has different rules for it.   Fixes a few verifier issues
5661         in the test suite.
5662
5663         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
5664         at the end, so people know what happened.
5665
5666 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
5667
5668         * brach-opts.c: in optimize_exception_target() make sure we
5669         are in a catch clause (fixes bug #79871).
5670
5671 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
5672
5673         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
5674         more soft-float support fixes.
5675
5676 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
5677
5678         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
5679         that are passed half on the stack and half in registers.
5680
5681 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
5682
5683         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
5684         more mips integration work from Mark E Mason 
5685         <mark.e.mason@broadcom.com>.
5686
5687 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
5688
5689         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
5690         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
5691         tramp-mips.c: added sources for the mips port, not
5692         integrated in the build yet. Contributed by
5693         Mark E Mason <mark.e.mason@broadcom.com>.
5694
5695 2006-11-14  Neale Ferguson <neale@sinenomine.net>
5696
5697         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
5698
5699 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
5700
5701         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
5702         put the soft-float rules in its own file since it seems to
5703         break s390 compilation.
5704
5705 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
5706
5707         * mini-arm.c: fixed wrnings.
5708
5709 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
5710
5711         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
5712         inssel-arm.brg: ARM support for soft-float.
5713
5714 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
5715
5716         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
5717         loads and stores of 32 bit fp values.
5718
5719 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
5720
5721         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
5722
5723         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
5724         works. Fixes #79852 and #79463.
5725
5726 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
5727
5728         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
5729         more soft-float support WIP and fixes.
5730
5731 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
5732
5733         * mini-arm.c: some VFP updates.
5734
5735 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
5736
5737         * mini-exceptions.c: 0 is a valid local var offset in some
5738         architectures, don't assert (bug #78508).
5739
5740 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
5741
5742         * exceptions-arm.c: fixed off by one error in stack walk code.
5743
5744 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
5745
5746         * mini.h, mini.c: more precise tracking of type load exceptions.
5747
5748 2006-11-03  Robert Jordan  <robertj@gmx.net>
5749
5750         * Makefile.am: [WIN32] Add monow.exe target.
5751         * driver.c: [WIN32] Don't detach the console when debugging.
5752         Fixes bug #79797.
5753         
5754 2006-10-30  Miguel de Icaza  <miguel@novell.com>
5755
5756         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
5757
5758 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
5759
5760         * aot-compiler.c (emit_method_info): Add a case missed earlier.
5761
5762         * driver.c (mini_regression): Fix --regression with AOT.
5763
5764         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
5765
5766 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
5767
5768         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
5769
5770         * mini-sparc.h: Don't use sigaction on sparc/linux.
5771
5772         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
5773
5774         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
5775
5776         * mini-exceptions.c: Add proper include files for getpid ().
5777
5778 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
5779
5780         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
5781         address instead of a MonoJitInfo* to avoid decoding the exception info for the
5782         method.
5783
5784         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
5785         name cache to reduce its size.
5786
5787         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
5788
5789 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
5790
5791         * mini-x86.c: Save/restore the current LMF structure more efficiently using
5792         the mono_lmf TLS variable.
5793
5794         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
5795         trampoline lmf frames.  
5796
5797         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
5798
5799 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
5800
5801         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
5802         the mono_lmf TLS variable.
5803
5804         * mini-exceptions.c: Access the LMF structure through accessors.
5805
5806         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
5807         variable instead of in jit_tls->lmf.
5808
5809         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
5810         
5811         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
5812         trampoline lmf frames.
5813
5814         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
5815
5816 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
5817
5818        * mini.c trace.c mini-x86.c: Revert these too.
5819         
5820        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
5821        signature change.
5822
5823 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
5824
5825         * genmdesc.c: removed now dead code.
5826
5827 2006-10-09  Robert Jordan <robertj@gmx.net>
5828
5829         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
5830
5831 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
5832
5833         * mini.h: do not leave gaps in the opcode values.
5834
5835 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
5836
5837         * jit-icalls.h: flag functions as internal here, too.
5838
5839 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
5840
5841         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
5842         functions with the internal attribute.
5843
5844 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
5845
5846         * aot-compiler.c: fclose the file descriptor in the profile read loop.
5847
5848 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
5849
5850         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
5851         for soft-float.
5852
5853 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
5854
5855         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
5856         tail calls as on other platforms.
5857
5858         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
5859
5860         * iltests.il: Add a few tailcall tests.
5861
5862 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5863
5864         * driver.c: fix loop for old compilers (bug #79521).
5865
5866 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
5867
5868         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
5869
5870         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
5871
5872         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
5873         metadata without any code.
5874
5875         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
5876         more precise debugging information using gdb.
5877
5878 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
5879
5880         * inssel-ia64.brg: Make the helper methods static.
5881
5882 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
5883
5884         * inssel-x86.brg: make the helper methods static.
5885
5886 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
5887
5888         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
5889
5890 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
5891
5892         * mini.c: updates for monoburg changes.
5893         * inssel.brg: make a few helper functions static as they should.
5894
5895 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
5896
5897         * Makefile.am: Move mini-codegen.c to common_sources.
5898
5899 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5900
5901         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
5902         instructions.
5903         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
5904         mini-ppc.h: port to use the common local register allocator.
5905
5906 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
5907
5908         * mini.h: Remove the comment too then.
5909
5910 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
5911
5912         * mini.h: put back backend.data which is to be used shortly and
5913         doesn't increase the size of MonoInst. If any 64 bit arch aligned
5914         pointers on 4 byte boundaries it'd have much bigger issues running
5915         and you can ifdef it out anyway.
5916
5917 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
5918
5919         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
5920         MonoInst size by 4 bytes on 64 bit machines.
5921
5922 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
5923
5924         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
5925         replacement with more meaningful field names. Arch maintainers, please
5926         check the assigned names are good enough for your arch.
5927
5928 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
5929
5930         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
5931         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
5932
5933 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
5934
5935         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
5936         relocations and memory requirements, put the optimization flags
5937         definitions in their own file.
5938
5939 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
5940
5941         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
5942
5943         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
5944
5945 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
5946
5947         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
5948
5949 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
5950
5951         * inssel.brg: use the correct function to get the size of an item
5952         in an array, given an element class.
5953         * aot-compiler.c: do not access class->class_size directly.
5954
5955 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
5956
5957         * mini.h, debug-mini.c: added a debugging function to print
5958         info about local variables and arguments in a jitted method.
5959
5960 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
5961
5962         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
5963
5964         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
5965
5966 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
5967
5968         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
5969         inner and outer loops when passing vtypes.
5970
5971 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
5972
5973         * mini-ppc.c: take into account the cpu errata for cache flushing
5974         which caused some random errors (bug #79381).
5975
5976 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
5977
5978         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
5979         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
5980
5981 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
5982
5983         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
5984         loaded.
5985
5986         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
5987         freebsd ports tree.
5988
5989         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
5990         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
5991
5992         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
5993         displacement.
5994
5995 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
5996
5997         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
5998
5999 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
6000
6001         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
6002         macro does not have to be changed during debugging.
6003
6004         * 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>.
6005
6006         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
6007
6008         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
6009         
6010         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
6011         MONO_ARCH_NO_EMULATE_MUL is defined.
6012
6013         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
6014
6015         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
6016
6017         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
6018
6019         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
6020         
6021 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
6022
6023         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
6024         stuff to mini-exceptions.c where it is used.
6025
6026         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
6027         setup code, the real one is in mini-exceptions.c.
6028
6029         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
6030         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
6031         some changes from the freebsd ports tree.
6032
6033         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
6034         constants.
6035         
6036         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
6037
6038 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
6039
6040         * mini.c: on Linux, check for /proc to be mounted
6041         (bug# 79351, novell bug#201204).
6042
6043 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
6044
6045         * mini.c: handle cases where pthread_attr_getstack() behaves
6046         incorrectly (bug #78096).
6047
6048 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
6049
6050         * mini-arm.c: support larger stack frames (bug #79272).
6051
6052 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
6053
6054         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
6055
6056         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
6057         tokens.
6058
6059         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
6060         mono_class_from_name () to find a class from its name.
6061
6062         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
6063
6064 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
6065
6066         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
6067
6068 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
6069
6070         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
6071
6072 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
6073
6074         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
6075         callinfo->trampoline.
6076
6077         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
6078         fixes #79271.
6079         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
6080         future.
6081
6082 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
6083
6084         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
6085
6086 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
6087
6088         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
6089         stats.method_trampolines, it is already done by the generic trampoline code.
6090
6091         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
6092         
6093 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
6094
6095         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
6096
6097         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
6098
6099         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
6100
6101         * mini.c (print_jit_stats): Print mscorlib mempool size too.
6102         
6103         * mini.c (print_jit_stats): Print new stats.
6104
6105         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
6106
6107 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
6108
6109         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
6110         Address on two dimensional arrays. Fixes #78729.
6111
6112         * mini.h (MonoCompile): Add a 'skip_visibility' field.
6113
6114         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
6115         a method.
6116
6117         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
6118
6119         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
6120         #79130.
6121         
6122         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
6123         a race condition.
6124         (mini_get_ldelema_ins): Ditto.
6125
6126 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
6127
6128         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
6129         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
6130         Fixes #79213.
6131
6132 2006-08-29 Neale Ferguson <neale@sinenomine.net>
6133
6134         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
6135         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
6136
6137         * exceptions-s390x.c: Cosmetic change.
6138
6139         * tramp-s390.c: Fix warning.
6140
6141         * cpu-s390.md: Correct length of mul_imm.
6142
6143 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
6144
6145         * aot-compiler.c: added binary writer with ELF backend
6146         implementation (only on Linux/x86 for now).
6147
6148 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
6149
6150         * Makefile.am: Don't run net 2.0 AOT tests.
6151
6152         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
6153         (mono_compile_assembly): Skip net 2.0 assemblies as well.
6154
6155         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
6156
6157 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6158
6159         * aot-compiler.c: simplified and refactored the asm-writing code
6160         to allow different backends.
6161
6162 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
6163
6164         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
6165
6166         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
6167         little. Share patches of type TYPE_FROM_HANDLE as well.
6168
6169         * mini.c (mono_patch_info_equal): New helper function.
6170         (mono_patch_info_hash): Ditto.
6171
6172         * aot-compiler.c (emit_method_code): Fix s390 build.
6173
6174         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
6175         is not handled because it is stored as a flag and not as a type ctor. Fixes
6176         #79016.
6177
6178 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
6179
6180         * aot-compiler.c: Fix computation of GOT slot statistics.
6181         
6182         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
6183         Also remove support for not PIC AOT.
6184
6185         * mini.h: Bump AOT file format version.
6186
6187         * objects.cs: Add a test for #78990.
6188
6189         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
6190         (peter.dettman@iinet.net.au). Fixes #79087.
6191
6192         * basic-long.cs: Add a test for the above.
6193
6194 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
6195
6196         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
6197         
6198         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
6199         code somewhat.
6200
6201 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
6202
6203         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
6204         exceptions.
6205
6206 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
6207
6208         * mini.c: Don't verify COM proxy invoke calls
6209         
6210
6211 2006-08-10  Dick Porter  <dick@ximian.com>
6212
6213         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
6214         which process is holding semaphores locked.
6215
6216 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
6217
6218         * mini-ia64.c mini-amd64.c: Fix #79027.
6219
6220         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
6221
6222         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
6223
6224         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
6225         implicit arguments in a vararg call. Fixes #79027.
6226
6227 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
6228
6229         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
6230         (mono_get_array_new_va_signature): Ditto.
6231
6232 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
6233
6234         * aot-runtime.c: Call init_plt lazily.
6235
6236         * inssel-long.brg: Fix unsigned long->int conversion.
6237
6238         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
6239
6240         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
6241         that most data is now in the .rss/.data section.
6242
6243 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
6244
6245         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
6246
6247         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
6248
6249         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
6250
6251         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
6252
6253         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
6254         virtual call. Fixes #79010.
6255
6256         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
6257         and use the result as the this argument in the real call.
6258
6259         * generics.2.cs: Add a new test for #79010.
6260         
6261 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
6262
6263         * mini-x86.c: Fix a warning.
6264
6265         * aot-compiler.c: Add a bunch of statistics.
6266
6267         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
6268
6269 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
6270
6271         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
6272
6273 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
6274
6275         * 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>.
6276
6277 2006-07-13  Miguel de Icaza  <miguel@novell.com>
6278
6279         * mini.c (mono_method_to_ir): Obtain the original method in the
6280         CIL stream and use this to perform validation.
6281
6282         Fixed: #78816
6283
6284 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
6285
6286         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
6287         (mono_arch_call_opcode): Ditto.
6288
6289         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
6290         #78826.
6291
6292         * mini.c (mono_patch_info_dup_mp): New helper function.
6293         
6294         * aot-compiler.c (compile_method): Fix some of the memory allocated during
6295         compilation. Fixes #78827.
6296
6297 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
6298
6299         * declsec.c: Use original security informations for
6300           MONO_WRAPPER_MANAGED_TO_MANAGED.
6301
6302 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
6303
6304         * mini.c: Allow Com Interop methods/classes and
6305         don't verify COM wrapper calls
6306         
6307
6308 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
6309
6310         * inssel-long32.brg: Fix long->i4 checked conversion.
6311
6312         * exceptions.cs: Add a test for the above.
6313
6314 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
6315
6316         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
6317
6318         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
6319         leaks.
6320
6321         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
6322         #78775.
6323
6324 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
6325
6326         * mini.c: Fix solaris/x86 exception handling.
6327
6328         * Makefile.am: Get rid of $(ICU_LIBS).
6329
6330 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
6331
6332         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
6333         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
6334         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
6335
6336         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
6337
6338         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
6339         this function causes a SIGSEGV.
6340
6341 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
6342
6343         * mini.c: Remove unused solaris/x86 includes.
6344
6345 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
6346
6347         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
6348
6349 2006-06-20  Jb Evain  <jbevain@gmail.com>
6350
6351         * cpu-g4.md: fix max length of start_handler instruction.
6352
6353 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
6354         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
6355
6356 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
6357         * ssa.c: Fixed bug 78653 for SSA based deadce.
6358         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
6359         MonoInst.flags, used in SSA based deadce.
6360         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
6361         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
6362
6363 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
6364
6365         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
6366         it can end up using non executable memory on ppc64 systems
6367         running ppc32 userspace (fix from Johannes Berg).
6368
6369 2006-06-14  Dick Porter  <dick@ximian.com>
6370
6371         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
6372         4.1.1
6373
6374 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
6375         * mini.c: Made so that inline is locally disabled if it would
6376         trigger a .cctor, because too many apps depend on this behavior
6377         (which seems to be also the one of the MS CLR).
6378
6379 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
6380
6381         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
6382         No idea why this worked before.
6383
6384         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
6385         which branch to outer exception clauses since they could skip the
6386         inner finally clauses. Fixes #78633.
6387
6388         * exceptions.cs: Add a test for the above.
6389
6390         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
6391         Fixes #78629.
6392
6393         * iltests.il: Add a test for the above.
6394
6395 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
6396
6397         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
6398         after the end of a try bblock, to prevent asserts in mini_method_compile ().
6399
6400         * iltests.il: Add a test for the above.
6401
6402 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
6403
6404         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
6405         
6406         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
6407         methods as instrinsics.
6408
6409 2006-06-09  Wade Berrier <wberrier@novell.com>
6410
6411         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
6412         (simple-cee-ops.h ssapre-mini-ops.h)
6413
6414 2006-06-09  Neale Ferguson <neale@sinenomine.net>
6415
6416         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
6417         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
6418         instruction).
6419         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
6420         * cpu-s390x.md: Fix max. length values for a couple of instructions.
6421
6422 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
6423
6424         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
6425
6426 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
6427
6428         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
6429         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
6430         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
6431         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
6432         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
6433         of opcodes, so that bug 78549 should not happen again.
6434         * ssapre.c: Updated to use the renamed files.
6435
6436 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
6437
6438         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
6439         in OP_ATOMIC_EXCHANGE_I4.
6440
6441 2006-06-07  Wade Berrier <wberrier@novell.com>
6442
6443         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
6444         in mono_debugger_create_notification_function)
6445
6446 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
6447
6448         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
6449         
6450         * mini.c (type_from_stack_type): Disable some changes which do not
6451         seem to work.
6452
6453         * driver.c: Reenable opts.
6454
6455         * mini.h (MonoStackSlot): New structure to keep track of the verification state
6456         of the evaluation stack.
6457         
6458         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
6459         evaluation stack trace at entry to the bblock.
6460
6461         * mini.c (merge_stacks): New function to perform verification of stack merges.
6462         Turned off by default.
6463
6464         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
6465         STACK_MP.
6466         
6467 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
6468
6469         * local-propagation.c: Fixed bug 78549.
6470
6471 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
6472
6473         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
6474
6475 2006-06-02  Miguel de Icaza  <miguel@novell.com>
6476
6477         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
6478         tramp-arm.c, tramp-ia64.c
6479         (mono_debugger_create_notification_function): Update signature to
6480         new signature and use new protocol for creating the notification
6481         function.  
6482
6483         Should fix the build.
6484
6485 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
6486
6487         * exceptions-ppc.c (mono_jit_walk_stack)
6488         (ves_icall_get_frame_info): Fix the build
6489
6490 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
6491
6492         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
6493
6494 2006-05-31  Raja R Harinath  <rharinath@novell.com>
6495
6496         * il2tests.2.il: New file for generics CIL tests.  Add test for
6497         #78019.
6498         * Makefile.am: Update.
6499
6500         Fix #78019
6501         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
6502         to nullable types.
6503
6504 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
6505
6506         * aliasing.c: Fixed bug 78311.
6507
6508 2006-05-29  Martin Baulig  <martin@ximian.com>
6509
6510         * mini-exceptions.c (mono_find_jit_info): When computing the
6511         native offset, check whether we're actually inside the method's
6512         code; call mono_debug_print_stack_frame() to format the frame.
6513         (ves_icall_System_Exception_get_trace): Call
6514         mono_debug_print_stack_frame() to format the stack frame.
6515         (ves_icall_get_trace): Update to the new debugging API.
6516         (mono_jit_walk_stack_from_ctx): Likewise.
6517         (ves_icall_get_frame_info): Likewise.
6518
6519         * mini.c (get_method_from_ip): Use the new debugging API.
6520         (mono_print_method_from_ip): Likewise.
6521
6522         * exceptions-ppc.c
6523         (mono_jit_walk_stack): Use the new debugging API.
6524         (ves_icall_get_frame_info): Likewise.   
6525
6526 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
6527
6528         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
6529
6530 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
6531
6532         * mini.c: Added "limitator" to inline for debugging.
6533
6534 2006-05-24  Martin Baulig  <martin@ximian.com>
6535
6536         * debug-debugger.c (mono_debugger_init): Create a private,
6537         malloc()-based code manager for the notification function and
6538         intentionally leak it on exit.  This fixes the crash-on-exit race
6539         condition.
6540
6541         * tramp-amd64.c
6542         (mono_debugger_create_notification_function): Added
6543         `MonoCodeManager *' argument.
6544
6545         * tramp-x86.c
6546         (mono_debugger_create_notification_function): Added
6547         `MonoCodeManager *' argument.
6548
6549 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
6550
6551         * aliasing.c: Fixed 64 bit issue.
6552         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
6553         default since all known bugs are fixed (one more time!).
6554
6555 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6556
6557         * mini.c: write barrier support.
6558
6559 2006-05-23  Martin Baulig  <martin@ximian.com>
6560
6561         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
6562         check at the top of the file.
6563
6564 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
6565
6566         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
6567         reverting changes without reason and without changelog entries.
6568
6569 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
6570
6571         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
6572         to a few opcodes. Fixes #78439.
6573
6574         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
6575         consistency with other archs.
6576
6577         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
6578
6579 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
6580
6581         * debug-debugger.c: fix the build.
6582
6583 2006-05-17  Martin Baulig  <martin@ximian.com>
6584
6585         * debug-debugger.c
6586         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
6587         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
6588         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
6589         (debugger_attach): Call GC_mono_debugger_add_all_threads().
6590
6591 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
6592
6593         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
6594
6595 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
6596
6597         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
6598         MONO_TYPE_GENERICINST.
6599         
6600         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
6601         MONO_TYPE_GENERICINST.
6602
6603 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
6604
6605         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
6606         #78325.
6607
6608 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
6609
6610         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
6611         mempool.
6612         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
6613
6614 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
6615
6616         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
6617         mono_trace_cleanup ().
6618
6619         * iltests.il: Fix problem with the newly added test.
6620
6621         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
6622         due to register constraints, free up the previous hreg. Fixes #78314.
6623
6624         * iltests.il: Add new test for #78314.  
6625
6626         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
6627         Interlocked.Add. Fixes #78312.
6628
6629         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
6630         
6631 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
6632
6633         * inssel.brg (mini_emit_virtual_call): Fix a warning.
6634
6635 2006-05-05  Martin Baulig  <martin@ximian.com>
6636
6637         * debug-mini.c (mono_debug_open_block): New method.
6638
6639         * mini-amd64.c
6640         (mono_arch_output_basic_block): Call mono_debug_open_block() at
6641         the beginning of each basic block.
6642
6643         * mini-x86.c
6644         (mono_arch_output_basic_block): Call mono_debug_open_block() at
6645         the beginning of each basic block.
6646
6647 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
6648
6649         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
6650         default until I understand why they break the build on amd64.
6651
6652 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
6653
6654         * mini.c (mini_cleanup): Call mono_cleanup ().
6655
6656         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
6657         errors.
6658
6659 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
6660
6661         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
6662         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
6663         default since all known bugs are fixed, and I cannot reproduce bug
6664         77944... I'm asking Matt Hargett to test again after this commit.
6665
6666 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
6667
6668         * mini-codegen.c: Fixed typo that thrashed inline.
6669
6670 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
6671
6672         * dominators.c (compute_dominators): Avoid using a worklist since
6673         it is not correct in some cases. Instead, iterate over all bblocks as
6674         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
6675
6676 2006-04-28  Miguel de Icaza  <miguel@novell.com>
6677
6678         * mini.c (mono_jit_compile_method_inner): Use
6679         mono_prepare_exception_from_error that resets the value
6680         internally.
6681
6682 2006-04-27  Miguel de Icaza  <miguel@novell.com>
6683
6684         * mini.c: Move the mini_loader_error_to_exception to metadata. 
6685         
6686 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
6687
6688         * aliasing.c: Fixed bug 78210.
6689
6690 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
6691
6692         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
6693         default until all their problems (or the ones they trigger) are fixed.
6694
6695 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
6696
6697         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
6698         
6699         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
6700         as loaded only after resolving patches since that could invoke the same method.
6701
6702         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
6703
6704         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
6705         functions.
6706
6707         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
6708         AOT loader.
6709
6710         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
6711         stack.
6712
6713         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
6714         made from AOT code through the PLT table.
6715
6716         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
6717         holding the plt offset when a call is made to the aot plt trampoline.
6718         
6719 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
6720
6721         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
6722         amd64 AOT support.
6723
6724         * Makefile.am (common_sources): Fix build breakage.
6725
6726         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
6727         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
6728         intra-assembly calls if possible.
6729         
6730         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
6731
6732         * mini-trampolines.c: Handle PLT entries.
6733
6734         * mini.c: Avoid creating a GOT var for calls.
6735
6736         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
6737         from mscorlib code.
6738
6739         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
6740         from mscorlib code.
6741
6742         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
6743         AOT code.       
6744
6745         * mini.h: Bump AOT file format version.
6746         
6747         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
6748         covers more cases.
6749
6750 2006-04-25  Martin Baulig  <martin@ximian.com>
6751
6752         * driver.c: Disable copyprop, consprop and inline when running
6753         inside the debugger.
6754
6755 2006-04-25  Martin Baulig  <martin@ximian.com>
6756
6757         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
6758         with `get_current_thread' and added `detach'.
6759         (MonoDebuggerMetadataInfo): Added `thread_size',
6760         `thread_tid_offset', `thread_stack_ptr_offset' and
6761         `thread_end_stack_offset'.
6762
6763 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
6764
6765         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
6766         aot-runtime.c.
6767
6768         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
6769         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
6770
6771         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
6772
6773         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
6774
6775         * aot.c: Add support for ADJUSTED_IID.  
6776
6777 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
6778
6779         * aot.c (emit_method_order): Don't align method_order_end.
6780
6781         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
6782         the interface ID changes.
6783
6784 2006-04-21  Dick Porter  <dick@ximian.com>
6785
6786         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
6787         cleaning up a thread.  Fixes the new part of bug 77470.
6788
6789 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
6790
6791         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
6792         to managed wrapper.
6793                      
6794 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
6795
6796         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
6797         
6798         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
6799         SIGSEGV. Fixes #78072.
6800
6801         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
6802         unregister our SIGABRT handler.
6803
6804 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
6805
6806         * mini.c: Disabled inline where it can alter the call stack in a
6807         way visible from managed code.
6808         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
6809         default.
6810
6811 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
6812
6813         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
6814         on other platforms. Fixes #78089.
6815
6816 2006-04-13  Martin Baulig  <martin@ximian.com>
6817
6818         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
6819         determine whether we're inside the debugger.
6820
6821         * debug-debugger.h
6822         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
6823
6824 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
6825
6826         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
6827         handler clauses. Fixes #78024.
6828
6829         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
6830         in the CALL_MEMBASE opcodes. Fixes #78088.
6831         (mono_arch_get_vcall_slot_addr): Ditto.
6832
6833 2006-04-10  Martin Baulig  <martin@ximian.com>
6834
6835         * debug-debugger.c: The thread handling code has now been moved
6836         into ../metadata/threads.c.
6837
6838 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
6839
6840         * driver.c (mono_main): Fix --with-gc=none build.
6841
6842         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
6843         (mono_spillvar_offset_float): Ditto.
6844         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
6845         hreg, not when its !global, since on ia64, there is a third category: stacked
6846         registers.      
6847
6848 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
6849
6850         * mini.c: set MonoInst->klass for load field address and a few other
6851         places.
6852
6853 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
6854
6855         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
6856
6857 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
6858
6859         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
6860         the branch opt changes.
6861
6862 2006-04-06  Dick Porter  <dick@ximian.com>
6863
6864         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
6865         
6866         * wapihandles.c (mini_wapi_seminfo): 
6867         * driver.c (mono_main): Add semaphore info option
6868
6869 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
6870
6871         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
6872         branch optimization changes. Fixes #78009.
6873
6874 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
6875
6876         * mini.c: ignore accessibility of methods in managed->native wrappers.
6877
6878 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
6879
6880         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
6881         
6882         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
6883
6884 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
6885
6886         * mini.c: Modify the branch optimizations to preserve the invariant that
6887         the entries inside the in_bb and out_bb arrays are unique.
6888         (mono_unlink_bblock): Avoid creation of new arrays.
6889
6890 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
6891
6892         * mini.c (mono_unlink_bblock): Fix regression caused by previous
6893         change (#77992).
6894
6895 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
6896
6897         * mini.c (optimize_branches): Remove the "optimizations" in
6898         the cbranch1/cbranch2 -> branch cases which were causing several
6899         problems in the past. Fixes #77986.
6900
6901 2006-03-31  Chris Toshok  <toshok@ximian.com>
6902
6903         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
6904         default optimizations :(
6905
6906 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
6907
6908         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
6909         branch.
6910
6911 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
6912
6913         * local-propagation.c: Added comments to structs and removed
6914         "Mono" prefixes from local tree mover types.
6915
6916 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
6917
6918         * Makefile.am (arch_sources): Define this for each architecture so 
6919         libmono_la_SOURCES is defined in one place.
6920
6921 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
6922
6923         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
6924         from handles/.
6925
6926 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
6927
6928         * driver.c: print the GC name supplied by configure.
6929
6930 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
6931
6932         * local-propagation.c: Added tree mover, and moved here all the
6933         local propagation code from mini.c
6934         * mini.c: Added support for treeprop, and moved all the local
6935         propagation code to local-propagation.c
6936         * mini.h: Added support for treeprop
6937         * driver.c: Added support for treeprop, enabled consprop, copyprop,
6938         treeprop, inline and deadce by default
6939         * Makefile.am: Added local-propagation.c
6940
6941 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
6942
6943         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
6944
6945 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
6946
6947         * debug-debugger.c: make it compile without the Boehm GC.
6948
6949 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6950
6951         * mini.c: fixed issue with mismatch when an icall is registered
6952         with multiple names but same address.
6953
6954 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
6955
6956         * declsec.c, mini-exceptions.c: use write barrier to set reference
6957         fields of managed objects.
6958
6959 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
6960
6961         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
6962         (can_access_internals): Fix a warning.
6963
6964         * mini.c (print_method_from_ip): Rename this to 
6965         mono_print_method_from_ip so it gets exported.
6966
6967         * trace.c: Deal with strings inside StringBuilder's containing garbage
6968         and fix memory leaks. Fixes #77848.
6969
6970 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
6971
6972         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
6973         fixes #77787.
6974
6975 2006-03-16 Neale Ferguson <neale@sinenomine.net>
6976         
6977         * mini-s390.c: Remove OP_X86_TEST_NULL.
6978
6979 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
6980
6981         * mini.c: use the correct GetHashCode() for the moving collector.
6982
6983 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
6984
6985         * liveness.c: Regalloc spill cost tuning.
6986
6987 2006-03-15 Neale Ferguson <neale@sinenomine.net>
6988         
6989         * mini-s390x.h: Correct S390_LONG macro.
6990
6991         * mini-s390x.c: Cleanup unused code.
6992
6993 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
6994
6995         * jit-icalls.h: New file.
6996
6997         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
6998         icalls and include that instead of including jit-icalls.c.
6999
7000         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
7001         OP_X86 opcodes.
7002
7003 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
7004
7005         * mini.c: when checking for member accessibility, also check for
7006         friend assemblies and for explicit interface implementations.
7007
7008 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
7009
7010         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
7011
7012         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
7013
7014         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7015         common cases are done first.    
7016
7017         * mini-ops.h: Only define platform specific opcodes on the given platform.
7018
7019         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
7020         branch.
7021         
7022 2006-03-14  Martin Baulig  <martin@ximian.com>
7023
7024         Revert Paolo's change from r57348:
7025
7026         * mini.h: don't use gboolean for bitfields.
7027         * mini.c: verifier changes for fields and methods accessibility.
7028
7029 2006-03-13  Neale Ferguson <neale@sinenomine.net>
7030
7031         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
7032
7033         * mini-s390x.c: Fix conv_r_un.
7034
7035         * cpu-s390, cpu-s390x.md: Fix lengths.
7036
7037 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
7038
7039         * mini.c: nested types have access to all the nesting
7040         levels, not just the enclosing types.
7041
7042 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7043
7044         * mini.c: added a few more verification checks.
7045
7046 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
7047
7048         * liveness.c: Merge optimizations from the linear-il branch.
7049
7050 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
7051
7052         * mini-ia64.c (emit_call): Add a comment.
7053
7054         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
7055
7056         * tramp-ia64.c: Fix some warnings.
7057
7058 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
7059
7060         * mini.h: don't use gboolean for bitfields.
7061         * mini.c: verifier changes for fields and methods accessibility.
7062
7063 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
7064
7065         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
7066         lazy icall wrapper changes.
7067
7068         * dominators.c: Replace all the dominator algorithms with faster
7069         ones from the linear-il branch.
7070
7071         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
7072         the mempool.
7073
7074         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7075         common cases are done first.
7076
7077         * mini-amd64.c: Fix some warnings.
7078
7079         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
7080         from the mempool.
7081
7082         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
7083         added code.
7084
7085         * mini.h: Add a missing prototype.
7086
7087 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
7088
7089         * mini.c: Compile icall wrappers lazily.
7090
7091         * mini-codegen.c: Use printf instead of g_print since its much faster.
7092
7093         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
7094         function.
7095
7096         * mini.c (optimize_branches): Cache the negative result from 
7097         remove_block_if_useless ().
7098
7099         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
7100         Also fix some bblock linking issues.
7101
7102         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
7103         assembly files.
7104
7105         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
7106
7107         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
7108         accessed fields first, for better cache behavior.
7109         
7110 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7111
7112         * mini.c: speedup IList<T> array accesses.
7113
7114 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
7115
7116         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
7117         inline_costs counter. Fixes #77190.
7118
7119 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
7120
7121         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
7122         trace messages. Fixes #77706.
7123
7124 2006-03-04  Martin Baulig  <martin@ximian.com>
7125
7126         * tramp-amd64.c, tramp-x86.c
7127         (mono_debugger_create_notification_function): Use
7128         mono_global_codeman_reserve() to allocate a buffer at runtime and
7129         return it.
7130
7131         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
7132
7133         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
7134         notification function at runtime and then call `initialize' in the
7135         `MONO_DEBUGGER__debugger_info' vtable.
7136
7137 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
7138
7139         * iltests.il: Fix a visibility problem.
7140
7141 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
7142
7143         * driver.c, mini.c: add hooks for the counters API.
7144
7145 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
7146
7147         * driver.c: show disabled options.
7148
7149 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7150
7151         * linear-scan.c: always use cost-driven selection.
7152
7153 2006-02-28  Raja R Harinath  <rharinath@novell.com>
7154
7155         * jit-icalls.c (helper_compile_generic_method): Revert change from
7156         2006-02-24.
7157
7158 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
7159
7160         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
7161
7162 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
7163
7164         * inssel.brg: style fixes, mostly to force the updated monoburg
7165         to run for people using svn.
7166
7167 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
7168
7169         * mini.c: match monoburg changes.
7170
7171 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7172
7173         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
7174         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
7175         declaration in the header file.
7176
7177 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
7178
7179         * helpers.c: reduce relocations and mem usage.
7180
7181 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
7182
7183         * mini.h, mini-codegen.c: disable logging features if
7184         requested by configure.
7185
7186 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
7187
7188         * mini.c: tiny verifier changes.
7189
7190 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
7191
7192         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
7193         cpu-pentium.md: stack alignment changes for osx/x86,
7194         partially from Geoff Norton <gnorton@customerdna.com>.
7195
7196 2006-02-24  Raja R Harinath  <harinath@gmail.com>
7197
7198         * jit-icalls.c (helper_compile_generic_method): Update to changes
7199         in metadata/class.c.
7200
7201 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
7202         
7203         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
7204         
7205         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
7206         interface calls with large offsets.
7207
7208 2006-02-23  Raja R Harinath  <rharinath@novell.com>
7209
7210         * jit-icalls.c (helper_compile_generic_method): Document the
7211         special-case we depend on so that we can inflate the method twice
7212         with the same context with no bad side-effects.
7213
7214 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
7215
7216         * mini-x86.c, mini-amd64.c: fix for case when xen support
7217         is disabled.
7218
7219 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
7220
7221         * mini-x86.c, mini-amd64.c: generate code to access tls items
7222         in a faster way for Xen systems.
7223
7224 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
7225
7226         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
7227         updates and compilation fixes for the OSX/x86 port, mostly from
7228         Geoff Norton <gnorton@customerdna.com>.
7229
7230 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
7231
7232         * inssel.brg: faster interface call implementation
7233         to sync with the interface_offsets MonoVTable changes.
7234
7235 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
7236
7237         * mini.c: more verification checks.
7238
7239 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
7240
7241         * mini.c: added a few more verification checks.
7242
7243 2006-02-17      Neale Ferguson <neale@sinenomine.net>
7244
7245         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
7246         facility on the processor and use it if available.
7247
7248 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
7249
7250         * driver.c, aot.c, mini.c: throw exception if the IL code is
7251         invalid or unverifiable.
7252
7253 2006-02-17  Raja R Harinath  <rharinath@novell.com>
7254
7255         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
7256         m.StructField.
7257
7258 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
7259
7260         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
7261
7262 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7263
7264         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
7265         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
7266         handling of instantiated generic valuetypes.
7267
7268 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
7269
7270         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
7271         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
7272         instead.
7273
7274         * generics.2.cs: Revert the nullable reftypes tests.
7275
7276 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
7277
7278         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
7279         using __builtin_frame_address (1) as it doesn't work in the presence
7280         of optimizations. Hopefully fixes #77273.
7281
7282         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
7283         -> generics.cs change as it doesn't work with some automake versions.
7284
7285 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
7286
7287         * mini.c: handle systems that sue a different way to
7288         retrieve the stack address of the current thread.
7289
7290 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
7291
7292         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
7293         it specially in the makefile.
7294
7295         * generics.2.cs: Add tests for nullable reference types.
7296
7297 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7298
7299         * mini.c: always handle the case when mono_jit_init()
7300         is called in a thread different from the main thread,
7301         confusing libgc (bug #77309).
7302
7303 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
7304
7305         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
7306
7307 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7308
7309         * mini.c: change optimize_branches () to use a single loop
7310         and introduce a new optimization to simplify some range checks.
7311
7312 2006-02-03  Martin Baulig  <martin@ximian.com>
7313
7314         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
7315         and merged with debugger_thread_manager_add_thread().
7316         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
7317         inform the debugger about the main thread.
7318
7319 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
7320
7321         * basic.cs: Add test for div.un/rem.un constant folding.
7322
7323 2006-02-03  Neale Ferguson <neale@sinenomine.net>
7324
7325         * cpu-s390x.md: correct int_xor_imm length
7326
7327 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
7328
7329         * generics.2.cs: New test for #77442.
7330
7331         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
7332         #77442.
7333
7334 2006-02-02  Martin Baulig  <martin@ximian.com>
7335
7336         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
7337         <mono/metadata/mono-debug-debugger.h>   
7338
7339         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
7340
7341 2006-02-02  Martin Baulig  <martin@ximian.com>
7342
7343         * debug-debugger.h: New header file for debug-debugger.c.
7344
7345         * debug-debugger.c: Big API cleanup; don't run the managed Main()
7346         function is a separate thread anymore; add support for attaching.
7347
7348 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
7349
7350         * tramp-x86.c: Fix a warning.
7351
7352 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
7353
7354         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
7355         on very large methods.
7356
7357         * aot.c (load_patch_info): Fix a warning.
7358
7359 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
7360
7361         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
7362         mini-ops.h: alu membase optimizations.
7363
7364 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
7365
7366         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
7367         to speedup StringBuilder.
7368
7369 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
7370
7371         * dominators.c (mono_compute_natural_loops): Fix detection of
7372         loop body start blocks.
7373
7374         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
7375
7376 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
7377
7378         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
7379         #75145.
7380
7381 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
7382
7383         * aliasing.c: Fixed aliasing issue on 64 bit archs.
7384
7385 2006-01-25  Martin Baulig  <martin@ximian.com>
7386
7387         * debug-debugger.c: Moved the `MonoDebuggerManager' and
7388         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
7389         started to cleanup this file a little bit.
7390
7391 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
7392
7393         * mini.c: optimize a codepath frequently happening in generics code.
7394
7395 2006-01-23  Martin Baulig  <martin@ximian.com>
7396
7397         * Makefile.am: Only compile debug-debugger.c on supported platforms.
7398
7399         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
7400         functions directly.
7401
7402         * driver.c: debug-debugger.c is only available if
7403         `MONO_DEBUGGER_SUPPORTED' is defined.   
7404
7405 2006-01-23  Martin Baulig  <martin@ximian.com>
7406
7407         * debug-debugger.c: Only enable this on platforms where the Mono
7408         Debugger is working (x86 and x86_64).
7409
7410 2006-01-21  Martin Baulig  <martin@ximian.com>
7411
7412         The Mono Debugger is now using the normal `mono' instead of the
7413         `mono-debugger-mini-wrapper' when executing managed code.
7414
7415         * debug-debugger.c: New file; previously known as
7416         debugger/wrapper/wrapper.c.
7417
7418         * debug-mini.c (mono_init_debugger): Removed.
7419
7420         * driver.c (mono_main): Added new `--inside-mdb' command line
7421         argument which is used when running inside the debugger.
7422
7423 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
7424
7425         * liveness.c (mono_analyze_liveness): Remove some unused data
7426         structures.
7427
7428 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
7429
7430         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
7431
7432 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
7433
7434         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
7435         depends on implementation details of monobitset.
7436
7437         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
7438         Fixes #77271.
7439
7440 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
7441
7442         * liveness.c: Update after monobitset changes.
7443
7444 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
7445
7446         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
7447
7448 2006-01-11 Neale Ferguson <neale@sinenomine.net>
7449
7450         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
7451
7452         * mini-s390x.c: Remove warning messages.
7453
7454 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
7455
7456         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
7457
7458 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
7459
7460         * generics.2.cs: Add ldelem/stelem_any test.
7461
7462 2006-01-10 Neale Ferguson <neale@sinenomine.net>
7463
7464         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
7465
7466 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
7467
7468         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
7469         
7470 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
7471
7472         * generics.2.cs: Reenable vtype tests.
7473
7474         * inssel-x86.brg: Remove an icorrect valuetype rule.
7475
7476 2006-01-06 Neale Ferguson <neale@sinenomine.net>
7477
7478         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
7479         initial support for OP_ABS.
7480
7481 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7482
7483         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
7484
7485 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7486
7487         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
7488         conversion and implement LADD/LSUB.
7489
7490         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
7491         architectures.
7492
7493 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7494
7495         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
7496
7497         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
7498         architectures.
7499
7500 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7501
7502         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
7503         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
7504         (stack walk problem).
7505
7506 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
7507
7508         * aot.c (mono_aot_load_method): Fix a warning.
7509
7510 2006-01-03  Neale Ferguson <neale@sinenomine.net>
7511
7512         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
7513
7514 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
7515
7516         * iltests.il: Add test for #77148.
7517
7518         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
7519         #77148.
7520
7521 2006-01-03  Neale Ferguson <neale@sinenomine.net>
7522
7523         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
7524
7525 2006-01-03  Neale Ferguson <neale@sinenomine.net>
7526
7527         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
7528         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
7529
7530         * basic-long.cs: Add lconv-to-r4/r8 tests.
7531
7532 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
7533
7534         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
7535
7536         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
7537         here as on other archs.
7538
7539 2005-12-29 Neale Ferguson <neale@sinenomine.net>
7540
7541         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
7542
7543 2005-12-29 Neale Ferguson <neale@sinenomine.net>
7544
7545         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
7546         
7547         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
7548
7549         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
7550         instrument_prolog; Add memory_barrier instruction.
7551
7552 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
7553
7554         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
7555
7556 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
7557
7558         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
7559
7560         * aliasing.c inssel.brg: Fix warnings.
7561
7562         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
7563         could skip initialization of some parts of memory.
7564
7565         * mini.c mini-ia64.c: Fix warnings.
7566
7567         * inssel-sparc.brg: Add an implementation of lneg which actually works.
7568
7569 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
7570
7571         * aliasing.c (mono_build_aliasing_information): Add a workaround for
7572         a crash seen on sparc.
7573
7574         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
7575         
7576         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
7577
7578 2005-12-21 Neale Ferguson <neale@sinenomine.net>
7579
7580         * mini-ops.h: Add s390_backchain instruction
7581
7582         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
7583
7584         * cpu-s390.md: Add s390_backchain instruction
7585
7586         * mini-s390.c: Significant ABI changes
7587
7588         * mini-s390.h: Cater for zero length structures
7589
7590 2005-12-20 Neale Ferguson <neale@sinenomine.net>
7591
7592         * mini-s390.c: ABI fixes
7593
7594         * inssel-s390.brg: Remove debug statements
7595
7596         * cpu-s390.md: Fix length of ATOMIC_xx operations
7597
7598 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
7599
7600         * basic-float.cs: Add float<->long conversion tests.
7601
7602 2005-12-16 Neale Ferguson <neale@sinenomine.net>
7603
7604         * mini-s390.c: Fix LOCALLOC processing.
7605
7606         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
7607
7608 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
7609
7610         * iltests.il: Add tests for some opcodes not covered by the other
7611         tests.
7612
7613 2005-12-15 Neale Ferguson <neale@sinenomine.net>
7614
7615         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
7616         register loading for Tail processing; Correct trace output.
7617
7618         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
7619
7620         * cpu-s390.md: Correct size of jmp instruction. 
7621
7622 2005-12-13 Neale Ferguson <neale@sinenomine.net>
7623
7624         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
7625
7626 2005-12-13 Neale Ferguson <neale@sinenomine.net>
7627
7628         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
7629           Bring s390 up to current level.
7630
7631 2005-12-12  Zltan Varga  <vargaz@gmail.com>
7632
7633         * generics.2.cs: Disable the newly added tests as they do not work yet.
7634         
7635         * generics.2.cs: Add valuetype tests.
7636
7637 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
7638
7639         * basic-long.cs: Add i4->u8 test.
7640
7641         * objects.cs: Add tests for JIT intrinsic.
7642
7643         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
7644         optimizations lost by a mistake.
7645
7646 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
7647
7648         * basic-long.cs: Remove a test moved to objects.cs.
7649
7650         * arrays.cs: Add more array tests.
7651
7652 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
7653
7654         * arrays.cs: Add new tests for multi-dimensional arrays.
7655
7656 2005-12-06  Raja R Harinath  <rharinath@novell.com>
7657
7658         * Makefile.am (test_sources2): Add generics.2.cs.
7659         (EXTRA_DIST): Add test_sources2.
7660
7661 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
7662
7663         Support for boxing and unboxing nullable types as well as the
7664         isinst operation on nullables, per the CLI ammendment.
7665
7666         * inssel.brg (CEE_ISINST): Special case for nullable
7667
7668         * mini.c (handle_unbox_nullable): new method
7669         (handle_box): Special case for nullable types
7670         (mono_method_to_ir): Call handle_unbox_nullable in correct
7671         places.
7672
7673         * generics.2.cs: New test suite
7674
7675         * Makefile.am: Support for regression tests with generics.
7676
7677 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
7678
7679         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
7680         allocated to registers. Fixes #76800.
7681
7682 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
7683
7684         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
7685
7686 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
7687
7688         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
7689         of platforms.
7690
7691 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
7692
7693         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
7694         objects.cs.
7695
7696         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
7697         
7698         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
7699 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
7700
7701         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
7702         single precision before storing to a single precision location.
7703
7704 2005-11-28  Raja R Harinath  <rharinath@novell.com>
7705
7706         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
7707
7708 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
7709
7710         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
7711         correct files.
7712
7713         * basic.cs: Remove test_0_byte_compares test which was moved to
7714         objects.cs a long time ago.
7715
7716 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
7717
7718         * aliasing.c: Fixed aliasing issue on 64 bit archs.
7719
7720 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
7721
7722         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
7723         handlers are called.
7724
7725         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
7726         throwing code.
7727
7728          * mini-ia64.c: Add support for the throw->branch exception 
7729         optimization.   
7730
7731         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
7732
7733 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
7734
7735         * mini.c: Enabled "fastpath" deadce :-)
7736         
7737 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
7738
7739         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
7740         alias analysis pass to support it.
7741         * mini.h: Likewise.
7742         * ssa.c: Likewise.
7743         * liveness.c: Likewise (liveness computation can use aliasing
7744         information to be more accurate).
7745         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
7746         moreover made so that "--compile-all" uses the given optimization
7747         flags and not the default ones.
7748         * aliasing.c: Alias analysis (new file).
7749         * aliasing.h: Likewise.
7750         * Makefile.am: added "aliasing.c" and "aliasing.h".
7751         
7752 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
7753
7754         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
7755         OP_L opcodes.
7756
7757 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
7758
7759         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
7760         fp >= end_of_stack exit condition, as it is not needed, and it might
7761         become true for fp eliminated frames.
7762
7763 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
7764
7765         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
7766         coded offsets.
7767
7768 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
7769
7770         * mini-arm.c: fixed alignment of doubles/longs to match
7771         the C ABI (bug #76635).
7772
7773 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
7774
7775         * aot.c: fix compilation with --enable-minimal=aot.
7776
7777 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
7778
7779         * mini-arm.c: fixed compatibility with the new
7780         floating point emulator package for compares.
7781
7782 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
7783
7784         * mini.c : reverted sig->pinvoke changes (r51396-51397).
7785
7786 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
7787
7788         * mini-exceptions.c (print_stack_frame): Output to stderr.
7789         (mono_handle_native_sigsegv): Ditto.
7790
7791 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
7792
7793         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
7794         OP_LCONV_TO_OVF_I implementation.
7795
7796         * mini-amd64.c: Add support for the throw->branch exception 
7797         optimization.
7798
7799         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
7800         when the catch clause catches a more general exception, i.e. Object.
7801
7802 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
7803
7804         * cpu-ia64.md: Remove unused opcodes.
7805
7806         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
7807         specific defines for architectures defining USE_SIGACTION.
7808
7809         * mini-ia64.c: Fix some warnings.
7810
7811         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
7812         version seemed to skip a frame.
7813
7814 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
7815
7816         * mini.c: Clean up the usage of sig->pinvoke flag. Now
7817         only calls which are made to native code use this flag.
7818
7819 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
7820
7821         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
7822         varargs methods as well.
7823         
7824         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
7825         which have save_lmf set. Reorganize methods prologs a bit.
7826
7827         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
7828         debugger to the proper place.
7829
7830 2005-10-29  Martin Baulig  <martin@ximian.com>
7831
7832         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
7833         when running inside the debugger until the debugger has support
7834         for it.
7835
7836 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
7837
7838         * mini.h: Fix a warning.
7839
7840 2005-10-24  Miguel de Icaza  <miguel@novell.com>
7841
7842         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
7843         we expose publicly, this returns the string.
7844
7845 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
7846
7847         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
7848         with fp elimination.
7849
7850 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
7851
7852         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
7853         native stacktrace using the glibc 'backtrace' function if available.
7854
7855 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
7856
7857         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
7858
7859         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
7860         handle SIGSEGVs received while in native code.
7861
7862         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
7863         code, call mono_handle_native_sigsegv which will abort the runtime
7864         after printing some diagnostics, instead of converting it into a
7865         confusing NullReferenceException.
7866
7867 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
7868
7869         * cpu-pentium.md: Remove unused opcodes.
7870
7871 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
7872
7873         * mini-amd64.h (MonoLMF): Add rsp field.
7874
7875         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
7876         the lmf too.
7877
7878 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
7879
7880         * mini-codegen.c (get_register_spilling): Fix some warnings.
7881
7882 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
7883
7884         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
7885         elimination during exception handling. Enable fp elimination by
7886         default.
7887
7888         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
7889         elimination.
7890
7891 2005-10-16  Martin Baulig  <martin@ximian.com>
7892
7893         * mini-exceptions.c
7894         (mono_debugger_run_finally): New public method for the debugger.
7895
7896 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
7897
7898         * debug-mini.c (mono_debug_init_method): Fix warning.
7899
7900         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
7901         the 'exname' parameter const to fix some warnings.
7902
7903 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
7904
7905         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
7906         introduced by the previous patch.
7907
7908 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
7909
7910         * basic-float.cs: Add test for precision of float arithmetic.
7911
7912         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
7913         when loading/storing single values from/to memory.
7914
7915         * mini.c (mono_jit_compile_method_with_opt): Create the function
7916         pointers in the correct domain.
7917
7918 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
7919
7920         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
7921         introduced by previous patch.
7922         
7923         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
7924         when out_filter_idx is NULL.
7925
7926         * mini-exceptions.c: Don't run filter clauses twice during exception
7927         handling. Fixes #75755.
7928
7929 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
7930
7931         * aot.c: Add support for ldflda wrappers.
7932
7933         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
7934         #75902.
7935
7936 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
7937
7938         * mini.c, mini.h: do not consider exception handlers blocks when
7939         setting up interface variables.
7940
7941 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
7942
7943         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
7944
7945 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
7946
7947         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
7948         causes a regression.
7949
7950         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
7951
7952 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
7953
7954         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
7955         of the OP_P definitions.
7956
7957         * TODO: Add a proposal for dealing with the CEE/OP mess.
7958
7959         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
7960         optimizations from the x86 port.
7961
7962         * cpu-amd64.md: Ditto.
7963
7964         * basic.cs basic-long.cs: Add tests.
7965
7966 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
7967
7968         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
7969         Patrik Torstensson's implementation of my exception-handling
7970         optimization idea, when the exception object is not used
7971         (bug #62150).
7972
7973 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
7974
7975         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
7976         of the mul_imm optimizations from the old jit.
7977
7978 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
7979
7980         * mini.c, liveness.c: patch by Patrik Torstensson and
7981         Zoltan Varga to improve performance in methods with
7982         exception clauses.
7983
7984 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
7985
7986         * driver.c: Remove 'Globalization' entry from --version.
7987
7988 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
7989
7990         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
7991         there is a profiler interested in JIT events.
7992
7993         * aot.c: Load profile files produced by the AOT profiling module, and
7994         reorder methods based on the profiling info. Add a 'method_order' table
7995         to the AOT file to make mono_aot_find_jit_info work with the reordered
7996         methods.
7997
7998         * mini.h: Bump AOT file version info.
7999
8000 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
8001
8002         * mini-arm.h: work around what looks like a gcc bug when optimizations
8003         are enabled.
8004
8005 2005-09-28  Raja R Harinath  <rharinath@novell.com>
8006
8007         * Makefile.am (AM_CFLAGS): Don't use += to append inside
8008         conditionals.  Use ...
8009         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
8010
8011 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
8012
8013         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
8014         to determine the amount of memory to copy when passing valuetypes.
8015
8016         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
8017         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
8018
8019 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
8020
8021         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
8022         information about aot.
8023
8024 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
8025
8026         * *.c: Replace the use of {Enter,Leave}CriticalSection with
8027         macros. This will allow a deadlock debugger to easily be plugged
8028         in.
8029
8030 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
8031
8032         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
8033
8034 2005-09-27  Raja R Harinath  <rharinath@novell.com>
8035
8036         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
8037         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
8038         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
8039         ($(arch_built)) [CROSS_COMPILING]: Error out.
8040
8041 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
8042
8043         * aot.c: Add support for the no_special_static flag for classes.
8044
8045 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
8046
8047         * Reapply reverted patches.
8048
8049         * *: Revert r50174 as well.
8050
8051         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
8052
8053 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
8054
8055         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
8056
8057 2005-09-23  Miguel de Icaza  <miguel@novell.com>
8058
8059         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
8060         part of the SIG_HANDLER_SIGNATURE.  
8061
8062 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
8063
8064         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
8065         statistics.
8066
8067         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
8068         introduced by previous patch.
8069
8070 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
8071
8072         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
8073         saved registers too.
8074
8075         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
8076         upon the information returned by get_call_info ().
8077         
8078         * mini-x86.c (add_float): Fix stack size calculation.
8079         (mono_arch_call_opcode): Rewrite this so it works based up the
8080         information returned by get_call_info ().
8081         (mono_arch_get_this_vret_args): Ditto.
8082
8083 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
8084
8085         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
8086         in cinfo to determine the registers which need to be used.
8087
8088 2005-09-20  Miguel de Icaza  <miguel@novell.com>
8089
8090         * driver.c (mono_main): Add --server and --desktop flags. 
8091
8092 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
8093
8094         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
8095         registers as global registers.
8096
8097         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
8098         longer needed with the new register allocator.
8099
8100         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
8101
8102         * cpu-ia64.md: Remove unused opcodes.
8103         
8104         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
8105         
8106 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
8107
8108         * cpu-amd64.md: Remove unused opcodes.
8109
8110         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
8111         needed with the new register allocator.
8112
8113         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
8114         reg-reg moves.
8115
8116 2005-09-16  Raja R Harinath  <rharinath@novell.com>
8117
8118         * Makefile.am (check-local): Don't invoke semdel-wrapper.
8119
8120 2005-09-16  Martin Baulig  <martin@ximian.com>
8121
8122         * exceptions-amd64.c
8123         (throw_exception): Don't call mono_debugger_throw_exception() if
8124         we're a rethrow - see the FIXME in the code.
8125
8126 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
8127
8128         * mini.c (mono_init_exceptions): This only works on some architectures.
8129         
8130 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
8131
8132         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
8133         on ia64.
8134
8135         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
8136
8137         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
8138         now in mini-exceptions.c.
8139
8140 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
8141
8142         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
8143         now in mini-exceptions.c.
8144
8145 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
8146
8147         * exceptions-x86.c: Applied patch from Patrik Torstensson 
8148         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
8149
8150         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
8151         code into mini-exceptions.c. Add some assertions to it.
8152
8153 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
8154
8155         * aot.c (emit_section_change): Applied patch from "The Software Team" 
8156         (<software@solmersa.com>). Fix as errors on windows.
8157
8158 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
8159
8160         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
8161         method info into the LMF.
8162
8163 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8164         
8165         * mini-ia64.c: Add proper unwind info for method epilogs.
8166
8167         * exceptions-ia64.c: Add some code to help debugging.
8168         
8169         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
8170
8171         * mini-exceptions.c: Fix warning.
8172
8173 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
8174
8175         * mini.c: Really fix build.
8176
8177         * mini-x86.c mini-amd64.c: Fix build.
8178
8179 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8180
8181         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
8182
8183         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
8184         some Interlocked methods as intrinsics.
8185
8186         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
8187         for Thread methods as well.
8188
8189         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
8190
8191         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
8192
8193         * mini-ia64.c mini-x86.c mini-amd64.c 
8194         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
8195         OP_MEMORY_BARRIER.
8196         
8197         * mini.c (mono_init_exceptions): Fix build breakage.
8198
8199 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
8200
8201         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
8202         of instructions. Use the new ia64_unw_op macros for emitting unwind
8203         info.
8204
8205         * mini.c (mono_init_exceptions): Initialize exception handling
8206         related trampolines at startup.
8207
8208 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
8209
8210         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
8211
8212 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
8213
8214         * mini.c: Handle type loading errors gracefully during compilation and
8215         throw the appropriate exception.
8216
8217 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
8218
8219         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
8220         for the mono binary.
8221
8222 2005-09-09  Martin Baulig  <martin@ximian.com>
8223
8224         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
8225         the release.
8226
8227 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
8228
8229         * mini-arm.h: use emulation for conv.r.un for the release.
8230
8231 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
8232
8233         * mini-arm.c, objects.cs: more fixes and tests for them.
8234
8235 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
8236
8237         * mini-arm.c: align structures to at least 4 bytes to be able
8238         to keep our current optimized memcpy.
8239
8240 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
8241
8242         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
8243
8244 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8245
8246         * mini.c: ignore SIGPIPE.
8247
8248 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
8249
8250         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
8251
8252         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
8253
8254 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
8255
8256         * mini.h: Add prototype for mono_allocate_stack_slots_full.
8257
8258 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
8259
8260         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
8261         exception handling support.
8262         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
8263         patch by Brian Koropoff <briank@marakicorp.com>).
8264
8265 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
8266
8267         * mini.c: revert another 'optimization' which breaks when
8268         items on the eval stack need to be saved at a basic block end
8269         (bug #75940).
8270
8271 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
8272
8273         * jit-icalls.c: for arrays, ensure we always provide
8274         lower bounds.
8275
8276 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
8277
8278         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
8279         
8280         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
8281
8282 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
8283
8284         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
8285         arguments in their original register.
8286
8287 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
8288
8289         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
8290         memset/memcpy.
8291
8292         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
8293         when ssapre is enabled.
8294
8295         * inssel-long.brg: Fix bug in previous patch.
8296
8297         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
8298         multiplication by a constant.
8299
8300 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
8301
8302         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
8303         icc.
8304
8305         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
8306         saving registers.
8307
8308 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
8309
8310         * inssel-arm.brg: apply changes tested by Brian Koropoff
8311         <briank@marakicorp.com>.
8312
8313 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
8314
8315         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
8316         
8317 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
8318
8319         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
8320         to the same register if dreg is just a base register.
8321         (print_ins): Improve printing of membase opcodes.
8322
8323         * inssel-x86.brg: Add optimized ldind(reg) rules.
8324
8325         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
8326
8327 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
8328
8329         * mini.c: when running under valgrind, set the stack bottom for
8330         the GC at the actual approximate stack for the app (fixes running
8331         mono with valgrind).
8332
8333 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
8334
8335         * mini.c: do no break at the first valuetype to init found
8336         (fixes bug #75791).
8337
8338 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
8339
8340         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
8341
8342 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
8343
8344         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
8345
8346 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
8347
8348         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
8349
8350 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8351
8352         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
8353
8354         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
8355         code.
8356
8357         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
8358         code.
8359
8360         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
8361         methods.
8362
8363 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
8364
8365         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
8366
8367 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8368
8369         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
8370         in the tail recursion optimization.
8371
8372         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
8373         debug info into the assembly file.
8374
8375         * iltests.il: Add test for filter regions.
8376
8377         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
8378         initial stack of filter regions. Fixes #75755.
8379
8380 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
8381
8382         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
8383         stack requirements.
8384
8385 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8386
8387         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
8388         the check for an already compiled method on non-ia64 platforms.
8389         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
8390         proper domain.
8391
8392         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
8393
8394         * inssel-x86.brg: Add some optimized call rules.
8395
8396 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
8397
8398         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
8399         method here.
8400
8401         * mini.h mini-trampolines.c: Pass the trampoline argument to 
8402         mono_arch_patch_delegate_trampoline.
8403
8404         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
8405
8406         * mini-trampolines.c: Fix build.
8407
8408         * mini-amd64.h: Add delegate trampolines.
8409
8410         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
8411
8412         * inssel-amd64.brg: Add optimized call rules.
8413         
8414         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
8415
8416         * inssel-ia64.brg: Add optimized ldind(reg) rules.
8417
8418 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
8419
8420         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
8421         change.
8422
8423         * mini-ia64.c: Remove LMF fixmes.
8424
8425         * mini-ia64.h: Remove most fields from LMF.
8426
8427         * inssel-ia64.brg (stmt): Fix unaligned access errors.
8428
8429         * mini-trampolines.c: Add support for IA64 function descriptors.
8430
8431         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
8432         for IA64 function descriptors.
8433
8434 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
8435
8436         * tramp-arm.c: patch the vtable for virtual calls. Added
8437         support code to register/unregister the LMF.
8438         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
8439         more LMF work.
8440
8441 2005-08-19  Dick Porter  <dick@ximian.com>
8442
8443         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
8444         bit value if needed.
8445
8446 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
8447
8448         * mini.c (mini_get_method): Move handling of wrapper data here.
8449
8450         * mini.c (mono_method_to_ir): Add support for dynamic methods.
8451
8452         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
8453         virtual.
8454
8455         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
8456         bblock->code does not remain empty.
8457
8458 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
8459
8460         * arrays.cs: Add regression test for #75832.
8461
8462         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
8463         rules. Fixes #75832.
8464
8465         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
8466         instruction scheduling.
8467
8468 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
8469
8470         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
8471
8472 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
8473
8474         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
8475
8476         * mini-codegen.c: Fix VC build.
8477
8478         * cpu-pentium.md: Increase length of atomic_exhange_i4.
8479
8480 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8481
8482         * mini.h: fix signature for mono_register_opcode_emulation.
8483
8484 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
8485
8486         * mini.c: Get rid of most of the helper_sig_... constants using
8487         mono_create_icall_signature ().
8488
8489 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
8490
8491         * jit-icalls.c (helper_ldstr): New helper function.
8492
8493         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
8494
8495         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
8496         throw, load the string using a helper call instead of creating a string object.
8497
8498         * aot.c: Update after LDSTR changes.
8499
8500         * mini.h: Bump AOT file version.
8501         
8502         * aot.c: Save class size info into the AOT file. Print more statistics during
8503         compilation.
8504
8505         * mini.h: Bump AOT file version.
8506
8507         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8508         ordering of disasm cases. Fixes #74957.
8509
8510 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
8511
8512         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
8513         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
8514         the generic code needed for the ARM port.
8515
8516 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
8517
8518         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
8519         inssel-arm.brg: more ARM features and fixes.
8520
8521 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
8522
8523         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
8524         ARM port work in progress.
8525
8526 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
8527
8528         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
8529
8530         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
8531
8532         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
8533
8534         * inssel.brg (mini_emit_memset): Add support for unaligned access.
8535
8536         * *-ia64.*: Ongoing IA64 work.
8537         
8538         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
8539
8540 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
8541
8542         * TODO: Remove out-of-data todo stuff.
8543
8544         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
8545         dead code.
8546
8547         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
8548
8549         * mini.h: Bump corlib version.
8550
8551 2005-07-27  Martin Baulig  <martin@ximian.com>
8552
8553         * mini-codegen.c
8554         (create_copy_ins): Added `const unsigned char *ip' argument; set
8555         `copy->cil_code' from it.
8556
8557 2005-07-27  Martin Baulig  <martin@ximian.com>
8558
8559         * mini-exceptions.c (mono_handle_exception): Don't call
8560         mono_debugger_handle_exception() for filters.
8561
8562 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
8563
8564         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
8565         as well.
8566
8567 2005-07-26  Martin Baulig  <martin@ximian.com>
8568
8569         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
8570
8571         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
8572         helper_compile_generic_method() if the method is actually virtual
8573         and non-final.
8574
8575 2005-07-26  Martin Baulig  <martin@ximian.com>
8576
8577         * mini.c
8578         (trampoline_code): Renamed to `mono_trampoline_code' and made it
8579         public; this is now accessed directly by the debugger.
8580         (mono_generic_trampoline_code): Removed.
8581
8582         * debug-mini.c
8583         (mono_debug_init_method): Also add interncalls and wrappers.
8584
8585 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
8586
8587         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
8588
8589 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
8590
8591         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
8592
8593 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
8594
8595         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
8596
8597 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
8598
8599         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
8600         getting TLS offsets on AMD64 too.
8601
8602 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
8603
8604         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
8605
8606 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
8607
8608         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
8609         inssel-arm.brg, mini-arm.h: ARM port work in progress.
8610
8611 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
8612
8613         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
8614
8615         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
8616         to mini.c.
8617
8618         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
8619         mono_sparc_is_virtual_call ().
8620         
8621         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
8622
8623         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
8624         trampoline parameters.
8625
8626         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
8627         
8628         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
8629         to mono_arch_get_vcall_slot_addr.
8630
8631         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
8632         trampoline code.
8633
8634         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
8635
8636 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
8637
8638         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
8639
8640 2005-07-19  Martin Baulig  <martin@ximian.com>
8641
8642         * exceptions-amd64.c (throw_exception): Call
8643         mono_debugger_throw_exception() here like we're doing it on i386.
8644
8645 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
8646
8647         * mini-ia64.c: Add optimized TLS access support.
8648
8649 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
8650
8651         * mini-exceptions.c: Ongoing IA64 work.
8652
8653         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
8654
8655         * mini.c: Use the default optimization set when embedding. Fixes
8656         #75194.
8657
8658 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
8659
8660         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
8661         of trampolines to a separate file.
8662
8663         * mini-trampolines.c: New file.
8664
8665         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
8666         separate file.
8667         
8668         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
8669         amd64/ia64 code.
8670
8671         * mini-codegen.c: Fix cygwin build.
8672
8673 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
8674
8675         * mini.c: Add some minor changes needed by the IA64 port.
8676
8677         * *-ia64.*: Ongoing IA64 work.
8678
8679 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
8680
8681         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
8682         trampolines into arch-independent and arch-dependent parts.
8683
8684         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
8685
8686 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
8687
8688         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
8689
8690         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
8691         the xp-regalloc-branch for amd64.
8692
8693         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
8694         xp-regalloc-branch for x86.
8695
8696 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
8697
8698         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
8699
8700 2005-07-06  Martin Baulig  <martin@ximian.com>
8701
8702         * mini.c
8703         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
8704         (mono_jit_runtime_invoke): Likewise.
8705
8706 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
8707
8708         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
8709         on x86 too.
8710         
8711         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
8712         without loading their metadata. Reorganize the file format so exception handling+
8713         debug info is kept separate from normal method info. Create MonoJitInfo 
8714         structures for methods lazily.
8715
8716         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
8717         loading metadata.
8718         (x86_class_init_trampoline): Patch AOT class init trampolines too.
8719
8720         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
8721
8722         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
8723         in AOT code.
8724
8725         * mini.h: Bump AOT file version.
8726
8727 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
8728
8729         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
8730
8731 2005-07-01  Raja R Harinath  <rharinath@novell.com>
8732
8733         * Makefile.am (check-local): Call semdel-wrapper.
8734
8735 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
8736
8737         * mini-x86.c: Revert the last change as it seems to break the build..
8738
8739 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
8740
8741         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
8742         
8743         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
8744
8745 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
8746
8747         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
8748         outside of the macro, so strange stuff doesn't happen with gcc4
8749         (NEW_AOTCONST_TOKEN): Likewise.
8750
8751 2005-06-28  Martin Baulig  <martin@ximian.com>
8752
8753         * mini.c (mini_class_is_system_array): New static method; use this
8754         instead of `klass->parent == mono_defaults.array_class' everywhere
8755         since this also works for the new generic array class.
8756
8757 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
8758
8759         * inssel.brg: Remove warnings.
8760
8761 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
8762
8763         * mini-ia64.c: Ongoing IA64 work.
8764
8765         * basic-float.cs: Add float->i1 conversion test.
8766
8767         * iltests.il: Add conv.u4 test.
8768
8769 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
8770
8771         * inssel-long.brg: Fix bug caused by last change.
8772
8773 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
8774
8775         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
8776         BSDs.  Allows the x86 JIT to work on OSX86
8777
8778 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
8779
8780         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
8781         u4->i8 conversion.
8782
8783         * mini-ia64.c: Ongoing IA64 work.
8784
8785 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
8786
8787         * mini-ia64.c: Ongoing IA64 work.
8788
8789         * driver.c: Clean up jit_code_hash as well when using --regression.
8790
8791         * inssel-long.brg: Fix long->i4/u4 conversion rules.
8792
8793         * basic-long.cs: Add tests for long->u4 conversion.
8794
8795 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
8796
8797         * mini.c: Take mono_get_domainvar out of macros. This makes sure
8798         that we do not depend on undefined C behavior: the order stuff
8799         gets evaluated within an expression. Fixes mono when compiled on
8800         GCC 4.
8801
8802 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
8803
8804         * *-ia64.*: Ongoing IA64 work.
8805
8806         * aot.c: Lower memory usage while loading AOT methods.
8807
8808         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
8809
8810         * mini.h: Bump AOT file format version.
8811
8812 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
8813
8814         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
8815
8816 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
8817
8818         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
8819         not on callee assembly). Fixed some comments.
8820
8821 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
8822
8823         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
8824         it gets proper disassembly.
8825         (emit_method_info): Remove some dead code.
8826
8827         * mini.c (mini_method_compile): Allways allocate the GOT var in
8828         mono_method_to_ir for emulating opcodes.
8829
8830 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
8831
8832         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
8833         before freeing the code memory. Fixes #74990.
8834
8835         * objects.cs: Add regression test for #74992.
8836
8837         * liveness.c: Extend live ranges of arguments to the beginning of the
8838         method. Fixes #74992.
8839
8840         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
8841         so it points into the faulting instruction.
8842
8843 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
8844
8845         * jit-icalls.c (mono_imul_ovf): Add exception handling.
8846
8847         * *-ia64.*: Ongoing IA64 work.
8848
8849         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
8850
8851 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
8852
8853         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
8854
8855         * *-ia64.*: Ongoing IA64 work.
8856
8857 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
8858
8859         * basic-long.cs: Add tests for add/sub.ovf.
8860
8861         * basic.cs: Add tests for sub.ovf.
8862
8863         * *-ia64.*: Ongoing IA64 work.
8864
8865 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
8866
8867         * *-ia64.*: Ongoing IA64 work.
8868
8869         * basic.cs: Add conv.ovf.i4.un test.
8870
8871 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
8872
8873         * mini.c: (remove_block_if_useless) Fixed bug 75061.
8874         
8875 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8876
8877         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
8878
8879 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
8880
8881         * *-ia64.*: Ongoing IA64 work.
8882
8883 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8884
8885         * trace.[ch]:
8886         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
8887
8888 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
8889
8890         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
8891
8892 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
8893
8894         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
8895
8896         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
8897         of a call is callable by a near call.
8898
8899 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
8900
8901         * mini-ia64.c: Ongoing IA64 work.
8902
8903 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
8904
8905         * genmdesc.c: Make the generated array non-static.
8906
8907         * inssel-long.brg: Fix LSHR_IMM rule.
8908
8909         * *-ia64.*: Ongoing IA64 work.
8910
8911         * *-ia64.*: Ongoing IA64 work.
8912
8913 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
8914
8915         * *-ia64.*: Ongoing IA64 work.
8916
8917         * *-ia64.*: Ongoing IA64 work.
8918         
8919         * mini-ia64.c: Ongoing IA64 work.
8920
8921         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
8922
8923 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
8924
8925         * objects.cs basic-calls.cs: Move some tests to objects.cs.
8926         
8927         * objects.cs basic-long.cs: Move some tests to objects.cs.
8928
8929 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
8930
8931         * *-ia64.*: Ongoing IA64 work.
8932
8933         * iltests.il: Add a new test.
8934
8935         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
8936         newobj. Fixes #75042.
8937
8938 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
8939
8940         * *-ia64.*: Ongoing IA64 work.
8941         
8942         * *-ia64.*: Ongoing IA64 work.
8943         
8944         * *-ia64.*: Ongoing IA64 work.
8945
8946         * basic.cs objects.cs: Move tests accessing static variables as well.
8947
8948         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
8949
8950 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
8951
8952         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
8953
8954         * driver.c: Always print failed tests.
8955
8956         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
8957         frame pointer.
8958
8959         * *ia64*: Ongoing IA64 work.
8960
8961 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
8962
8963         * basic.cs: Add tests for add.ovf. Fix warnings.
8964
8965 2005-05-18  Miguel de Icaza  <miguel@novell.com>
8966
8967         * driver.c (mono_main): Avoid crash if no argument is passed to
8968         --break;  Do not use g_error, but f_printf.   And fix all other
8969         ocurrences of the same crash.
8970
8971 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
8972
8973         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
8974         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
8975         Fixes #74742.
8976
8977 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
8978
8979         * *-ia64.*: Add beginnings of IA64 backend.
8980
8981         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
8982
8983 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
8984
8985         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
8986         Fixes #74925.
8987
8988         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
8989
8990         * mini-amd64.c: Fix a warning.
8991
8992 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
8993
8994         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
8995         in float_neg. Fixes #74897.
8996
8997         * mini-amd64.c (emit_call): Fix another near call bug.
8998
8999 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
9000
9001         * declsec.c: Keep the appdomain information in the structure. Added a 
9002         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
9003         value gets overwritten).
9004         * declsec.h: Set the default MonoArray for the the stack to 6. Added
9005         an MonoAppDomain member to MonoSecurityFrame.
9006         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
9007         used in the stack walk. Now use a MonoArray which grow (double) when
9008         it gets full.
9009
9010 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
9011
9012         * mini.c: Re-enabled runtime cleanup, since running threads should
9013         now properly stop when exiting.
9014
9015 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
9016
9017         * mini-codegen.c: New file contaning the arch-independent local
9018         register allocator. Not used by any architectures yet.
9019
9020         * mini.h linear-scan.c: Merge some changes from the 
9021         mini-xp-local-regalloc branch.
9022
9023 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
9024
9025         * mini-amd64.c (emit_call): Fix calls to native functions when the
9026         runtime is compiled as a shared library. Fixes #74756.
9027
9028         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
9029         on a literal field. Fixes #74751.
9030
9031 2005-04-25  Raja R Harinath  <rharinath@novell.com>
9032
9033         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
9034
9035 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
9036
9037         * objects.cs: Add missing null casting test.
9038
9039 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
9040
9041         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
9042         in wrapper methods. Also rename 'address' variable to 'offset'.
9043
9044 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
9045
9046         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
9047         warnings.
9048         
9049         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
9050
9051         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
9052         work on windows.
9053
9054 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9055
9056         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
9057
9058 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
9059
9060         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
9061         just the last bytes.
9062
9063 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
9064
9065         * aot.c (mono_compile_assembly): Fix warning.
9066
9067         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
9068         by the _MSC_VER stuff.
9069
9070 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
9071
9072         * inssel-long.brg: Fix #74588.
9073
9074         * cpu-amd64.md: Fix #74591.
9075
9076         * iltests.il: Add new regression tests.
9077
9078 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
9079
9080         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
9081         valuetype.
9082
9083 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
9084
9085         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
9086
9087         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
9088         from Bill Middleton <flashdict@gmail.com>.
9089
9090 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
9091
9092         * arrays.cs: Add new regression test. Fix warnings.
9093
9094 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
9095
9096         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
9097         and leakage in CKFINITE.
9098
9099         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
9100         this to a null op since it is called on amd64 too.
9101
9102         * exceptions-amd64.c (get_throw_trampoline): Align stack.
9103
9104         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
9105         body since this is not used on amd64.
9106         
9107         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
9108
9109         * mini-amd64.c: Remove obsolete fixmes.
9110
9111         * mini.c (print_method_from_ip): Fix debugging support.
9112
9113 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9114
9115         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
9116         so that expressions that don't give much gain are not reduced.
9117         * ssapre.h: Likewise.
9118
9119 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
9120
9121         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
9122
9123         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
9124
9125         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
9126
9127 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
9128
9129         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
9130
9131         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
9132
9133 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
9134
9135         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
9136         stack touching.
9137
9138         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
9139
9140         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
9141
9142         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
9143
9144         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
9145         MONO_ARCH_USE_SIGACTION. Fixes #74252.
9146
9147         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
9148
9149         * mini-x86.c: Fix up stack overflow handling.   
9150
9151         * exceptions.cs: Add new regression test.
9152
9153 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
9154
9155         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
9156         mono_jit_thread_attach.
9157
9158         * mini.c (mono_method_to_ir): Verify called method is not abstract.
9159
9160 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9161
9162         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
9163         avoid calling constructors using callvirt.
9164
9165         * inssel.brg: Fix #74073.
9166
9167 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
9168
9169         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
9170         compilation with non-GCC compilers.
9171         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
9172         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
9173
9174 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
9175
9176         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
9177         klass->interface_offsets (will likely fix bug#74073).
9178
9179 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9180
9181         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
9182
9183 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
9184
9185         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
9186         to amd64_div_reg_size ().
9187         
9188         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
9189
9190 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
9191
9192         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
9193
9194 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9195
9196         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
9197
9198 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9199
9200         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
9201         
9202         * mini.c (mono_precompile_assembly): Load and precompile referenced
9203         assemblies as well. Fixes #74015.
9204
9205 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
9206
9207         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
9208
9209 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
9210
9211         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
9212         a lot of checks and (anyway) permissions cannot work until corlib is 
9213         loaded.
9214
9215 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
9216
9217         * mini-ppc.c: fixed ABI issue on sysv/ppc.
9218
9219 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
9220
9221         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
9222         calls (fixes bug#72824).
9223
9224 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
9225
9226         * mini.c: fix tail recursion elimination (see test in bug#73936).
9227
9228 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
9229
9230         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
9231         some fp functions in sse2 mode.
9232
9233 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
9234
9235         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
9236
9237 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
9238
9239         * mini.h mini.c: Add mono_get_jit_tls_key ().
9240
9241         * mini-x86.c: Enable fast TLS support on windows.
9242
9243 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
9244
9245         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
9246         * mini.c: Check for p/invoke method when generating code. If a
9247         p/invoke method, or it's class, isn't decorated with [Suppress
9248         UnmanagedCodeSecurity] then generate code to call System.Security.
9249         UnmanagedDemand (only if the security manager is active).
9250
9251 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
9252
9253         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
9254         last change as it seems to cause strange crashes.
9255         
9256 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9257
9258         * *.c: handle unsafe function pointers where needed.
9259
9260 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
9261
9262         * mini.c (mono_jit_free_method): Remove the fixme too.
9263
9264 2005-03-15  Miguel de Icaza  <miguel@novell.com>
9265
9266         * mini.c: As discussed, make the code actually free the delegate
9267         thunk now, to enable the debugging of delegate problems, use
9268         MONO_DEBUG=1 when running Mono. 
9269
9270         This takes also care of parts of the leaks as seen by Joe.
9271
9272 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
9273
9274         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
9275         thread_tls_offset calculation.
9276
9277 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
9278
9279         * declsec.c: Reworked linkdemand checks for icall. The previous code
9280         was using the declaration code (untrusted) and didn't work as expected
9281         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
9282         specific case.
9283
9284 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
9285
9286         * iltests.il: Add new localloc test.
9287
9288         * mini-amd64.c: Handle large stack allocations the same way as on
9289         windows if stack overflow handling is working.
9290         
9291         * mini-amd64.c: Allocate the signal stack using mmap.
9292
9293         * mini.c (sigsegv_signal_handler): Fix reading of context.
9294
9295         * mini-exceptions.c: Fix up stack overflow handling.
9296
9297         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
9298
9299         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
9300
9301         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
9302
9303         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
9304
9305         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
9306         tramp_init functions as they are no longer needed.
9307
9308 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
9309
9310         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
9311         
9312         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
9313
9314         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
9315         
9316         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
9317         support that now.
9318
9319         * mini-ops.h: Add OP_LMUL_IMM.
9320
9321         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
9322         long mul/div opcodes as intrinsic.
9323
9324         * mini-amd64.c (emit_call): Handle the case when the callee might be
9325         an AOT method.
9326
9327 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
9328
9329         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
9330         extra safe.
9331         
9332         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
9333
9334         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
9335
9336 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
9337
9338         * mini.c (mono_codegen): Don't leak here, to help people running
9339         monogrind.
9340
9341 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
9342
9343         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
9344         conversions in sse2 mode.
9345
9346         * basic-float.cs: Add regression test.
9347         
9348         * mini-amd64.c: Reenable sse2.
9349
9350 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
9351
9352         * mini-amd64.c: Disable sse2 until some regressions are fixed.
9353
9354 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
9355
9356         * driver.c: Copyright text should include 2005.
9357         
9358 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
9359
9360         * cpu-amd64.md (load_membase): Fix more max lengths.
9361
9362 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
9363
9364         * cpu-amd64.md (load_membase): Fix max length.
9365
9366         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
9367
9368         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
9369
9370         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
9371         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
9372
9373         * basic-float.cs: Add rounding regression test.
9374
9375         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
9376
9377 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
9378
9379         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
9380         structures in registers for pinvoke wrappers.
9381
9382 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
9383
9384         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
9385
9386 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
9387
9388         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
9389         wrapper to mono_jit_thread_attach.
9390
9391         * mini.c (mini_jit_thread_attach): New jit icall.
9392
9393         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
9394         native->managed wrappers.
9395
9396         * exceptions.cs: Add new regression test.
9397
9398         * mini.c (optimize_branches): Check regions in the cbranch to throw
9399         block case as well. Fixes #73242.
9400
9401 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
9402
9403         * mini.c: thread safety fixes.
9404
9405 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
9406
9407         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
9408         patching stuff, since delegates use jump trampolines so there is
9409         no caller.
9410
9411         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
9412         jump trampolines.
9413         
9414         * tramp-amd64.c: Fix build.
9415
9416         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
9417         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
9418
9419         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
9420         Rename this to mono_arch....
9421         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
9422
9423         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
9424
9425         * mini-amd64.c (emit_call): If both the caller and the callee is
9426         guaranteed to have 32 bit addresses, emit a normal call.
9427
9428         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
9429
9430         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
9431         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
9432         method_ptr inside delegates.
9433
9434 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
9435
9436         * mini.c (mono_jit_free_method): Free the method info even if the native code is
9437         invalidated. Fixes #73001.
9438
9439         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
9440
9441         * mini-x86.c: Only use stdcall for pinvokes on windows.
9442
9443 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
9444
9445         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
9446         * mini-x86.c: remove unreliable __thread var offset detection,
9447         use the correct accessors and enable by default.
9448
9449 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
9450
9451         * mini.c (mono_jit_free_method): Fix memory leak.
9452
9453 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
9454
9455         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
9456
9457 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
9458
9459         * cpu-amd64.md: Fix lengths of atomic opcodes.
9460
9461 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
9462
9463         * driver.c: try to not imply using ICU is any good.
9464
9465 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
9466
9467         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
9468         functions as inline ops.
9469
9470         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
9471         some Interlocked functions as inline ops.
9472
9473         * mini.c (move_basic_block_to_end): Fix bug in last patch.
9474
9475         * mini.h (MonoBasicBlock): Reorganize fields a bit.
9476
9477         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
9478
9479         * mini.c: Add support for OP_NOT_TAKEN.
9480
9481         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
9482         structures in registers for pinvoke wrappers.
9483
9484         * mini-amd64.c: Fix warnings.
9485
9486 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
9487
9488         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
9489
9490         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
9491
9492         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
9493         address instead of loading the address from it.
9494
9495         * mini-x86.c: Add support for returning small structs in registers
9496         on Win32. Fixes part of #70864.
9497         
9498 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
9499
9500         * trace.c (get_token): Improve error checking.
9501
9502 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
9503
9504         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
9505
9506 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
9507  
9508         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
9509         it can be reused for MonoClass.
9510         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
9511         _LINKDEMAND.
9512
9513 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
9514
9515         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
9516         instead of a MonoReflectionMethod. The method information wasn't used
9517         when displaying SecurityException details (but will be now).
9518
9519 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
9520
9521         * Makefile.am : windows build fix.
9522
9523 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
9524
9525         * iltests.il: Add new regression test.
9526
9527         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
9528         #72522.
9529
9530 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
9531  
9532         * mini.c: Moved linkdemand check into helper function check_linkdemand
9533         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
9534         LDFTN, LDVIRTFTN).
9535
9536 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
9537
9538         * declsec.c: Added statistics counter for different kinds of 
9539         LinkDemands.
9540         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
9541         (and commented) declaration.
9542         * mini.c: Added statistics counter for security Demand code 
9543         generation. Added display of security statistics.
9544
9545 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
9546
9547         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
9548         Fix compilation errors under gcc-2.95.
9549
9550 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
9551
9552         * mini.c, driver.c: Use the new jit trampoline hashtable
9553
9554 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9555
9556         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
9557
9558 2005-02-11  Martin Baulig  <martin@ximian.com>
9559
9560         * debug-mini.c (mono_debug_close_method): Free the line number array.
9561
9562 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
9563
9564         * aot.c: Break up large methods into smaller ones. Share GOT slots for
9565         icalls.
9566
9567         * mini.h: Bump AOT file format version. 
9568
9569 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
9570
9571         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
9572         APTC and P/Invoke.
9573         * declsec.h: Added macros to get/set lazyly initialized security 
9574         informations about assemblies. Added new enum for different type of
9575         possible LinkDemand violation. Added function to check LinkDemands.
9576         * mini.h: Added a field to MonoCompile to hold any security violation
9577         detected when JITting a method (so it can be thrown later).
9578         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
9579         and CEE_CALLVIRT. Added code to throw exception at the end of
9580         mini_method_compile (note: the exception is unhandled right now).
9581
9582 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
9583
9584         * mini.c, jit-icalls.c: use the managed implementation of
9585         memset for initobj and memset, to avoid managed <-> unmanaged
9586         transitions.
9587
9588 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
9589
9590         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
9591         optimization if it would need a GOT var.
9592
9593         * basic.cs: Add tests for constant propagation and switch statements.
9594
9595         * ssa.c: Fix out-of-range constant propagation and switch statements.
9596
9597 2005-02-09    <vargaz@freemail.hu>
9598
9599         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
9600
9601 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
9602
9603         * cpu-amd64.md (load_membase): Fix max length of load_membase.
9604
9605 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9606
9607         * mini.c: update to new signature of mono_class_get_allocation_ftn().
9608
9609 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
9610
9611         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
9612         arithmetic operations.
9613
9614 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
9615
9616         * mini-ppc.c: add a workaround for broken user code that
9617         DllImports vararg functions with non-vararg signatures.
9618
9619 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
9620
9621         * mini.c (mono_jit_compile_method_inner): Add detection and a 
9622         meaningfull error message for assemblies written in Managed C++.
9623
9624         * tramp-amd64.c mini-amd64.h: Add support for 
9625         create_trampoline_from_token ().
9626
9627         * aot.c mini-x86.c abcremoval.c: Applied patch from
9628         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
9629
9630 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
9631
9632         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
9633         which takes a MonoImage/token as parameter instead of a MonoMethod.
9634
9635         * aot.c: Use the new trampoline for initializing vtables.
9636
9637         * aot.c: Add support for ldfld/stfld_remote wrappers.
9638
9639         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
9640         rules for compare <MEM>, IMM.
9641
9642         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
9643
9644         * aot.c: Handle inherited finalizers correctly.
9645
9646 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
9647
9648         * inssel.brg (stmt): Add a missing _setup_... ().
9649
9650         * aot.c: Save some parts of the class state to the AOT file and use it
9651         to recompute that state when a class is initialized.
9652
9653         * mini.c: Install AOT hooks into the runtime.
9654
9655         * mini.h: Bump AOT file format version.
9656         
9657         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
9658         Fixes #72148.
9659
9660         * iltests.il: Add new test.
9661
9662 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
9663
9664         * mini.c: fix typo.
9665
9666 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
9667
9668         * mini.c: setup the statistical profiler in the thread attach
9669         callback to cope with the new single thread code.
9670
9671 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
9672
9673         * mini-ppc.c: ensure we have enough room for the profiler
9674         calls (fixed bug#72084).
9675
9676 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
9677
9678         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
9679         it.
9680
9681 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9682
9683         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
9684
9685 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9686
9687         * ssapre.c: Fixed an issue with down safety (this allows IronPython
9688         to succesfully execute parrotbench).
9689         * ssapre.h: Likewise.
9690
9691 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9692
9693         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
9694         variable for stores to method arguments (fixes a SSAPRE issue).
9695
9696 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
9697
9698         * mini.c: handle value types in dup, fixes gen-112.cs.
9699
9700 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
9701
9702         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
9703         sequence for calls in dynamic methods to avoid thunks.
9704
9705 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
9706
9707         * mini.c: correctly remove dynamic methods from the hashtable.
9708
9709 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9710
9711         * driver.c: Disabled SSAPRE until fix the bug that appears
9712         in IronPython's parrotbench.
9713
9714 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
9715
9716         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
9717
9718         * mini.c (mono_method_to_ir): Revert the previous change.
9719         
9720         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
9721         when AOT compiling.
9722
9723         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
9724         mono_jit_info_table_find () etc. when running under valgrind.
9725
9726         * inssel.brg: Fix warnings.
9727
9728         * mini-exceptions.c: Fix warnings.
9729
9730 2005-01-31  Martin Baulig  <martin@ximian.com>
9731
9732         * driver.c (compile_all_methods_thread_main): Don't try to compile
9733         generic methods or anything which has type parameters.
9734
9735 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
9736
9737         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
9738
9739         * TestDriver.cs: Add --verbose flags.
9740
9741         * graph.c ssa.c: Fix 64 bit warnings.
9742         
9743         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
9744         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
9745         Fix 64 bit warnings.
9746
9747         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
9748         variable not spotted by gcc.
9749         
9750         * mini-amd64.c inssel-amd64.brg: Applied patch from  
9751         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
9752         X86_COMPARE_MEMBASE opcodes.
9753
9754         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
9755
9756 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
9757
9758         * *: MonoMethod->signature might be NULL now. You *MUST* use
9759         mono_method_signature.
9760
9761 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
9762
9763         * driver.c (compile_all_methods_thread_main): Compile the methods
9764         without invoking cctors.
9765
9766 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
9767
9768         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
9769         * basic-calls.cs: test for the above.
9770
9771 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
9772
9773         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
9774         MonoJitInfo changes.
9775
9776 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
9777
9778         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
9779         eagerly if it contains dynamic methods.
9780         
9781         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
9782
9783         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
9784         trace, it is now computed by an icall from trace_ips.
9785         
9786         * mini-exceptions.c: Fix a warning.
9787
9788 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
9789
9790         * mini-exceptions.c: don't bother getting stack trace info if
9791         it's not going to be used.
9792
9793 2005-01-27  Raja R Harinath  <rharinath@novell.com>
9794
9795         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
9796         ssapre-mini-ops.h.
9797
9798 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
9799
9800         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
9801
9802         * aot.c: Avoid calling mono_method_get_header () if not needed.
9803
9804         * mini.h: Bump AOT file format version.
9805         
9806         * mini.c (mono_emit_native_call): Allocate a GOT var here.
9807
9808         * mini.c (mono_print_tree): Print more info for calls.
9809
9810 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
9811
9812         * declsec.h: Remove warning by adding missing include for marshal.h
9813
9814 2005-01-26  Martin Baulig  <martin@ximian.com>
9815
9816         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
9817         `ip' twice.
9818
9819 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
9820
9821         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
9822         flags.
9823
9824         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
9825
9826         * aot.c (mono_compile_assembly): Fix a warning.
9827
9828 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
9829
9830         * declsec.c: Look for security attributes on the original MonoMethod 
9831         (and not the wrapped one). This fix permissions on icalls.
9832
9833 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
9834
9835         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
9836
9837         * mini.c (mono_allocate_stack_slots): Add a fixme.
9838
9839         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
9840
9841 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
9842
9843         * inssel.brg: optimize casts of sealed types (more
9844         optimizations waiting for fixes in remoting).
9845
9846 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
9847
9848         * inssel.brg (stmt): Add another dummy rule.
9849
9850         * driver.c: Fix warnings.
9851
9852         * driver.c (mono_main): If running under valgrind, instruct glib to use
9853         the system allocation functions so valgrind can track the memory
9854         allocated by the g_... functions.
9855
9856         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
9857
9858         * mini-ops.h: Add OP_DUMMY_STORE opcode.
9859
9860         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
9861
9862         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
9863         variables in try regions.
9864
9865         * mini.c (mini_method_compile): Don't disable optimizations on large
9866         methods when AOT compiling.
9867
9868         * mini.c (mono_allocate_stack_slots): New arch independent method to 
9869         allocate stack slots. Not yet used.
9870
9871 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
9872
9873         * debug-mini.c (mono_debug_close_method): Plug some leaks.
9874
9875 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
9876
9877         * mini-ppc.c: make the branch info relative as the code
9878         buffer can be reallocated.
9879
9880 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
9881
9882         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
9883         * driver.c: Removed the AOT/security restriction. Now initialize the
9884         security manager (in metadata) if --security is used.
9885         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
9886         rather than the pointer to declarative security, when AOT is used.
9887
9888 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
9889
9890         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
9891         basic blocks, reduced intrinsic exception throwing code size.
9892
9893 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
9894
9895         * driver.c (mini_usage): Reorder the usage screen.
9896
9897 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
9898
9899         * mini.c (mono_resolve_patch_target): Fix warning.
9900
9901 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
9902
9903         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
9904         previous patch.
9905
9906         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
9907
9908         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
9909         breaks the amd64 build.
9910
9911         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
9912         register allocation. Fixes #71454.
9913
9914         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
9915
9916         * arrays.cs: Add new regression test.   
9917
9918 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9919
9920         * ssapre.c: Turned usage of snprintf to GString.
9921         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
9922         (I left it on by mistake in my previous commit).
9923
9924 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
9925
9926         * mini.c, cfold.c, basic-calls.cs: preserve side effects
9927         on cond branch optimization (fixes bug# 71515).
9928
9929 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9930
9931         * abcremoval.c: Fixed bug 71062.
9932         * abcremoval.h: Likewise.
9933
9934 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9935
9936         * mini.c: Added a new functionality to optimize_branches, the removal
9937         of useless basic blocks, and fixed some problem in the removal of
9938         critical edges; some utility functions added for both purposes.
9939         * ssapre.c: Added complex expression support, and fixed bug 70637.
9940         * ssapre.h: Likewise.
9941         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
9942         enabled in SSAPRE.
9943         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
9944         * driver.c: Re-enabled SSAPRE.
9945
9946 2005-01-19  Martin Baulig  <martin@ximian.com>
9947
9948         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
9949         the result of mono_get_method_constrained().
9950
9951 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
9952
9953         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
9954         manager.
9955
9956 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
9957
9958         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
9959         be detected.  Fixes #59296.
9960
9961 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
9962
9963         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
9964         which can happen. Fixes #71361.
9965
9966 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
9967
9968         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
9969         manager.
9970
9971 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
9972
9973         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
9974         appdomain-unload.exe to fail.
9975         
9976         * mini.c: Fix some memory leaks.
9977
9978 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
9979
9980         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
9981         Fixed bug and sped up some codepaths.
9982
9983 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
9984
9985         * mini.c: Fix some memory leaks.
9986
9987         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
9988         conversion.
9989
9990         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
9991
9992         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
9993         #71320.
9994
9995         * iltests.il: Add regression test for #71320.
9996
9997 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
9998
9999         * mini.c (mono_codegen): Fix installation of profiler hooks.
10000
10001         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
10002
10003 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10004
10005         * mini.h, mini.c, cfold.c: optimize access to enum
10006         readonly fields, too. Eval conditional branches if possible
10007         to perform unreachable code removal in more cases.
10008
10009 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
10010
10011         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
10012
10013         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
10014         code manager.
10015
10016         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
10017         WinXP DEP. Fixes #71244.
10018
10019 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
10020
10021         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
10022
10023 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
10024
10025         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
10026
10027 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
10028
10029         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
10030         changes.
10031
10032         * mini.h: Bump AOT version.
10033
10034         * mini.h (MonoCompile): Change exvar to a hash table.
10035
10036         * mini.c: Allocate a separate exvar for each handler block.
10037
10038         * mini.c: Get rid of the computation of filter_lengths, its not needed.
10039
10040         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
10041         ex var with the pending exception and only throw if the two are equal.
10042         Fixes #68552.
10043         
10044         * exceptions.cs: Add tests for rethrow and nested catch clauses.
10045
10046         * mini-x86.c: Fix warnings.
10047
10048         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
10049         used by all the ports now.
10050
10051         * aot.c: Add write-symbols and save-temps options.
10052
10053 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
10054
10055         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
10056
10057 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
10058
10059         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
10060         operations.
10061
10062         * tramp-s390.c: Check vtable slot belongs to the domain.
10063
10064         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
10065         as per other platforms.
10066
10067         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
10068
10069 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
10070
10071         * driver.c: we don't run the Main() code in a subthread anymore.
10072
10073 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
10074
10075         * mini.c: added experimental rtc support in the statistical
10076         profiler: if the user has the permission, more accurate statistics
10077         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
10078         The MONO_RTC value must be restricted to what the linux rtc allows:
10079         power of two from 64 to 8192 Hz.
10080
10081 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
10082
10083         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
10084
10085 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
10086
10087         * mini-ppc.c: better icache flush for smp.
10088
10089 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
10090
10091         * mini-amd64.c (emit_move_return_value): Fix memory leak.
10092
10093         * mini-x86.c (get_call_info): Add the get_call_info () code from the
10094         amd64 port, not yet used.
10095
10096 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
10097
10098         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
10099         a struct type.
10100
10101 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
10102
10103         * driver.c: Added --security option to activate the security manager.
10104         Right now this will allow code generation for declarative demands and
10105         is disabled when AOT is specified.
10106         * mini.c: Add code generation for declarative security demands.
10107         * mini.h: Add mono_use_security_manager as an extern gboolean.
10108
10109 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
10110
10111         * aot.c (mono_compile_assembly): Speed up compilation a bit by
10112         emitting more dense assembly code.
10113
10114         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
10115         exception throwing stuff.
10116
10117 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
10118
10119         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
10120         dead code.
10121
10122         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
10123         left in by mistake.
10124
10125         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
10126         fixed.
10127
10128         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
10129
10130         * tramp-*.c: Only patch vtable slots if the object is in the current
10131         domain. Fixes appdomain-unload.exe.
10132
10133         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
10134         
10135         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
10136         x86 branch.
10137
10138 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10139
10140         * mini.c (reverse_branch_op): New helper function.
10141
10142         * mini.c (optimize_branches): Run the new optimization only on 
10143         platforms which support it. Also reverse all kinds of branches.
10144
10145         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
10146
10147         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
10148         a throw statement.
10149
10150         * mini.c (optimize_branches): Reverse not-equals branches if the false
10151         bblock is a throw. This happens a lot of time with argument checking in
10152         corlib.
10153
10154         * mini.c (mono_codegen): Add support for placing basic blocks after
10155         the function epilogue.
10156
10157         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
10158         function epilogue.
10159         
10160 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
10161
10162         * mini.c (setup_stat_profiler): Only set this up if the platform
10163         supports ITIMER_PROF.
10164
10165 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10166
10167         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
10168         previous patch.
10169
10170         * inssel.brg: Fix a warning.
10171
10172 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
10173
10174         * mini.c: added support for statistical profiler 
10175         (run with: --profile=default:stat).
10176
10177 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
10178
10179         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
10180
10181         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
10182
10183         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
10184         related to global registers from the amd64 port.
10185
10186 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
10187
10188         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
10189
10190         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
10191         with global registers.
10192         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
10193
10194         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
10195
10196 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
10197
10198         * debug-mini.c (encode_value): Fix off-by-one.
10199
10200         * aot.c (encode_value): Likewise.
10201
10202         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
10203
10204 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
10205
10206         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
10207         AOT.
10208
10209         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
10210         
10211         * aot.c (emit_method_info): Increase size of temp buffer.
10212
10213         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
10214         the AOT case.
10215
10216 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
10217
10218         * aot.c (emit_method_info): Fix build.
10219         
10220         * aot.c: Further rework of the AOT file format to reduce the size of
10221         the method info data.
10222
10223         * mini.h: Bump AOT file format version.
10224
10225 2004-12-27  Martin Baulig  <martin@ximian.com>
10226
10227         * mini.c (mini_get_method): New static method; call
10228         mono_get_method_full() and mono_get_inflated_method().
10229         (mono_method_to_ir): Use mini_get_method() instead of
10230         mono_get_method_full(). 
10231
10232 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
10233
10234         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
10235
10236 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
10237
10238         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
10239
10240         * inssel-amd64.brg: Add some optimization rules.
10241
10242 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
10243
10244         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
10245         standard not GC'd stuff is fine.
10246
10247 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
10248
10249         * aot.c: Rework the AOT file format to get rid of most of the global
10250         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
10251
10252         * mini.h: Bump AOT file format version.
10253         
10254 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
10255
10256         * mini.h: Bump AOT file format version.
10257
10258         * aot.c (mono_aot_is_got_entry): New function to determine if an 
10259         address is inside a GOT.
10260
10261         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
10262
10263         * cpu-pentium.md: Increase the maximum size of some instructions which
10264         might involve a got access.
10265         
10266         * mini.c (get_method_from_ip): Another debug helper function.
10267
10268         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
10269         when got var accesses are created during the decompose phase.
10270
10271         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
10272
10273         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
10274         argument mini_compile_method and to MonoCompile, and use this to
10275         determine whenever a given method is compiled for AOT. This allows the
10276         other methods compiled during AOT compilation to be free of AOT stuff,
10277         so the backends does not need to add special support for them by
10278         creating a fake GOT etc.
10279
10280         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
10281         longer needed.
10282
10283 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
10284
10285         * mini.c (mono_method_to_ir): It turns out that some of the
10286         x-appdomain wrappers are lax with types, so just ignore this for
10287         all wrappers.
10288
10289         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
10290         at the vtable->klass. If it is non-shared code we can just use the
10291         vtable.
10292
10293 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
10294
10295         * mini-ppc.c: access MonoDomain from tls, too.
10296
10297 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
10298
10299         * declsec.c: Removed unused variable (and related warning ;-)
10300
10301 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
10302
10303         * iltests.il: New test for LDELEMA on an array of ref types.
10304
10305         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
10306         all ldelema's on reftypes.
10307         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
10308         it was the wrong place to put it.
10309
10310         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
10311         register to pop to make this cleaner, at the request of Paolo.
10312
10313 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
10314
10315         * mini-ops.h (OP_GETHASHCODE): New op.
10316
10317         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
10318
10319         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
10320         operation.
10321
10322         For a microbenchmark, this reduces the cost of Hashtable.get_Item
10323         by 25%.
10324         
10325         * mini-x86.c (mono_arch_output_basic_block): Rather than
10326
10327         add ebp, 4
10328
10329         Emit
10330
10331         pop edx
10332
10333         The first is 3 bytes while the second is 1. This saves 36 kb on
10334         mscorlib, quite a big saving. When bootstraping mcs, I was able to
10335         see a small boost because of icache locality.
10336
10337         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
10338
10339 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
10340
10341         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
10342         started code sharing with the generic code.
10343
10344 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
10345
10346         * mini-ppc.c, cpu-g4.md: added code for direct access to
10347         tls data slots.
10348
10349 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
10350
10351         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
10352          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
10353         to OP_TLS_GET.
10354
10355 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
10356
10357         * declsec.c|h: Added functions to cache the declarative stack modifiers
10358         in MonoJitInfo and to create a security frame from a MonoJitInfo 
10359         structure.
10360         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
10361         created. Register internal calls for System.Security.SecurityFrame::
10362         _GetSecurityFrame and _GetSecurityStack.
10363         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
10364         the definitions for the new stack walk/callback mechanism.
10365         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
10366         first security frame for LinkDemands and InheritanceDemands) and
10367         GetSecurityStack for Demands. Both use the new mono_walk_stack code
10368         from lupus.
10369         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
10370         walk initialization (lupus).
10371
10372 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
10373
10374         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
10375         idiom.
10376         (handle_loaded_temps): Do not create a temporary variable for
10377         things that we know are temps. They will never be modified.
10378         (mono_spill_call): Set MONO_INST_IS_TEMP
10379         (mono_emulate_opcode): ditto
10380         (emit_tree): ditto
10381         (mono_method_to_ir.CEE_DUP): ditto
10382
10383 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
10384
10385         * mini.c (type_to_eval_stack_type): Make this handle the void type
10386         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
10387         (emit_tree): use ip_in_bb to special case some common idioms
10388         Update all callers to pass in the IP.
10389         (mono_method_to_ir): Make CEE_CALL* do the above as well.
10390
10391         This gives us a nice 2% speedup in mcs bootstrap.
10392
10393         * mini-x86.c (peephole_pass): Peephole pass to make
10394         mov  [foo], eax
10395         push [foo]
10396
10397         into
10398
10399         mov [foo], eax
10400         push eax
10401
10402         * mini.c (ip_in_bb): new method.
10403         (mono_method_to_ir): use this method rather than doing the hash
10404         lookup ourselves.
10405
10406         * linear-scan.c (mono_linear_scan): When expiring actives, you
10407         don't need to keep around variables that expire on this
10408         instruction. This makes it so that:
10409              a = b + 1
10410         will turn into:
10411              store (ebx add (ebx, 1))
10412         which will become
10413              add ebx, 1
10414
10415 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
10416
10417         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
10418         combination to avoid doing two copies. Fix up problems with previous
10419         patch.
10420
10421         * mini.c: Fix 64 bit warnings.
10422
10423         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
10424
10425 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
10426
10427         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
10428         changes from the x86 code.
10429
10430         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
10431
10432 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
10433
10434         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
10435         throwing code to reduce its size, unify the AOT and non-aot code and 
10436         get rid of relocations in the AOT case.
10437
10438         * mini-x86.h mini.c exceptions-x86.c 
10439         (mono_arch_get_throw_corlib_exception): New arch specific function to 
10440         raise corlib exceptions which doesn't require relocations in the 
10441         caller.
10442
10443         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
10444
10445 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
10446
10447         * mini.c (mono_emit_method_call): Only allocate the got var when it is
10448         needed.
10449
10450         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
10451         in the AOT case.
10452
10453 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10454
10455         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
10456         with add function when used from Inc/dec atomic 
10457         functions. Re-enabled optimization on x86.
10458         * mini-ops.h: renamed atomic_add functions to
10459         allow _add to match the Interlocked::Add and
10460         _add_next to match Interlocked::Inc/Dec.
10461
10462 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
10463
10464         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
10465         linking of BBs to the end BB, and enabled SSAPRE also with
10466         consprop and copyprop (which was prevented by that bug).
10467
10468 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10469
10470         * mini-x86.c: disabling the Interlocked optimizing code. 
10471
10472 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
10473
10474         * aot.c (load_aot_module): Move reading of got_addr after the AOT
10475         file version check.
10476         
10477 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10478
10479         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
10480         interlocked optimization due lack of support on x86, rewrote 
10481         exchange to take into account that base may be in eax.
10482         
10483         xsp works again; activated Interlocked optimizing code.
10484         
10485 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
10486
10487         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
10488
10489 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
10490
10491         * mini-ops.h: Add new opcodes.
10492
10493         * mini.h: Add new patch types. Add got_var to MonoCompile.
10494
10495         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
10496         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
10497         make it work with all kinds of patchable code.
10498
10499         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
10500         address of the GOT, and referencing entries in the GOT.
10501
10502         * mini.c: Add code to load the GOT address if needed by an opcode.
10503
10504         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
10505         independent AOT code on the x86 using an elf-style Global Offset Table.
10506
10507 2004-12-14  Raja R Harinath  <rharinath@novell.com>
10508
10509         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
10510
10511 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10512
10513         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
10514         when running xsp.
10515
10516 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
10517
10518         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
10519         of Interlocked:Increment/Decrement/Add as inline ops.
10520         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
10521
10522 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
10523
10524         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
10525         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
10526
10527 2004-12-12  Duncan Mak  <duncan@ximian.com>
10528
10529         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
10530         again. `patch_info->table_size' is no longer valid after Zoltan's
10531         commit #37636.
10532
10533 2004-12-12  Martin Baulig  <martin@ximian.com>
10534
10535         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
10536         if we are the "real" method, ie. not an inlined method inside it.
10537
10538 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
10539
10540         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
10541         before we look in the special fields table. This fixes
10542         ../tests/thread-static-init.cs.
10543
10544 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10545
10546         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
10547         for Array get_Rank and get_Length. Fixes bug #70465.
10548
10549 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
10550
10551         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
10552         separate structure to reduce the size of MonoJumpInfo.
10553
10554 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
10555
10556         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
10557
10558 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
10559
10560         * mini.c (mini_get_inst_for_method): Changed to allow ports
10561         to return a MonoInst instead of opcode 
10562         (renamed mini_get_opcode_for_method to better reflect the new functionality)
10563         
10564         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
10565         Allow ports to return a created MonoInst instead of op-code, will enable
10566         new optimizations.
10567         (renamed mini_get_opcode_for_method to better reflected the functionality)
10568
10569 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
10570
10571         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
10572
10573 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
10574
10575         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
10576         Fixes #69985.
10577
10578 2004-12-08  Martin Baulig  <martin@ximian.com>
10579
10580         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
10581         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
10582
10583 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
10584
10585         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
10586         correctly.
10587
10588         * exceptions.cs: Disable some tests which depend on properties of x86 fp
10589         arithmetic.
10590
10591 2004-12-08  Raja R Harinath  <rharinath@novell.com>
10592
10593         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
10594
10595 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
10596
10597         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
10598         bug introduced by the previous patch.
10599
10600 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
10601
10602         * mini-ppc.c, objectc.cs: handle large structs passed by value
10603         (fixes bug #69972).
10604
10605 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
10606
10607         * mini-ppc.c: OP_ARGLIST implementation from
10608         Geoff Norton  <gnorton@customerdna.com>.
10609
10610 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
10611
10612         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
10613         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
10614
10615 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
10616
10617         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
10618
10619 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10620
10621         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
10622         support.
10623
10624 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
10625
10626         * mini-sparc.c: Zero out localled-ed memory.
10627
10628         * iltests.il: Add tests for zeroing out localloc-ed memory.
10629
10630 2004-12-04  Martin Baulig  <martin@ximian.com>
10631
10632         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
10633         mono_method_get_signature_full().       
10634
10635 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
10636
10637         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
10638         and some utility functions (always for SSAPRE), integrated SSAPRE.
10639         * mini.h: Likewise.
10640         * driver.c: Added ssapre option.
10641         * ssa.c: Small fix on OP_ARG handling.
10642         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
10643         * Makefile.am: Likewise.
10644
10645 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
10646
10647         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
10648         now in the xp code.
10649
10650         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
10651         icall.
10652
10653 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10654
10655         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
10656         
10657         * cpu-s390.md : Increase instruction length of oparglist.
10658
10659         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
10660
10661 2004-11-30  Martin Baulig  <martin@ximian.com>
10662
10663         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
10664         virtual generic methods.  We call a special helper_compile_generic_method()
10665         icall to retrieve the method from the vtable, inflate and compile
10666         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
10667
10668         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
10669
10670 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
10671
10672         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
10673
10674 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
10675
10676         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
10677         Fixes #69929.
10678
10679 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
10680
10681         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
10682         platforms with PIC aot.
10683
10684 2004-11-28  Martin Baulig  <martin@ximian.com>
10685
10686         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
10687         Fixes gen-112.cs.
10688
10689 2004-11-28  Martin Baulig  <martin@ximian.com>
10690
10691         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
10692         the result of mono_type_get_underlying_type() to check whether
10693         we're byref.
10694
10695 2004-11-26  Martin Baulig  <martin@ximian.com>
10696
10697         * mini.c
10698         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
10699         in the g_assert().
10700
10701 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
10702
10703         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
10704         the same way as the other arguments so they won't get clobbered.
10705
10706         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
10707         calls through R11 since it is clobbered by the trampoline code.
10708
10709 2004-11-26  Raja R Harinath  <rharinath@novell.com>
10710
10711         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
10712         pick up in-tree mscorlib.dll.
10713
10714 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
10715
10716         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
10717
10718         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
10719         runtime data/code are now stored in a table similar to the GOT in ELF. 
10720         This allows the code itself to be position independent.
10721
10722         * aot.c: Fix loading of referenced assemblies after the lazy assembly
10723         loading changes.
10724
10725         * aot.c: Attach ELF type (object/function) directives to all global
10726         symbols.
10727
10728         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
10729
10730         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
10731
10732         * mini-amd64.h: Turn on PIC AOT code.
10733
10734         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
10735         returning the offset within an OP_AOTCONST instruction where the GOT
10736         offset needs to be added.
10737
10738         * mini.h: Bump AOT file format version.
10739
10740 2004-11-25  Martin Baulig  <martin@ximian.com>
10741
10742         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
10743         uninflated generic methods.
10744
10745 2004-11-25  Martin Baulig  <martin@ximian.com>
10746
10747         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
10748
10749 2004-11-24  Martin Baulig  <martin@ximian.com>
10750
10751         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
10752         original klass (this only applies for generic instances).
10753
10754 2004-11-24  Martin Baulig  <martin@ximian.com>
10755
10756         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
10757         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
10758         that array).
10759
10760 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
10761
10762         * mini.c (mono_method_to_ir): Disable inlining for methods containing
10763         localloc. Fixes #69678.
10764
10765         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
10766         
10767 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
10768
10769         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
10770         used SSE registers on pinvoke calls. Fixes #69774.
10771
10772 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
10773
10774         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
10775         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
10776
10777 2004-11-23  Raja R Harinath  <rharinath@novell.com>
10778
10779         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
10780         Refer directly to the mcs/ tree.
10781
10782 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10783
10784         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
10785         Check if a trampoline for a synchronized method is required. 
10786
10787 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
10788
10789         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
10790         with localloc if needed. Throe arithmetric exception in
10791         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
10792         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
10793
10794 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
10795
10796         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
10797         types before switching on type.  Fixes #69622.
10798
10799 2004-11-19  Raja R Harinath  <rharinath@novell.com>
10800
10801         * Makefile.am (check-local): New.  Integrate into 'make check'.
10802         (MCS,RUNTIME): Define using in-tree mono and mcs.
10803         (ILASM): New.
10804         (%.exe): Use $(ILASM).
10805
10806 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
10807
10808         * mini-ppc.c: adjust initial prolog size (bug #69691).
10809
10810 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
10811
10812         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
10813         #69664.
10814
10815 2004-11-17  Raja R Harinath  <rharinath@novell.com>
10816
10817         * Makefile.am (clean-local): Rename from 'clean'.
10818
10819 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10820
10821         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
10822         to mono_arch_is_int_overflow. 
10823         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
10824         SIGFPE events.
10825
10826 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
10827
10828         * declsec.c|h: New files to support declarative security attributes.
10829         Added function to check if a method has (applicable) security.
10830         * mini.c|h: Add check for declarative security attributes in
10831         mono_method_check_inlining.
10832         * Makefile.am: Added declsec.c and declsec.h to the build.
10833
10834 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
10835
10836         * mini.c, mini.h: update to keep dynamic code info per-domain.
10837
10838 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
10839
10840         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
10841         (mini_init): Get rid of it from here too.
10842
10843 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
10844
10845         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
10846         implemented OP_RETHROW (patch by Geoff Norton
10847         <gnorton@customerdna.com>).
10848
10849 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
10850
10851         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
10852         between appdomains.  Fixes appdomain-unload on PPC.
10853
10854 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
10855
10856         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10857         mini-exceptions.c: handle the new wrapper types.
10858         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
10859         token value as a MonoClass* when compiling a wrapper.
10860         mono_jit_create_remoting_trampoline now takes an additional
10861         MonoRemotingTarget parameter.
10862         
10863 2004-11-10  Martin Baulig  <martin@localhost>
10864
10865         * mini.c (mono_method_to_ir): Use `generic_container->context'
10866         rather than creating a new one.
10867
10868 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10869
10870         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
10871
10872         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
10873
10874 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
10875
10876         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
10877         the experimental aot cache stuff.
10878
10879 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
10880
10881         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10882         mini-exceptions.c: update to exception clause structure changes.
10883
10884 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
10885
10886         * exceptions-x86.c (throw_exception): Fix warnings.
10887
10888         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
10889         for OP_RETHROW.
10890
10891 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
10892
10893         * exceptions-sparc.c (get_throw_exception): Really fix this.
10894
10895 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
10896
10897         * tramp-*.c: we no longer support icalls without wrappers, so
10898         a bit of code can be removed here
10899
10900 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
10901
10902         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
10903         patch.
10904
10905         * cpu-sparc.md: Add op_rethrow.
10906
10907         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
10908
10909         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
10910
10911         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
10912         * mini-ops.h: Add OP_RETHROW.
10913
10914         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
10915
10916         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
10917
10918 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
10919         
10920         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
10921         Makes the output much easier to read
10922
10923 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
10924
10925         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
10926         prevents another huge leak when compiling with ssa. Secondly, the
10927         performance of doing this rather than freeing the lists is much
10928         better. GList does a lock every time you allocate a list link,
10929         so that it can use a memory pool. So, it is better to just use
10930         a memory pool of our own.
10931         
10932         * ssa.c, linear-scan.c: replace g_list_remove_link with
10933         g_list_delete.  The remove one does not free the GList, so we were
10934         leaking memory. On -O=all --compile-all with corlib, this cut down
10935         3 MB of allocations.
10936
10937 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
10938
10939         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
10940
10941         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
10942
10943         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
10944         into a new function mono_create_jit_trampoline ().
10945
10946 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
10947
10948         * trace.c (get_spec): Allow tracing of classes without a namespace.
10949
10950 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
10951
10952         * mini.c: Fix pointer overwrite in mini_method_compile.
10953
10954 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
10955
10956         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
10957         The darwin ABI needs some special handling for 1 and 2 byte structs
10958         Lets use lbz/lhz instead of lwz everywhere.
10959         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
10960         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
10961         Use stb/sth for the former, and put the latter always on stack instead of in
10962         argument registers.
10963
10964 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
10965
10966         * trace.c (is_filenamechar): Add '_'.
10967
10968 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
10969
10970         * mini-s390.c: Fix prolog length to allow for large trace requirements.
10971
10972         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
10973
10974 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
10975
10976         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
10977         depends on libmonogc. Fixes #68805.
10978
10979 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
10980
10981         * mini.c (mono_jit_free_method): Provide extra information for
10982         this error.  Currently this leaks, but will be turned into a
10983         developer option in the future.
10984
10985 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
10986
10987         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
10988
10989 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
10990
10991         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
10992         boundary. Fixes reading of PATCH_INFO_R4 and R8.
10993         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
10994
10995 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
10996
10997         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
10998         trampolines for AOT code.
10999
11000 2004-10-22    <vargaz@freemail.hu>
11001
11002         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
11003         constructed types. Fixes #68136.
11004
11005 2004-10-21  Martin Baulig  <martin@ximian.com>
11006
11007         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
11008         if it returns true, unwind the stack to the call instruction.
11009
11010 2004-10-21    <vargaz@freemail.hu>
11011
11012         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
11013
11014         * mini.h: Bump AOT version number.
11015
11016         * objects.cs: Add another test for unbox trampolines.
11017
11018         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
11019         valuetype methods.
11020
11021 2004-10-20    <vargaz@freemail.hu>
11022
11023         * driver.c: Add SHARED to the set of optimizations tested.
11024
11025         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
11026
11027         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
11028         used by CEE_NEWARR.
11029
11030         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
11031
11032 2004-10-20  Martin Baulig  <martin@ximian.com>
11033
11034         * mini-exceptions.c (mono_handle_exception): Call
11035         mono_debugger_handle_exception() to tell the debugger about
11036         catch/finally clauses.
11037
11038 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
11039
11040         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
11041
11042         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
11043         #68447.
11044
11045 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
11046
11047         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
11048         methods as their native size, fixed bug #57543, #57545.
11049         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
11050         This saves a temporary register and mullw call down into 1 (minor perf
11051         increase for cases like sum = sum * 5;  This use to translate into:
11052             li r11,5
11053             mullw r28,r28,r11
11054         It now translates to
11055             mulli r28,r28,5
11056
11057 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
11058
11059         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
11060         #68388.
11061
11062 2004-10-11  Martin Baulig  <martin@ximian.com>
11063
11064         * mini.c (mono_method_to_ir): If we're a generic method, get the
11065         MonoGenericContainer from our MonoMethodNormal and create a
11066         MonoGenericContext from it.
11067
11068 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
11069
11070         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
11071
11072         * basic-long.cs: Add test for checked i8->i2 cast.
11073
11074 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11075
11076         * inssel-ppc.brg: added a couple of speedup rules.
11077
11078 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
11079
11080         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
11081         to speed up rebuilds.
11082
11083 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11084
11085         * mini-s390.c: Minor fix to OP_OR_IMM.
11086
11087 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
11088
11089         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
11090         better. Fixes appdomain-unload.exe on sparc.
11091
11092 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
11093
11094         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
11095         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
11096         see bug 67324.
11097
11098 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
11099
11100         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
11101
11102 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
11103
11104         * mini.c: Always generate a field read/write wrapper for members
11105         of the class MarshalByRefObject since the actual instance could
11106         be a CBO.
11107
11108 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
11109
11110         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
11111
11112 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
11113
11114         * driver.c mini.h trace.c: Move the setting of the main assembly into
11115         a separate function called mono_trace_set_assembly () and call it after
11116         actually loading the main assembly. Fixes #66872.
11117
11118 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
11119
11120         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
11121         using the code manager.
11122
11123 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
11124
11125         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
11126
11127 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
11128
11129         * cpu-amd64.md: Fix bug in previous patch.
11130         
11131         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
11132         #66650.
11133
11134 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
11135
11136         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11137         mini-exceptions.c: updates for changed stack walk interface.
11138
11139 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11140
11141         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
11142
11143 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
11144
11145         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
11146
11147 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
11148
11149         * driver.c (mini_regression_list): Do not call mono_assembly_close 
11150         since assemblies can't be unloaded.
11151         
11152 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
11153
11154         * cpu-amd64.md: Fix more instruction lengths.
11155
11156         * cpu-amd64.md: Fix lengths of some instructions.
11157
11158 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
11159
11160         * inssel.brg: Make the array ldelema check aot friendly.
11161
11162 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
11163
11164         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
11165
11166         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
11167
11168 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
11169
11170         * mini-x86.c: Fix build.
11171
11172         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
11173         mono_type_get_underlying_type () helper function to simplify code.
11174         
11175 2004-09-09  Martin Baulig  <martin@ximian.com>
11176
11177         * mini-amd64.c: Don't access `type->data.klass' directly, call
11178         mono_class_from_mono_type() instead since the type may be a
11179         generic instance.
11180
11181 2004-09-09  Martin Baulig  <martin@ximian.com>
11182
11183         * mini-amd64.c (get_call_info): Fix support for generic instances.
11184         (add_valuetype): Use mono_class_from_mono_type() to get the class
11185         since we can be a generic instance.
11186
11187 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
11188
11189         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
11190
11191 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
11192
11193         * liveness.c: reset spill costs on each scan: bug 62107
11194
11195 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
11196
11197         * exceptions-sparc.c (mono_arch_find_jit_info): remove
11198         unnecessary line that doesn't compile
11199
11200 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
11201
11202         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
11203         trampolines, make them call an error function so people can fix their
11204         code.
11205
11206 2004-09-06  Martin Baulig  <martin@ximian.com>
11207
11208         * mini.c (mono_method_to_ir): When initializing locals, handle a
11209         generic instances like a valuetype if it's a valuetype and like a
11210         class if it's a class.
11211
11212 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
11213
11214         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
11215         stack. Fixes #64674.
11216
11217         * exceptions.cs: Add test for unwinding of call arguments.
11218
11219 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
11220
11221         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
11222         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
11223         set the carry/borrow flag). The sparc and s390 implementations
11224         can now use optimized versions (and simplify the code). ppc bugfixes.
11225
11226 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
11227
11228         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
11229
11230 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
11231
11232         * inssel-amd64.brg: Remove leftover 32 bit rule.
11233
11234         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
11235
11236 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
11237
11238         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
11239         mono_arch_find_jit_info functions into a new function. Fix a memory
11240         leak.
11241
11242         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
11243         refactored code.
11244         
11245 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
11246
11247         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
11248         as well.
11249         
11250         * exceptions.cs: Add array size tests.
11251
11252         * mini.c: Allocate a separate icall wrapper for each arity of 
11253         mono_array_new_va. Fixes #59509.
11254
11255         * exceptions.cs: Add testcase for 64578.
11256
11257         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
11258
11259         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
11260         
11261 2004-09-02  Martin Baulig  <martin@ximian.com>
11262
11263         * mini.c (mono_method_to_ir): When initializing the locals, call
11264         handle_initobj() on the generic instance itself, not its
11265         underlying type.
11266
11267 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
11268
11269         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
11270         MonoJitInfo for dynamic methods.
11271
11272         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
11273
11274         * mini.c: Add support for freeing JIT data for dynamic methods.
11275         
11276 2004-09-01  Martin Baulig  <martin@ximian.com>
11277
11278         * mini-x86.c (is_regsize_var): Added support for generic
11279         instances.
11280         (mono_arch_emit_prolog): Make this compile again, use
11281         `x86_push_imm_template (code)'.
11282
11283 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
11284
11285         * mini-x86.c: make all push_imm instructions that get
11286         patched always emit the long form
11287
11288 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
11289
11290         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
11291         in a per-domain hash.
11292
11293         * mini-amd64.c (merge_argument_class_from_type): Handle generic
11294         types.
11295
11296 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
11297
11298         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
11299         work.
11300         
11301         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
11302         work.
11303
11304         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
11305         Beginnings of SSE2 support.
11306
11307         * exceptions.cs: Add more tests for checked int<->uint casts.
11308
11309 2004-08-28  Martin Baulig  <martin@ximian.com>
11310
11311         * mini-x86.c (mono_arch_instrument_epilog): Added support for
11312         generic instances.
11313
11314         * mini.c
11315         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
11316         Handle generic instances recursively.
11317
11318 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
11319
11320         * iltests.il: test for conv.u8 on a constant
11321
11322 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
11323
11324         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
11325         LCONV_x4 (shrun_32 (membase)).
11326
11327 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
11328
11329         * inssel-x86.brg: c&p rules for push/setret of long
11330
11331 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
11332
11333         * inssel-x86.brg: c&p rules for compare (base, regvar) and
11334         compare (regvar, base)
11335
11336         * inssel-x86.brg: more burg love
11337
11338         * inssel.brg: more cleanup
11339
11340         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
11341
11342 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
11343
11344         * basic-long.cs, basic-calls.cs: new tests for optimization.
11345
11346 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
11347
11348         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
11349         patch.
11350
11351 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
11352
11353         * mini-amd64.c (read_tls_offset_from_method): Add another case.
11354         
11355 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
11356
11357         * inssel.brg (mini_emit_memcpy): use 
11358         NO_UNALIGNED_ACCESS to disable memcpy optimization
11359
11360 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
11361
11362         * mini-amd64.c: Handle generic types in various places.
11363
11364         * mini.c (mono_method_to_ir): Handle generic types in init locals.
11365
11366 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
11367
11368         * mini.c (handle_box): Fix warning.
11369
11370         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
11371
11372         * mini-amd64.h: Enable the emit_state optimization.
11373
11374         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
11375
11376         * mini-amd64.c: Add some new 64 bit peephole opts.
11377
11378         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
11379
11380         * cpu-amd64.md: sreg1 of div instructions must be %rax.
11381
11382         * mini-amd64.c: Register allocator fixes.
11383
11384         * mini.c: Add an optimization to emit_state to avoid allocation of new
11385         registers on some platforms.
11386
11387 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
11388
11389         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
11390
11391         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
11392         allocation. Fixes #63085.
11393
11394         * basic-long.cs: Add new regression test.
11395
11396         * mini-amd64.c: Register allocator improvements.
11397
11398 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
11399
11400         * mini-amd64.c (read_tls_offset_from_method): Add another code
11401         sequence.
11402
11403         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
11404         instruction sequence for nullifying class init trampolines.
11405
11406         * objects.cs: Add new regalloc test.
11407
11408         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
11409
11410 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
11411
11412         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
11413         
11414         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
11415         arguments.
11416
11417         * driver.c: Fix profiling after TLS changes.
11418         
11419         * driver.c (mono_main): Set mono_stats.enabled if needed.
11420
11421         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
11422         CEE_BOX.
11423
11424 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
11425
11426         * mini-x86.c: use a 1 op rather than a 2 op tls access
11427         instruction -> faster.
11428
11429 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
11430
11431         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
11432         x86 backend.
11433
11434 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
11435
11436         * exceptions-sparc.c (throw_exception): fix typo
11437
11438 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
11439
11440         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
11441         set tree->dreg correctly with tls. Allow any
11442         register to be used.
11443
11444         * mini-x86.c (read_tls_offset_from_method): add new code
11445         generation pattern seen with GCC.
11446
11447
11448 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11449
11450         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
11451         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11452         exceptions-sparc.c: fix some performance issues in exception
11453         handling and setting of the stack trace for exceptions that were
11454         already thrown.
11455
11456 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
11457
11458         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
11459         x86 backend.
11460         
11461         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
11462         registers.
11463
11464 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11465
11466         This patch inlines tls access, when possible.
11467         
11468         * mini.h: new arch functions for TLS intrinsics.
11469         All platforms updated with a stub.
11470
11471         * mini.c: use the new intrinsics
11472
11473         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
11474         arch specific intrinsic for tls variables
11475
11476 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
11477
11478         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
11479         under windows.
11480
11481 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11482
11483         * mini.c: thread local allocation
11484
11485 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
11486
11487         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
11488
11489         * Makefile.am: Link against the static version of libmonogc.
11490         
11491         * Makefile.am: Link the static versions of the convenience libraries
11492         into the mono executable.
11493
11494         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
11495
11496 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
11497
11498         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
11499         on integer overflow.
11500
11501         * mini-amd64.c: Reorganize function call code.
11502
11503         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
11504
11505 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
11506
11507         * inssel-x86.brg: use xor eax,eax.
11508         
11509         * basic.cs: new tests
11510
11511 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11512
11513         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
11514         in exception throwing code.
11515         
11516 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
11517
11518         * inssel-x86.brg: use xor esi,esi.
11519
11520 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11521
11522         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
11523         can trace methods compiled during mini_init () too.
11524
11525         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
11526         CEE_CONV_U4.
11527
11528 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
11529
11530         * Makefile.am: static link on x86 (r=zoltan)
11531
11532 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11533
11534         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
11535         code since it causes some programs to fail.
11536
11537 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
11538
11539         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
11540
11541 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
11542
11543         * mini.c: ovfops_op_map - add STACK_OBJ case for
11544         CONV_I 
11545         * basic.cs: add test_0_pin_string as test
11546         case for above.
11547
11548 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
11549
11550         * Makefile.am: build C# if srcdir != builddir
11551
11552 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11553
11554         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
11555         fall-through blocks.
11556
11557 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11558
11559         * driver.c: enable loop by default again and include abcrem in -O=all.
11560
11561 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
11562
11563         * iltests.il: Add some localloc tests.
11564
11565         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
11566
11567         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
11568         Fixes #62574.
11569
11570         * inssel-amd64.brg: Add some optimizations.
11571
11572         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
11573         for gcc-3.4.
11574
11575         * Makefile.am: Statically link mono against libmono on AMD64.
11576         
11577         * mini-amd64.c inssel-amd64.brg: Optimizations.
11578
11579 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
11580
11581         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
11582
11583         * tramp-amd64.c: Patch calling code in trampolines.
11584
11585 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
11586
11587         * mini-amd64.c: pinvoke struct passing fixes.
11588
11589 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
11590
11591         * mini-sparc.c: redo change, make mono_arch_cpu_init call
11592         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
11593
11594 2004-08-05  Duncan Mak  <duncan@ximian.com>
11595
11596         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
11597         CEE_LDELEM_ANY.
11598
11599 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
11600
11601         * mini-amd64.c (emit_move_return_value): Move return value for normal
11602         calls too.
11603
11604 2004-08-05  Martin Baulig  <martin@ximian.com>
11605
11606         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
11607         `type->type'; just modify `type' itself when dealing with enums
11608         and generic instances.
11609         (check_call_signature): Make `simple_type' a `MonoType *'.
11610
11611 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
11612
11613         * mini.c: Use OP_PADD to add offsets to addresses.
11614
11615         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
11616
11617 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
11618
11619         * mini-sparc.c (mono_arch_emit_epilog): fix check
11620         for folding last op into restore instruction
11621
11622 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
11623
11624         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
11625         helper methods using the code manager.
11626         
11627         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
11628
11629         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
11630
11631 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11632         
11633         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
11634           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
11635
11636         * mini-s390.c: fix tail processing
11637
11638 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
11639
11640         * mini-ppc.c: mul.ovf.un exception name fix.
11641
11642 2004-08-03  Martin Baulig  <martin@ximian.com>
11643
11644         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
11645         instances; before jumping to `handle_enum', also modify `ptype'.
11646
11647 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
11648
11649         * cpu-sparc.md: fcall maximal length too small.
11650
11651 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
11652
11653         * mini-amd64.c mini.h: Add initial support for passing/returning 
11654         structures to/from pinvoked methods.
11655
11656 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
11657
11658         * mini-ppc.c: reg allocator fix.
11659
11660 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
11661
11662         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
11663
11664         * inssel.brg: Optimize memset on 64 bit machines.
11665
11666         * mini-amd64.c: Fix some vararg cases.
11667
11668 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11669
11670         * mini-s390.c: Corrected macro in emit_float_to_int
11671
11672         * s390-abi.cs: Tests to exercise the s390 ABI
11673
11674 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
11675
11676         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
11677         caller saved regs.
11678
11679         * basic.cs: Add a test for add.ovf.un.
11680
11681 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
11682
11683         * mini-sparc.c: add case for OP_IDIV_UN
11684
11685 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
11686
11687         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
11688         
11689         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
11690
11691 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
11692
11693         * basic.cs: regression tests.
11694
11695         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
11696         regressions.
11697
11698 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
11699
11700         * basic.cs: Add a new test.
11701
11702         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
11703         and AOT. Various fixes and optimizations.
11704
11705         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
11706
11707 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
11708
11709         * mini-ppc.c: make sure temp regs are not used for global reg
11710         allocation.
11711
11712 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
11713
11714         * cpu-sparc.md: conv_i8 fix for 64bits
11715
11716         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
11717
11718 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
11719         
11720         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
11721         add opcode for cmp BYTE PTR [eax], imm.
11722
11723         * inssel.brg: Make memcpy and memset takes bases.
11724
11725 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
11726
11727         * *-amd64.*: More AMD64 work.
11728         
11729 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
11730
11731         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
11732         add a compare-not-equal opcode.
11733         
11734 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
11735
11736         * mini.c: Use mono_init_from_assembly instead of mono_init.
11737         
11738 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
11739
11740         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
11741
11742         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
11743
11744         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
11745
11746         * inssel.brg: 64 bit fixes.
11747
11748         * mini.h (MonoCallInst): Add some AMD64 specific data.
11749
11750         * mini.h: Add some OP_P opcodes.
11751
11752 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
11753
11754         * basic.cs: tests for 61797 and 61740
11755
11756 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
11757
11758         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
11759         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
11760
11761 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
11762
11763         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
11764
11765         * *-amd64*.*: Ongoing AMD64 work.
11766
11767 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
11768
11769         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
11770
11771         * *-amd64*: Ongoing AMD64 work.
11772
11773         * mini-arch.h: Add AMD64 support.
11774
11775         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
11776
11777         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
11778
11779         * mini-ops.h: Add new opcodes.
11780
11781         * Makefile.am: Add AMD64 support.
11782
11783         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
11784         rules into the inssel-long*.brg files.
11785
11786         * *-amd64.*: Add beginnings of AMD64 backend.
11787
11788 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
11789
11790         * mini.c (print_dfn): commenting out the code that prints
11791         the cil. With -O=deadce, this makes -v -v crash.
11792         
11793         * cpu-pentium.md: make checkthis have a length of 2
11794
11795 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
11796
11797         * mini-sparc.h: fix implementations of __builtin
11798         functions for Sun compiler for V9.
11799
11800 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
11801
11802         * mini.c: use the new stelem.ref wrapper
11803         * exceptions.cs, arrays.cs: new stelem.ref tests
11804
11805 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11806
11807         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
11808         new XSP should work with these changes).
11809
11810 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
11811         
11812         * inssel-{long32,x86,}.brg: trivial optimizations.
11813         
11814 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
11815
11816         * mini.c: load value when emitting box operation in
11817         constrained calls.
11818
11819 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
11820
11821         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
11822         is one byte shorter than cmp DWORD PTR [eax], 0.
11823
11824 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
11825
11826         * inssel-ppc.brg: arguments on the stack are always
11827         relative to the stack pointer (spotted by Neale Ferguson).
11828
11829 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11830
11831         * exceptions-x86.c: delay appending the method name to the trace until
11832         after mono_jit_info_table_find is called, as this gets the real
11833         MonoMethod.
11834
11835 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
11836
11837         * aot.c: register roots
11838
11839 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
11840
11841         * aot.c : I could just use PLATFORM_WIN32 flag.
11842
11843 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
11844
11845         * aot.c : Reverting the previous fix. This time it broke linux build.
11846
11847 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
11848
11849         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
11850
11851 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
11852
11853         * mini.c (handle_stack_args): Remove some more debugging code.
11854         
11855         * mini.c (handle_stack_args): Remove debug output left in by mistake.
11856
11857         * driver.c mini.h aot.c: Allow additional options to be specified with
11858         --aot and pass them to mono_compile_assembly.
11859
11860         * aot.c: Add experimental code to AOT compile all loaded assemblies
11861         on demand and save the code into a cache in the filesystem.
11862
11863         * aot.c: Add support for more wrapper methods.
11864         
11865         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
11866         58863.
11867
11868         * cpu-*.md: Remove removed opcodes.
11869
11870         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
11871         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
11872         related icalls to marshal.c.
11873
11874 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
11875
11876         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
11877
11878         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
11879
11880         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
11881
11882 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
11883         * liveness.c: If liveness is recomputated we need to reset the information
11884         for each variable. This way, if the liveness range has been narrowed
11885         by optimizations that happened after the last computation, we can return
11886         a smaller range.
11887         
11888         For example, if you have
11889         
11890         {
11891                 int i = 0;
11892                 
11893                 // Tons of code that does not affect i
11894                 
11895                 i = foo ();
11896                 ...
11897         }
11898         
11899         i = 0 is dead code and will be removed by SSA. However, when
11900         linear scan gets to the code, i will still appear to be live
11901         throughout the entire block. This prevents good register allocation.
11902
11903 2004-07-06  Martin Baulig  <martin@ximian.com>
11904
11905         * debug-mini.c (mono_debug_init_method): Allow
11906         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
11907         (mono_debug_add_icall_wrapper): New method.
11908
11909         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
11910
11911 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
11912
11913         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
11914         optimization.
11915
11916 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
11917
11918         * aot.c (mono_aot_load_method): Fix loading of debug info.
11919
11920 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
11921
11922         * aot.c: Add logging support.
11923
11924 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
11925
11926         * mini.h: Add prototype for mono_print_method_from_ip.
11927
11928         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
11929
11930         * inssel.brg: 64 bit fixes.
11931
11932         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
11933         inssel-long32.brg.
11934
11935         * Makefile.am: Add SPARC64 support.
11936
11937 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
11938
11939         * aot.c: Fix alignment problems on 32 bit platforms.
11940
11941 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
11942
11943         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
11944         SPARC64.
11945
11946         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
11947         problems.
11948
11949         * mini.h: Bump AOT file version. Some 64 bit fixes.
11950
11951 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
11952
11953         * inssel-sparc.brg: Add new rule to avoid register moves.
11954
11955         * inssel.brg: Add ldind_to_load_membase helper function.
11956
11957 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
11958
11959         * mini.c: OffsetToStringData intrinsic.
11960         
11961 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
11962
11963         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
11964
11965         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
11966         regression tests.
11967
11968         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
11969 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11970
11971         * mini.c: reinstated mono_compile_get_interface_var()
11972         on x86, too, since the change breaks the Gtk# build there as well.
11973
11974 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11975
11976         * driver.c: remove loop from the default optimizations: it seems to
11977         interact badly with some of the other options (see bug #60613).
11978
11979 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
11980
11981         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
11982         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
11983
11984 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
11985
11986         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
11987         vararg-using methods.
11988
11989 2004-06-21  Martin Baulig  <martin@ximian.com>
11990
11991         * mini/mini-exceptions.c
11992         (mono_handle_exception): Added `gpointer original_ip' argument.
11993         After calling mono_unhandled_exception(), call
11994         mono_debugger_unhandled_exception() and if that returns true,
11995         restore the context and return.
11996
11997 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
11998
11999         * mini-ppc.c: prefer the use of relative branches so
12000         they won't need to be patched in aot code (patch from Patrick Beard).
12001
12002 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
12003
12004         * aot.c: patch from Patrick Beard to make the output assembly
12005         more correct for the MacOSX assembler. Small tweak to
12006         generate sane images on Linux/PPC, too.
12007
12008 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12009
12010         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
12011         case until bug #59509 is fixed (shows up in #60332).
12012
12013 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12014
12015         * mini.c: make sure the needed wrappers are compiled, too, with
12016         precomp.
12017
12018 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
12019
12020         * driver.c: remove NPTL reference in --version output.
12021
12022 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12023
12024         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
12025         generate valid assembly for the Mach-O assembler.
12026
12027 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
12028
12029         * driver.c: don't include abcrem in the all optimization specifier
12030         since it slows down jit compilation too much for now.
12031
12032 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
12033
12034         * mini.c: use BIGMUL only if both operands have the same signage.
12035         * iltests.il: Test for bug 60056. (errors related to signage in
12036         BIGMUL).
12037
12038         r=lupus.
12039
12040 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
12041
12042         * mini.c, aot.c: memory leak fixes.
12043
12044 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12045
12046         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
12047
12048 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
12049
12050         * Makefile.am: remove the -static hack completely, it links in
12051         statically glib as well.
12052
12053 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
12054
12055         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
12056         * exceptions.cs: make it compile with new mcs/csc.
12057
12058 2004-06-03 Massimiliano Mantione <massi@ximian.com>
12059         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
12060         and added relevant test case.
12061
12062 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
12063
12064         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
12065         regressions in gtk-sharp.
12066
12067 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
12068
12069         * exceptions.cs: New regression tests.
12070
12071         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
12072
12073 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
12074
12075         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
12076
12077 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
12078
12079         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
12080
12081         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
12082
12083 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
12084
12085         * mini.c (mono_jit_runtime_invoke): Init class in this
12086         method instead of trusting mono_jit_compile_method to
12087         do the work (because wrappers can be in object class)
12088
12089 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
12090
12091         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
12092
12093         * basic-long.cs: New regression test.
12094
12095 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
12096
12097         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
12098         and div/rem checks.
12099
12100 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
12101
12102         * Makefile.am: fix miguel's change to build mono statically against
12103         libmono (track build dependencies).
12104
12105 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12106
12107         * cfold.c: Some glib versions do not have G_MININT32.
12108
12109 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
12110
12111         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
12112         with precision of tan, atan, sin and cos, and implemented related
12113         regressions tests (fixes bug 54467, but one new problem appeared and
12114         is not fixed yet).
12115
12116 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12117
12118         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
12119
12120         * exceptions.cs: Add test for constant folding && division by zero.
12121
12122         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
12123         since driver.c is in libmono too, so the optimization was useless.
12124
12125         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
12126         variable to driver.c so the compiler can emit more efficient code to
12127         access them.
12128
12129 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12130
12131         * Makefile.am: don't distribute generated inssel.[ch] files.
12132
12133 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
12134
12135         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
12136         into the default appdomain. Fixes #58707.
12137
12138         * jit-icalls.c: Remove the broken approximation for truncl, doing
12139         no conversion is better.
12140
12141         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
12142         Fixes #58863.
12143
12144 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
12145
12146         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
12147         of the mcrxr instruction which is not available on some processors
12148         even if it's documented to be. Implement add and sub overflow correctly
12149         (still not complete for long unsigned). Speed up icalls a bit.
12150
12151 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
12152
12153         * mini.c (mono_jit_compile_method_with_opt): Make sure that
12154         we run .cctor in the current domain instead of target_domain.
12155         
12156         Fixes bug #58558, .cctor not being called in -O=shared.
12157
12158 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12159
12160         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
12161
12162 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
12163
12164         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
12165         which can be done with an imm8, do it that way.
12166         (mono_arch_output_basic_block): ditto for a jmp
12167         (mono_arch_emit_prolog): Computate maximum offset of a label.
12168
12169 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
12170
12171         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
12172         now tries to allocate prefered physical reg's for virtual
12173         regs. This reduces the number of emited spills/loads with
12174         20-30% on our core assemblies.
12175
12176 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12177
12178         * jit-icalls.c: truncl() is not needed and trunc() is
12179         the correct thing to do anyway (bug #58287).
12180
12181 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
12182
12183         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
12184         if available.
12185
12186 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
12187
12188         * driver.c: enable loop optimizations by default.
12189
12190 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
12191
12192         * mini-x86.c: fix calc of max loop size when aligning loops start.
12193
12194 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
12195
12196         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
12197         the stack.
12198
12199 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
12200
12201         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
12202         should set carry.
12203
12204         * basic-long.cs: Add tests for add/subtract of immediates with carry.
12205
12206         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
12207         
12208         * mini.c (inline_method): Allways inline some wrappers even if the cost
12209         is too large. Fixes #58785.
12210
12211         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
12212         
12213 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
12214
12215         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
12216         (crichton@gimp.org). Beginning of support for sparc/linux.
12217
12218         * mini-sparc.c: Optimize retrieval of LMF address.
12219
12220 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
12221
12222         * exceptions-ppc.c:  handle alloca in methods with clauses.
12223
12224 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
12225
12226         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
12227
12228 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
12229
12230         * mini.c: Delegate most of the abort signal work to 
12231           mono_thread_request_interruption, which also handles Stop and Suspend
12232           states.
12233
12234 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
12235
12236         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
12237         supports the save/restore lmf opcodes.
12238
12239 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
12240
12241         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
12242         by gcc-3.4 as well.
12243
12244         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
12245
12246 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
12247
12248         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
12249         methods which contain array accesses.
12250
12251         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
12252         boundaries. Fixes #58537.
12253
12254         * iltests.il: Add regression test for #58537.
12255
12256 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
12257
12258         * mini-x86.c (mono_arch_local_regalloc): Last part of
12259         fix for bug #58633 (releasing register to early).
12260
12261 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
12262
12263         * basic-long.cs: Add new regression test.
12264
12265 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
12266
12267         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
12268         register too early on the chain.
12269
12270 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
12271
12272         * mini.c (create_helper_signature): Use a helper function to reduce
12273         the code which needs to be written. Also set the calling convention of
12274         icalls on windows. Fixes #57840.
12275
12276 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
12277
12278         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
12279         exceptions-ppc.c: added helper function to get the instruction address
12280         from a signal handler context.
12281
12282 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12283
12284         * helpers.c: use g_get_tmp_dir. Invokes happyness 
12285         from gonzalo.
12286
12287 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12288
12289         * helpers.c: Add new env variable to pass args to objdump.
12290         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
12291
12292 2004-05-17  Radek Doulik  <rodo@ximian.com>
12293
12294         * Makefile.am (common_sources): added abcremoval.h so it get
12295         disted and daily mono packages on go-mono.com will build again
12296
12297 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
12298
12299         * abcremoval.c: Fixed coding style, added copyright header.
12300
12301         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
12302
12303         * mini.h: Added prototype for abc removal main function.
12304
12305         * build_relations_propagation_table.pl: Added copyright header.
12306
12307 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
12308
12309         * basic-long.cs: reg test for complex ceq_long bug.
12310
12311 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
12312
12313         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
12314         reg in long and clob case (bug #58343). Fixed/added comments.
12315
12316 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
12317
12318         * mini.c (mono_jit_runtime_invoke): Follow new convention
12319         of calling the invoke method with an function pointer.
12320
12321 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
12322
12323         * ChangeLog: Fix author of memory leak patch.
12324
12325 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
12326
12327         * Makefile.am: fix make dist as well...
12328
12329
12330 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
12331
12332         * cfold.c: Made so that conversions from pointer to int4 are no-ops
12333         on archs where pointers are 4 bytes long.
12334
12335         * Makefile.am: Added abcremoval.c source file.
12336
12337         * abcremoval.c: Added abcremoval.c.
12338
12339         * abcremoval.h: Added abcremoval.h.
12340
12341         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
12342
12343         * inssel.brg: Enabled bounds check removal.
12344
12345         * mini.c: Added support for abcrem optimization.
12346
12347         * mini.h: Added abcrem optimization label.
12348
12349         * driver.c: Added support for abcrem optimization.
12350
12351         * propagated_relations_table.def: Added propagated_relations_table.def.
12352
12353 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
12354
12355         * mini.c, cfold.c: fix style.
12356
12357 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12358
12359         * mini.c: handle issue with the low-level implementation of
12360         some long opcodes (bug #54209).
12361
12362 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
12363
12364         * basic.cs: test for my new cmov stuff.
12365
12366 2004-05-13      Patrik Torstensson
12367
12368         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
12369         opt and added peephole documentation.
12370
12371 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
12372
12373         * tramp-ppc.c: rewrote the generic trampoline code.
12374
12375 2004-05-11      Patrik Torstensson
12376
12377         * mini-x86.c: optimize long shl/shr asm code (one less branch)
12378
12379 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
12380
12381         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
12382
12383         * mini.h mini.c dominators.c: Applied patch from Derek Woo
12384         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
12385
12386         * mini.c: Add new icalls for AsAny marshalling.
12387
12388 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
12389
12390         * tramp-ppc.c, mini-ppc.c: more cleanups.
12391
12392 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12393
12394         * mini.c: no warnings.
12395
12396 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12397
12398         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
12399
12400 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
12401
12402         * mini.c: In the thread abort signal handler, if the thread is in the
12403         process of being stoped, don't throw the Abort exception, just stop the
12404         thread.
12405
12406 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
12407
12408         * tramp-ppc.c: removed old code.
12409
12410 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12411
12412         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
12413         do some simple speed optimizations on ppc.
12414
12415 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12416
12417         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
12418         and large offsets in load/store.
12419
12420 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
12421
12422         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
12423         it causes regressions.
12424
12425 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
12426
12427         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
12428         support.
12429
12430 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12431
12432         * jit-icalls.c: remove warnings.
12433         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
12434         speedups for unsafe code.
12435
12436 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
12437
12438         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
12439
12440 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
12441
12442         * basic-calls.cs: Add new regression test.
12443
12444         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
12445         more portable.
12446
12447         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
12448
12449         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
12450         is no longer used.
12451
12452 2004-05-06      Patrik Torstensson
12453
12454         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
12455         long reg allocation in any reg (not only eax:edx) and implemented 
12456         long shl/shr ops in asm instead of helpers.
12457
12458 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
12459
12460         * mini-sparc.h: Fix warnings.
12461
12462         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
12463         stack.
12464
12465         * mini-exceptions.c (mono_handle_exception): Call the filter in a
12466         separate statement for clarity.
12467
12468         * mini-sparc.c: Update status.
12469
12470 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
12471
12472         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
12473         here.
12474
12475 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12476
12477         * inssel-ppc.brg: another small pre-release workaround:
12478         we don't do overflow detection for long_sub_un.
12479
12480 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12481
12482         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
12483         (also works around a weird ppc bug: 57957).
12484
12485 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
12486
12487         * tramp-ppc.c: trampoline fixes.
12488
12489 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
12490
12491         * mini-ppc.c: fixed typos.
12492
12493 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12494
12495         * mini-ppc.c, exceptions-ppc.c: more code saves registers
12496         at the top of the stack. Fixed typos. Use a frame registers
12497         for all the methods with exception clauses.
12498
12499 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12500
12501         * exceptions-ppc.c: restore fp registers.
12502
12503 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
12504
12505         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
12506         order from the stack top (moved the stack room to save the
12507         return value for trace after the param area). Fixed corruption
12508         in restoring registers on unwind.
12509
12510 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12511
12512         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
12513
12514 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12515
12516         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
12517         and prolog/epilog for methods that use it. Allow
12518         enough param area room for varargs methods. Fix miguel's
12519         breakage in exception handling.
12520
12521 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12522
12523         * Makefile.am: run genmdesc only on current arch.
12524
12525 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12526
12527         * exceptions-x86.c:
12528         * mini-x86.h: fix the build on windows.
12529
12530 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
12531
12532         * 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.
12533
12534         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
12535
12536         * mini-exceptions.c: New file.
12537         
12538         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
12539         Move some parts of the x86 exception handling code to an 
12540         arch-independent file so it can be shared with other ports.
12541
12542 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
12543
12544         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
12545
12546 2004-04-26  David Waite  <mass@akuma.org>
12547
12548         * driver.c: remove comma from end of enumeration declaration
12549
12550 2004-04-26  Jackson Harper  <jackson@ximian.com>
12551
12552         * driver.c: parse config file before loading first assembly. This
12553         allows the user gac to be enabled/disabled. 
12554         
12555 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
12556
12557         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
12558         simpler mechanism: we do not care what is encoded initially
12559         (branch absolute or relative), we care about the code and its
12560         target.  I kept the old code for reference for now.
12561
12562         The new code tries first to determine if the jump is anywhere in
12563         the -/+32 absolute meg range, if it succeeds, it encodes using the
12564         absolute branch;  If not, it tried to find something in the
12565         relative range, if not, it uses the handle_thunk code. 
12566
12567 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
12568
12569         * exceptions-ppc.c: use the correct ip register on macosx.
12570
12571 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
12572
12573         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
12574
12575 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
12576
12577         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
12578         Raise exception on integer divide by zero by hand since the hw
12579         doesn't support it. Handle NaNs in FP compares.
12580
12581 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
12582
12583         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
12584         code reducing duplication between the platforms and enabled
12585         signal exception handling (on linux for now).
12586
12587 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
12588
12589         * exceptions-ppc.c: more macosx support.
12590
12591 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12592
12593         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
12594
12595 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
12596
12597         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
12598
12599 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
12600
12601         * iltests.il: more tests.
12602
12603 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
12604
12605         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
12606         vars as well.
12607
12608 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12609
12610         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
12611
12612 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
12613
12614         * liveness.c: Mark variables as volatile in all basic blocks reachable
12615         from exception clauses.
12616
12617 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
12618
12619         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
12620         inlining.
12621
12622 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
12623
12624         * iltests.il, basic.cs: more tests for regalloc.
12625
12626 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12627
12628         * iltests.il: Some tests for register allocation modifications
12629         I have locally.
12630
12631 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
12632
12633         * exceptions.cs: Add regression test for bug #56782.
12634
12635         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
12636         original stack trace if an exception is rethrown. Fixes #56782. Oh,
12637         the beauty of fixing the same thing in 5 different files...
12638
12639 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
12640
12641         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
12642         methods.
12643
12644 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
12645
12646         * mini.c: Add support for STRWLPARRAY marshalling convention.
12647
12648 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12649
12650         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
12651         to init the context to setup the regs pointer).
12652
12653 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12654
12655         * exceptions-ppc.c: more exceptions work.
12656
12657 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12658
12659         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
12660         not allowed.
12661
12662 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
12663
12664         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
12665         can use the memory directly.
12666
12667         * cpu-pentium.md: Update documentation from a post from Zoltan. 
12668
12669         add x86_add_membase, x86_sub_membase, x86_mul_membase
12670
12671 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
12672
12673         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
12674         GENERAL_REGS they were also hardcoded for all PPC ports.
12675
12676         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
12677
12678         Remove hard-coded limit for floating point registers, use
12679         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
12680
12681         Notice that in MacOS X calling conventions you can fit a lot more
12682         floating point values in registers, so I should update the PInvoke
12683         test to excercise the passing of floating point values on the
12684         stack (currently broken).
12685         
12686 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
12687
12688         * tramp-ppc.c (create_trampoline_code): Added
12689         JUMP_TRAMPOLINE_SIZE. 
12690         (ppc_magic_trampoline): Follow the pattern from
12691         x86_magic_trampoline: if code is set to zero, return. 
12692         (create_trampoline_code): Always pass MonoMethod to the jump
12693         trampoline, before it was passing a null.
12694         (mono_arch_create_jump_trampoline): Implement the jump stub, could
12695         share the code with mono_arch_create_jit_trampoline. 
12696
12697         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
12698         implemented.
12699         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
12700         implemented.  
12701
12702         * cpu-g4.md: Added length for jmp instruction, the worst case
12703         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
12704         for save_lmf).
12705
12706 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
12707
12708         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
12709
12710 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
12711
12712         * mini.c: Only set bblock->real_offset when adding a new bblock, and
12713         before each IL instruction.
12714
12715         * mini.c (CEE_BOX): Fix warnings.
12716
12717 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12718
12719         * mini.c: removed a few unused vars and extra whitespace.
12720
12721 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
12722
12723         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
12724         checks.
12725         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
12726         index.
12727         (OP_GETCHR): use the above
12728         (CEE_LDELEMA): use the above.
12729
12730         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
12731         version of the generic impl.
12732         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
12733         (CEE_LDELEMA): use the above.
12734
12735 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
12736
12737         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
12738         Fixes #56317.
12739
12740         * iltests.il: Added new regression test for #56317.
12741
12742 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
12743
12744         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
12745         under NetBSD. Fixes #56450.
12746
12747         * liveness.c (update_gen_kill_set): Fix previous patch.
12748
12749 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12750
12751         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
12752
12753 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
12754
12755         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
12756         ldsfld and ldsflda.
12757
12758         * inssel-sparc.brg: Add more optimizations.
12759
12760         * mini-sparc.c: Replace multiply/divide with shifts if possible.
12761
12762 2004-04-01  Martin Baulig  <martin@ximian.com>
12763
12764         * mini.c (handle_box): New static function; moved the
12765         implementation of CEE_BOX here.
12766         (mono_method_to_ir): Added `constrained_call' variable.
12767         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
12768         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
12769         mono_method_get_constrained() to get the method.
12770
12771 2004-04-01  Martin Baulig  <martin@ximian.com>
12772
12773         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
12774         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
12775         (mono_method_to_ir): We don't need these macros anymore since
12776         mono_class_get_full() already takes care of it. 
12777
12778 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12779
12780         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
12781         use @function (as doesn't accept #function here) and check the return
12782         value of system and stop if fails.
12783
12784 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12785
12786         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
12787
12788 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
12789
12790         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
12791
12792         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
12793
12794         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
12795         #56223.
12796
12797         * basic-long.cs: Add test for negation of Int64.MinValue.
12798
12799 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
12800
12801         * mini-sparc.c: Update status.
12802
12803         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
12804
12805         * exceptions-sparc.c: Fix return value in filters.
12806
12807         * inssel-sparc.brg: Fix register allocation in some rules.
12808
12809 2004-03-28  Martin Baulig  <martin@ximian.com>
12810
12811         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
12812         if neccessary.  
12813
12814 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
12815
12816         * mini-x86.c (mono_arch_patch_code): Fix warnings.
12817         
12818         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
12819         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
12820         remove unused conv_u4 opcode.
12821
12822         * mini-x86.c: Remove valgrind workaround since it slows down things
12823         even when mono is not run under valgrind.
12824
12825 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
12826
12827         * mini-sparc.c: Update status.
12828
12829         * inssel-sparc.brg: Add some optimizations.
12830
12831         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
12832         future delay slot filling. Add support for varargs, tail calls and JMP.
12833
12834         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
12835         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
12836
12837         * inssel.brg: Fix register allocation in OP_ARGLIST.
12838
12839         * inssel.brg: Fix warnings.
12840
12841 2004-03-25  Martin Baulig  <martin@ximian.com>
12842
12843         * mini.c (inflate_generic_field): Removed.
12844         (mini_get_method): Removed, use mono_get_method_full(),
12845         (mini_get_class): Removed, use mono_class_get_full().
12846         (mono_method_to_ir): Pass our generic context to
12847         mono_field_from_token().        
12848
12849 2004-03-25  Martin Baulig  <martin@ximian.com>
12850
12851         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
12852         of a `MonoMethod *'.
12853         (mini_get_method): Take a `MonoGenericContext *' instead
12854         of a `MonoMethod *'.
12855         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
12856         a new local variable called `generic_context' which holds the
12857         current `MonoGenericContext *'; use it to lookup things.
12858
12859 2004-03-24  Martin Baulig  <martin@ximian.com>
12860
12861         * mini.c (mini_get_class): New static method; if we're inside a
12862         generic instance, inflate the class if neccessary.
12863         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
12864
12865 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
12866
12867         * iltests.il: New regression test for #55976.
12868
12869         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
12870         #55976.
12871
12872 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
12873
12874         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
12875         output.
12876
12877 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
12878
12879         * liveness.c: Consider SSA stores as well as loads when making vars
12880         volatile.
12881
12882         * exceptions.cs: New regression tests for register allocation.
12883         
12884 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
12885
12886         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
12887         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
12888           domain lock only to protect puntual access to data structures.
12889           Added access lock for sighash, jit_icall_hash_name, 
12890           jit_icall_hash_addr and domain->code_mp.
12891
12892 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
12893
12894         * driver.c: Print SIGSEGV handling method.
12895
12896         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
12897
12898         * mini.c (setup_jit_tls_data): Handle case when this is called
12899         multiple times for a thread.
12900
12901         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
12902         is different from fbxx_un. Fixes #54303. Also use constants instead of
12903         magic numbers in a lot of places.
12904
12905 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
12906
12907         * exceptions.cs: Fix cctor test when --regression is used.
12908
12909 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
12910
12911         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
12912         for Linux/ppc.
12913
12914 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
12915
12916         * inssel-ppc.brg: fixed register assignments for some rules.
12917
12918 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
12919
12920         * exceptions.cs: Add test for exceptions in static constructors.
12921
12922         * mini.c (mono_jit_compile_method_with_out): Move the calling of
12923         static constructors outside the domain lock. Fixes #55720.
12924
12925 2004-03-17  Martin Baulig  <martin@ximian.com>
12926
12927         * mini.c (get_generic_field_inst): Removed, this'll never happen.
12928         (inflate_generic_field): Take the `MonoMethod *' instead of the
12929         `MonoClass *' and added support for generic method.
12930         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
12931         have a `field->parent->gen_params', only inflate the field if it's
12932         an open constructed type.
12933
12934 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
12935
12936         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
12937         exception object instead of the preconstructed ones.
12938
12939 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12940
12941         * mini.c: reverted changed to sigsegv_signal_handler commited
12942         accidentally in the previous patch.
12943
12944 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12945
12946         * mini.c:
12947         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
12948         running --aot with an old assembly.
12949
12950 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
12951
12952         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
12953         point values.
12954
12955         * mini-sparc.c: Add support for v9 branches with prediction.
12956
12957 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
12958
12959         * mini.c (mini_init): #warning is GNUC only
12960
12961         * mini-sparc.h: implement __builtin_frame_address
12962         and __builtin_return_address for Sun C compiler
12963
12964 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
12965
12966         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
12967
12968 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
12969
12970         * basic-calls.cs: Add test for unaligned byref long argument passing.
12971
12972         * mini-ops.h: Add sparcv9 compare and branch instructions.
12973
12974         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
12975         v9 instructions if we have a v9 cpu.
12976
12977         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
12978         registers for global allocation.
12979
12980         * exceptions-sparc.c: Fixes.
12981         
12982 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
12983
12984         * liveness.c (mono_analyze_liveness): Optimized version.
12985
12986         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
12987
12988         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
12989         sparc work.
12990
12991         * basic-float.cs basic-calls.cs: New regression tests.
12992
12993 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
12994
12995         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
12996         sigaltstack implementation.
12997
12998         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
12999         
13000         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
13001         stuff if SIGSEGV_ON_ALTSTACK is not defined.
13002
13003 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
13004
13005         * mini.c: Fix warnings.
13006         
13007         * mini.c (mono_resolve_patch_target): New function which contains the
13008         arch independent part of the patching process.
13009
13010         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
13011         patching code to a separate function.
13012
13013 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
13014
13015         * mini.c (add_signal_handler): ifdef out on Windows
13016
13017 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
13018
13019         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
13020         cpu-sparc.md: Add exception handling support + other fixes.
13021
13022         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
13023         typed GC detection in --version.
13024
13025         * basic.cs exceptions.cs: New regression tests.
13026
13027         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
13028         the arch specific code can store data during a compilation.
13029
13030         * mini-ops.h: Add OP_SETFRET.
13031
13032         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
13033         function, register a separate icall for each arity, so the icalls can
13034         get a wrapper.
13035         
13036         * mini.c (mono_print_tree): Print negative offsets in a more readable
13037         form.
13038         
13039         * mini.c: Make signal handling work on sparc.
13040         
13041         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
13042
13043         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
13044
13045         * jit-icalls.c: Emulate truncl by aintl on solaris.
13046
13047         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
13048
13049 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
13050
13051         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
13052
13053 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
13054
13055         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
13056         a MarshalByRef type, inline a method that performs the check, taking into
13057         account that the object can be a proxy. Also implemented tow new opcodes:
13058         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13059         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
13060         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13061
13062 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
13063
13064         * mini-ppc.c: if a relative branch displacement is too big
13065         but it points to and area reachable with an absolute branch, 
13066         avoid the thunks.
13067
13068 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
13069
13070         * mini.c: optimize small copies in cpblk.
13071
13072 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
13073
13074         * basic-calls.cs basic-float.cs: New regression tests.
13075
13076         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
13077         negative offsets from %fp. Implement localloc. Fix local register 
13078         allocation. Fix the case when the this argument needs to be saved to
13079         the stack. Implement some missing opcodes.
13080
13081 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
13082
13083         * mini.c (mini_method_compile): Reenable global regalloc in methods
13084         with exception handlers.
13085
13086         * linear-scan.c (mono_varlist_sort): Fix warning.
13087
13088         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
13089
13090         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
13091         regalloc costs.
13092
13093         * liveness.c: Make all variables uses in exception clauses volatile, to
13094         prevent them from being allocated to registers. Fixes #42136.
13095
13096 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
13097
13098         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
13099         causes regressions.
13100
13101         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
13102         argument to mono_arch_regalloc_cost.
13103
13104         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
13105         precisely.
13106
13107 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
13108
13109         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
13110         Make the cost of allocating a variable to a register arch dependent.
13111
13112         * basic-calls.cs: Fix compilation of tests.
13113         
13114         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
13115         helper function to cut back on the number of #ifdefs needed.
13116
13117         * mini-ppc.c: Fix compilation.
13118
13119         * basic-calls.cs: New regression tests.
13120
13121         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
13122
13123         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
13124         of l0 since that is callee saved.
13125
13126         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
13127         to virtual calls.
13128
13129         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
13130         of delay instruction.
13131
13132         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
13133
13134         * mini.h (MonoCallInst): Add 'virtual' flag.
13135
13136         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
13137
13138 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
13139
13140         * *.cs: New regression tests.
13141
13142         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
13143         work.
13144
13145         * mini.c (mono_runtime_install_handlers): Fix build.
13146
13147         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
13148         'signal_stack_size' members.
13149
13150         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
13151         alternate signal stack.
13152
13153         * exceptions-x86.c: Add stack overflow handling.
13154
13155         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
13156         functions to arch independent code.
13157
13158         * mini.c (mono_print_tree): Print more detailed info for load_membase
13159         opcodes.
13160         
13161 2004-02-23  Martin Baulig  <martin@ximian.com>
13162
13163         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
13164
13165 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
13166
13167         * mini-x86.c: fixed reg allocation for div/rem.
13168
13169 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
13170
13171         * driver.c (mono_main): Report some configuratio options on --version.
13172
13173 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
13174
13175         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
13176         low in the address space. Correctly flush memory in thunks where we
13177         output native code.
13178
13179 2004-02-20  Martin Baulig  <martin@ximian.com>
13180
13181         * mini.c (mini_get_method): New static method; inflate all generic
13182         methods and methods in open generic instances.
13183         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
13184         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
13185
13186 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
13187
13188         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
13189
13190         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
13191
13192 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
13193
13194         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
13195
13196         * mini-sparc.c (flushi mono_arch_output_basic_block): make
13197         it compile using Sun's compiler.
13198
13199 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
13200
13201         * 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.
13202
13203         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
13204
13205 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
13206
13207         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
13208         code.
13209         * mini-ppc.c: handle calls outside of the allowed range with thunks
13210         allocated using the code manager.
13211         * tramp-ppc.c: use the code manager to hold generated native code.
13212         Fixed the magic trampoline to just patch vtable entries.
13213
13214 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
13215
13216         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
13217         independent file.
13218
13219 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
13220
13221         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
13222         PPC.
13223
13224         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
13225         if we have a working __thread implementation.
13226
13227         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
13228         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
13229
13230 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
13231
13232         * mini-x86.c: Fix compilation under gcc 2.
13233         
13234 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
13235
13236         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
13237         contains a call to the wrapped function.
13238
13239         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
13240         OP_<CALL>_IMM opcodes, and use them under X86.
13241         
13242         * mini.c (mono_jit_find_compiled_method): Fix warning.
13243
13244         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
13245
13246         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
13247
13248         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
13249         functionality to mini.c.
13250
13251         * mini.c (mono_create_jump_trampoline): New function to create a jump
13252         trampoline. Return a compiled method instead of a trampoline if it
13253         exists. Add a cache for jump trampolines.
13254
13255         * mini.c (mono_jit_find_compiled_method): New function to return a
13256         compiled method if it exists.
13257
13258         * mini-x86.c: Call mono_create_jump_trampoline instead of 
13259         mono_arch_create_jit_trampoline.
13260
13261         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
13262         a jump trampoline. Fixes #52092.
13263         
13264 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
13265
13266         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
13267         which is not up-to-date. Add check_corlib_version () instead.
13268
13269         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
13270         have to call it.
13271         
13272         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
13273         since newer valgrind versions do not need it.
13274
13275         * mini.c (mono_jit_compile_method_with_opt): New helper function to
13276         compile a method with a given set of optimizations.
13277
13278         * mini.c: Compile icall wrappers on-demand instead of at startup.
13279
13280         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
13281         wrapper for an icall.
13282
13283 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
13284
13285         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
13286         #54063.
13287
13288         * iltests.il: Add test for non-empty stack before switch instruction.
13289
13290 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
13291
13292         * mini.c: Add support for new stringbuilder marshalling conventions.
13293
13294         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
13295
13296 2004-02-01  Martin Baulig  <martin@ximian.com>
13297
13298         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
13299         in `ginst->mtype_argv'.
13300
13301 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
13302
13303         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
13304         facilitate grepping.
13305
13306 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
13307
13308         * mini.c: fixed buglet in initobj generic implementation for references.
13309
13310 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
13311
13312         * Makefile.am: make the version script conditional.
13313         * jit-icalls.c: handle missing truncl().
13314
13315 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
13316
13317         * exceptions.cs: Add more tests for double->int conversion.
13318
13319         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
13320         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
13321
13322 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
13323
13324         * driver.c: make --verbose --version emit an error
13325         if the loaded corlib doesn't match the runtime version.
13326
13327 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
13328
13329         * mini-ppc.h: export ppc_patch().
13330         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
13331         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
13332         on par or better than on MacOSX.
13333
13334 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
13335
13336         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
13337         mono_lookup_pinvoke_call.
13338
13339         * mini-x86.c: Under windows, the default pinvoke calling convention is
13340         stdcall. Fixes #52834.
13341
13342         * mini.c (optimize_branches): Add an upper bound to the number of
13343         iterations to prevent infinite loops on strange loops. Fixes #53003.
13344
13345 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
13346
13347         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
13348         and ISINST. Fixes #52093.
13349
13350         * objects.cs (test_0_vector_array_cast): New tests.
13351         
13352 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
13353
13354         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
13355         checking in Array.Set ().
13356
13357         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
13358         #52590.
13359
13360         * object.cs (test_0_multi_array_cast): New regression test.
13361
13362 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
13363
13364         * exceptions-ppc.c: fix build on Linux/PPC.
13365
13366 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
13367
13368         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
13369         running under valgrind.
13370         (x86_magic_trampoline): Fix build bustage.
13371
13372         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
13373         negative values as well. This is needed for the encoding of the line number
13374         info, since sometimes the line numbers are not in increasing order.
13375
13376 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
13377
13378         * cpu-pentium.md (localloc): Increase the size of the localloc 
13379         instruction since it is a loop under Win32.
13380
13381         * debug-mini.c (record_line_number): Get rid of unneccesary memory
13382         allocation.
13383
13384 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
13385
13386         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
13387         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
13388         Max Horn (max@quendi.de). Fix file names in comments.
13389
13390 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
13391
13392         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
13393         avoid stack overflow.
13394         (replace_usage): Avoid uninitialized variable warnings.
13395
13396         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
13397         and taking the address of valuetype variables.
13398
13399 2004-01-03  Patrik Torstensson
13400
13401         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
13402         for other purposes than FP later on.
13403
13404 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
13405
13406         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
13407         of tail calls.
13408
13409 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
13410
13411         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
13412
13413 2003-12-30  Patrik Torstensson <p@rxc.se>
13414
13415         * mini-x86.h: Decreased number of availiable fp regs.
13416         Solves corner cases with FP spilling.
13417
13418 2003-12-23  Patrik Torstensson <p@rxc.se>
13419
13420         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
13421         for floating point stack tracking / spilling on x86. 
13422         Fixes bug #49012.
13423         
13424         * basic-float.cs: added float mul overflow test.
13425
13426 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
13427
13428         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
13429
13430 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13431
13432         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
13433         supports for cond branches that overflow the immediate
13434         overflow offset. mcs can compile simple programs.
13435
13436 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13437
13438         * exceptions-ppc.c: exception handling support wip:
13439         finally handlers get run on exception.
13440
13441 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
13442
13443         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
13444         profiling.
13445
13446 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
13447
13448         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
13449         initial support for stack walking and unwinding.
13450
13451 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
13452
13453         * driver.c (mono_main): Make corlib-out-of-sync message more 
13454         descriptive. Also remove verify_corlib call.
13455
13456 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
13457
13458         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
13459         not overlap with other call's arguments, too.
13460
13461 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
13462
13463         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
13464         move to arch-specific code the choice of arch-specific
13465         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
13466         * mini.c: ensure emulation calls will not interleave
13467         with other calls.
13468
13469 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
13470
13471         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
13472         the magic trampoline stack frame is dropped before executing
13473         the new method.
13474
13475 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13476
13477         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
13478         and integer to fp conversions. Added support for overflowing
13479         arguments on the stack. Reserve a couple more registers as temps.
13480         Added support for aot compilation (as output still needs to be
13481         tweaked, though).
13482
13483 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13484
13485         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
13486         Don't overwrite return register in some corner cases.
13487
13488 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
13489
13490         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
13491         static constructors when AOT compiling.
13492
13493         * driver.c (mono_main): Call mono_check_corlib_version.
13494
13495 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
13496
13497         * cpu-g4.md, basic.cs: fixed div target register.
13498
13499 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
13500
13501         * mini-ppc.c, basic.cs: shl_imm fix with test.
13502
13503 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
13504
13505         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
13506         structures by value. Misc fixes.
13507         * objects.cs: more tests.
13508
13509 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
13510
13511         * mini-ppc.c: lconv.ovf.i implemented.
13512
13513 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13514
13515         * mini.c:
13516         (mini_init): don't error out if someone already called g_thread_init.
13517
13518 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
13519
13520         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
13521         to be any type per the spec. Fix abnormal memory usage when
13522         the same object is repeatedly thrown.
13523
13524 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
13525
13526         * mini.c: check for overruns in IL code.
13527
13528 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
13529
13530         * TODO: Add/remove some todo entries.
13531
13532 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
13533
13534         * driver.c (mono_main): Call mono_verify_corlib.
13535
13536 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
13537
13538         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
13539         This has been moved to mini.c
13540         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
13541         type being casted is marshalbyref it could be a proxy, so instead of
13542         emitting the type check code, emit a call to a runtime method that will
13543         perform the check by calling CanCastTo if needed.
13544
13545 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
13546
13547         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
13548         methods with large stack frames under Win32.
13549
13550 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
13551
13552         * Makefile.am: Distribute regression tests.
13553
13554         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
13555         at the end instead of inserting each variable into the sorted list.
13556
13557         * linear-scan.c (mono_varlist_sort): New helper function.
13558         
13559 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
13560
13561         * mini.c: ensure arguments and locals are within bounds.
13562
13563 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13564
13565         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
13566         related fixes.
13567
13568 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
13569
13570         * mini.c (mono_cprop_copy_values): Fix crash.
13571
13572         * aot.c: Set verbosity back to 0.
13573         
13574 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
13575
13576         * regalloc.c: complete memory leak fix by Laurent Morichetti
13577         (l_m@pacbell.net).
13578
13579 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
13580
13581         * driver.c (main_thread_handler): Revert the previous patch.
13582
13583         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
13584         under valgrind.
13585
13586         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
13587         memory from the memory pool.
13588
13589         * driver.c (main_thread_handler): Turn on all optimizations when
13590         --aot is used.
13591
13592         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
13593         an array for better performance.
13594
13595         * regalloc.c (mono_regstate_assign): Fix memory leak.
13596
13597         * debug-mini.c (mono_debug_serialize_debug_info): New function to
13598         serialize the debug info.
13599
13600         * debug-mini.c (mono_debug_add_aot_method): New function to load the
13601         debug info from the serialized representation.
13602
13603         * aot.c: Save debug info into the generated file and load it when 
13604         loading a method.
13605
13606         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
13607
13608 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
13609
13610         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
13611         More FP-related fixes.
13612
13613 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
13614
13615         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
13616         and register allocation buglet. Hello world now runs.
13617
13618 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
13619
13620         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
13621         * tramp-ppc.c: fixed class init trampoline.
13622         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
13623
13624 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
13625
13626         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
13627         mini.c: more ppc changes/fixes.
13628
13629 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
13630
13631         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
13632         Also optimize the case when the arguments are the same in the caller 
13633         and in the callee.
13634
13635         * iltests.il: Add tests for tail calls with valuetype arguments.
13636
13637 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
13638
13639         * mini-ppc.c: fixes for struct return type.
13640
13641 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
13642
13643         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
13644         mono_spillvar_offset() to arch-specific code.
13645
13646 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
13647
13648         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
13649
13650 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
13651
13652         * exceptions-x86.c: Fix stack space leaks.
13653         
13654         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
13655         registers from the lmf if the method has save_lmf set.
13656
13657 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
13658
13659         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
13660         of icall wrappers into InvokeInDomain, since these are now per-domain.
13661
13662 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
13663
13664         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
13665         make some opcode emulation and intrinsic ops enabled/disabled 
13666         according to the architecture. More fixes.
13667
13668 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
13669
13670         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
13671
13672 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
13673
13674         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
13675         arch-specific handling for 'this' and struct return type to
13676         arch-specific code.
13677
13678 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13679
13680         * aot.c: prevent divide by zero error when reporting (it happened with
13681         Accessibility.dll).
13682
13683 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
13684
13685         * mini.h (inst_switch): Remove unused macro.
13686
13687 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13688
13689         * aot.c:
13690         (load_aot_module): free 'info->methods' and 'info' properly. No more
13691         "free(): invalid pointer blah" messages when you have an old aot
13692         compiled assembly.
13693
13694 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
13695
13696         * jit-icalls.c, mini.c: Added support for context static fields.
13697
13698 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
13699
13700         * mini.c (mono_method_blittable): Methods which set LastError are not 
13701         blittable either. Fixes #51108.
13702         
13703 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
13704
13705         * mini.c: flush icache.
13706         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
13707
13708 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
13709
13710         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
13711
13712 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
13713
13714         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
13715         safe on IA32.
13716
13717         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
13718         vararg calls.
13719
13720         * inssel.brg (CEE_MKREFANY): Fix AOT case.
13721
13722 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
13723
13724         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
13725         instruction when the result is discarded.
13726
13727         * iltests.il (test_0_div_regalloc): New regression test.
13728
13729         * arrays.cs: Fix compilation error.
13730
13731 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
13732
13733         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
13734         float rules to inssel-x86.brg: sane architectures with FP registers
13735         don't need to implement these rules.
13736
13737 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
13738
13739         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
13740
13741 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
13742
13743         * mini.h, inssel-long32.brg: fixed endianess issues in int64
13744         implementation of 32 bit systems.
13745
13746 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
13747
13748         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
13749         (Jeroen Zwartepoorte).
13750
13751 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
13752
13753         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
13754         the caller and the callee matches.
13755         
13756         * mini.c (mono_method_to_ir): Add comment.
13757
13758         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
13759         signbit is missing on some platforms.
13760
13761 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
13762
13763         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
13764
13765         * mini.c (setup_jit_tls_data): Call the new function.
13766         
13767         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
13768
13769         * mini-x86.c: Add experimental support for fast access to the lmf
13770         structure under NPTL/Linux 2.6.x.
13771
13772 2003-11-06  Martin Baulig  <martin@ximian.com>
13773
13774         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
13775         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
13776         the debugger.
13777
13778 2003-11-02  Martin Baulig  <martin@ximian.com>
13779
13780         * mini.c (inflate_generic_field): New static method.
13781         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
13782         generic instance and the field is declared in a generic type, call
13783         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
13784
13785 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
13786
13787         * mini.h mini.c (mono_method_same_domain): New function to return
13788         whenever the caller and the callee are in the same domain.
13789
13790         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
13791
13792 2003-10-30  Martin Baulig  <martin@ximian.com>
13793
13794         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
13795         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
13796         method parameters.
13797         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
13798         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
13799
13800 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
13801
13802         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
13803         propagation.
13804
13805         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
13806         object here, so it is in the correct appdomain etc.
13807
13808 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
13809
13810         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
13811         already done.
13812         (mono_method_to_ir): Avoid freeing the type created returned from
13813         mono_type_create_from_typespec, since it is put into an internal cache
13814         by the function. Fixes pointer.exe.
13815
13816         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
13817         trampolines for icalls and pinvokes as well. Fixes #33569.
13818
13819 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
13820
13821         * mini.c: Update after appdomain changes.
13822
13823         * mini.c (mono_jit_compile_method_inner): Allways compile native
13824         method wrappers in the root domain, since there can only be one
13825         instance of them, whose address is stored in method->info.
13826
13827 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
13828
13829         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
13830         environment variable. Instead detect automatically whenever running
13831         under valgrind using the magic macro RUNNING_ON_VALGRIND from
13832         valgrind.h.
13833
13834 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
13835
13836         * trace.c, trace.h: New files that implement the new trace option
13837         parsing. 
13838
13839         * driver.c: Document new --trace options.
13840
13841         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
13842         mini-x86.c: Apply:
13843
13844         -       if (mono_jit_trace_calls)
13845         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
13846
13847         * mini.h: prototypes.
13848         
13849 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
13850
13851         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
13852
13853         * mini.c inssel.brg: Implement typedefbyref opcodes.
13854
13855         * mini.c (mono_jit_compile_method): Remove unused local variable.
13856
13857         * mini.c (mono_jit_compile_method_inner): Ditto.
13858         
13859 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
13860
13861         * tramp-x86.c (x86_class_init_trampoline): Fix build.
13862         
13863         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
13864
13865 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
13866
13867         * mini.c (mono_no_aot): Remove unused global variable.
13868
13869         * mini.c: Thread safety fixes.
13870
13871 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
13872
13873         * mini.c (mono_create_class_init_trampoline): Add a lock around
13874         class_init_hash_addr.
13875
13876         * arrays.cs (test_0_newarr_emulation): Add new regression test for
13877         #30073.
13878
13879         * mini.c: Decompose the NEWARR instruction before decomposing its
13880         arguments. Fixes #30073.
13881
13882 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
13883
13884         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
13885         convention.
13886
13887 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
13888
13889         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
13890
13891         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
13892
13893         * driver.c: Add support for compiling icall wrappers to --compile.
13894
13895 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
13896
13897         * inssel.brg: The empty value in class->interface_offsets is -1, not
13898         0. Fixes #49287.
13899
13900 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
13901
13902         * objects.cs: New test for 'is' operator on an array of interfaces.
13903
13904 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13905
13906         * tramp-ppc.c: update trampoline code to support jumps
13907         and class initialization.
13908
13909 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
13910
13911         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
13912
13913         * inssel.brg (OP_UNBOXCAST): Fix #46027.
13914
13915         * inssel.brg (OP_UNBOX): Remove unused rule.
13916
13917         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
13918         region instead of one for each method. Fixes #47813.
13919
13920 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
13921
13922         * exceptions.cs (test_0_nested_finally): New regression test for
13923         nested exception handlers.
13924
13925         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
13926
13927         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
13928
13929         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
13930         inlining.
13931
13932         * mini.c (mono_method_check_inlining): Make the inlining limit 
13933         configurable by an environment variable.
13934         
13935         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
13936
13937         * mini.h: Bump AOT file version.
13938
13939         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
13940         token, store the image along with the token, since the token might not 
13941         refer to the same image as the method containing the relocation, 
13942         because of inlining.
13943
13944 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
13945
13946         * mini.c (mono_precompile_assemblies): New function to compile
13947         all methods in all loaded assemblies.
13948
13949         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
13950
13951         * regalloc.h regalloc.c (MonoRegState): Change the type of 
13952         iassign and fassign to int*, since they can contain large negative
13953         values if the register is spilled. Also added some comments. Fixes
13954         #45817.
13955
13956         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
13957         under Win32. Fixes #42964.
13958
13959 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
13960
13961         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
13962
13963         * aot.c: Added support for AOT compiling methods which contain calls
13964         to wrappers. Currently, only remoting-invoke-with-check wrappers are
13965         handled.
13966         
13967         * driver.c (compile_all_methods): Run the compilation in a thread
13968         managed by mono. Fixes #44023.
13969
13970         * mini.c (mono_codegen): Print full method name in verbose output.
13971
13972         * mini-x86.c (mono_arch_patch_code): Fix warning.
13973         
13974         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
13975         jumps, since the method we are jumping to might be domain-specific.
13976
13977         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
13978
13979 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13980
13981         * inssel.brg: string chars are unsigned.
13982
13983 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
13984
13985         * TODO: New todo item.
13986
13987         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
13988         which calls mono_runtime_class_init and patches the call site to
13989         avoid further calls.
13990         (mono_arch_create_class_init_trampoline): New arch specific function 
13991         to create a class init trampoline.
13992         (create_trampoline_code): Generalized so it can create
13993         class init trampolines as well.
13994
13995         * mini.c (helper_sig_class_init_trampoline): New helper variable.
13996         (mono_create_class_init_trampoline): New function to create and cache
13997         class init trampolines.
13998         (mono_find_class_init_trampoline_by_addr): New function to lookup the
13999         vtable given the address of a class init trampoline. Used by the
14000         patching process.
14001         (mono_codegen): Generate a call to a trampoline instead of
14002         mono_runtime_class_init in LDSFLD[A].
14003         (mono_codegen): Add relocations for the new trampoline.
14004         
14005         * mini.h mini-x86.c aot.c: Added a new relocation type: 
14006         MONO_PATCH_INFO_CLASS_INIT.
14007
14008         * mini.h: Bump AOT version number.
14009
14010         * aot.c: Create a copy of the loaded code instead of using the original
14011         so methods which call each other will be close in memory, improving
14012         cache behaviour.
14013         
14014         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
14015         patch since it breaks the regression tests.
14016         
14017         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
14018         for the register saving instruction sequence since the 
14019         frame_state_for function in glibc 2.3.2 don't seem to detect it.
14020
14021 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
14022
14023         * TODO: Fix todo item && remove another.
14024
14025 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
14026
14027         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
14028         previous checkin.
14029
14030         * aot.c: Moved the check for MONO_LASTAOT into the initialization
14031         function of the module.
14032
14033         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
14034         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
14035         --no-aot command line option.
14036
14037 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
14038
14039         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
14040         by Bernie Solomon (bernard@ugsolutions.com).
14041
14042         * inssel.brg: Refactor the interface offset table related code into
14043         its separate functions and add support for the AOT case.
14044
14045 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
14046
14047         * aot.c (mono_aot_get_method_inner): Fix memory leak.
14048         
14049         * aot.c: Added mono_aot_verbose variable and made all debugging
14050         output depend on the value of this variable.
14051
14052         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
14053         method_label and info_label.
14054
14055         * mini.h mini-x86.c aot.c: Added a new relocation type 
14056         MONO_PATCH_INFO_IID for klass->interface_id.
14057
14058         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
14059         the MonoJitInfo structure.
14060
14061         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
14062         a non-root appdomain in shared mode.
14063
14064 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14065
14066         * aot.c: make aot loader less verbose. Remove free of unused variable.
14067
14068 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
14069
14070         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
14071
14072         * .cvsignore: Added *.dll.
14073
14074         * mini.c (mono_print_tree_nl): New function callable while debugging.
14075
14076         * mini.c (mono_print_code): Export this.
14077
14078         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
14079         patched code.
14080
14081 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
14082
14083         * mini.h (MonoCompile): Added 'jit_info' field.
14084
14085         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
14086         the cfg structure, since it is needed by the AOT compiler.
14087
14088         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14089
14090         * aot.c: A major rewrite. Changes include:
14091         - save exception tables for methods which have them.
14092         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
14093         to g_module_symbol.
14094         - reworked the file format so it is now much smaller and needs
14095         fewer relocation entries.
14096         
14097 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14098
14099         * aot.c (load_aot_module): Fix build bustage on platforms without
14100         Boehm GC.
14101
14102 2003-09-04  Martin Baulig  <martin@ximian.com>
14103
14104         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
14105
14106 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14107
14108         * TODO: Some new optimization ideas.
14109
14110         * aot.c: Move AOT module loading logic here from mono_assembly_open.
14111
14112         * aot.c: Save the optimization flags used to compile the code into
14113         the AOT module.
14114
14115         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
14116         support emitting domain specific code.
14117         
14118         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
14119         no longer domain neutral. It can be made domain neutral by compiling 
14120         with --optimize=shared.
14121
14122         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
14123         between appdomains.
14124
14125         * driver.c mini.h mini.c: New --no-aot debugging option which disables
14126         loading of AOT code.
14127
14128         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
14129         
14130         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
14131         if there is no domain neutrality information.
14132
14133 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
14134
14135         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
14136         format version into the generated library.
14137
14138         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
14139         callee method into the caller since one of them could be shared.
14140
14141         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
14142         system exceptions from AOT code now works.
14143
14144         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
14145         method if it is domain neutral and the callee is not.
14146
14147         * graph.c (cfg_emit_one_loop_level): Fix warning.
14148
14149 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
14150
14151         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
14152         last checkin.
14153
14154 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
14155
14156         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
14157         is needed  by code which is executed before mono_runtime_init ().
14158         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
14159         
14160         * mini.c (mono_thread_abort): Fix warning.
14161         (mono_jit_compile_method): Call static constructor in the AOT case too.
14162
14163         * aot.c (mono_compile_assembly): Fix warning.
14164
14165 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14166
14167         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
14168
14169 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
14170
14171         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
14172
14173         * cpu-pentium.md: Fix the length of call opcodes so they include the
14174         ESP restoring instruction. Fixes #47968.
14175
14176 2003-08-28  Martin Baulig  <martin@ximian.com>
14177
14178         * mini-x86.c (mono_arch_call_opcode): Added support for
14179         MONO_TYPE_GENERICINST.
14180
14181         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
14182
14183 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
14184
14185         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
14186         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
14187
14188         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
14189         metadata_section.
14190
14191 2003-08-26  Martin Baulig  <martin@ximian.com>
14192
14193         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
14194         when reporting an error, set this to the actual error location.
14195         (mono_method_to_ir): Report the correct error location if
14196         get_basic_blocks() returned an error.
14197
14198 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
14199
14200         * mini.c (mono_type_blittable): OBJECT is not blittable.
14201         (mono_method_blittable): Methods which have marshalling descriptors
14202         are not blittable either. Fixes #47842.
14203
14204 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
14205
14206         * driver.c mini.c: Use an environment variable instead of a global 
14207         variable. Also fix the build.
14208
14209         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
14210         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
14211         reporting this. 
14212
14213         * driver.c mini.c: Added --with-valgrind option to turn off some
14214         code which prevents mono from running under valgrind.
14215
14216         * mini.c (mono_emit_call_args): Fixed warning.
14217
14218         * mini.c (mono_emulate_opcode): Fixed warning.
14219
14220 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14221
14222         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
14223         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
14224         regalloc.c, regalloc.h: specify available registers in arch-specific
14225         code and support floats in the regallocator (patch by Laurent Morichetti 
14226         <l_m@pacbell.net>)
14227
14228 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14229
14230         * mini.c: mono_thread_current() can be called only after
14231         mono_runtime_init(): rearrange code to not call it early on.
14232
14233 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14234
14235         * mini.c: allocate jump tables in the code mempools.
14236
14237 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14238
14239         * mini.c, mini.h: make sure per-thread data allocated by the jit is
14240         freed.
14241
14242 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
14243
14244         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
14245         12 to 16.  This fixes bug #47453.
14246
14247
14248 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14249
14250         * mini-ppc.c: fixed indexed load and unsigned compares.
14251
14252 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
14253
14254         * mini.c: reenabled installation of handler for
14255           thread abort signal.
14256
14257 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14258
14259         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
14260         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
14261         until it's fixed and actually useful.
14262
14263 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14264
14265         * inssel-long32.brg: couple more opcodes implemented.
14266
14267 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
14268         
14269         * mini-sparc.c: Even more opcodes implemeted.
14270
14271 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
14272
14273         * mini-sparc.c: More opcodes implemented.
14274
14275 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
14276
14277         * mini-sparc.c: More opcodes implemented.
14278
14279 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
14280
14281         * inssel-sparc.brg: Add some needed rules.  Direct
14282         copy from PPC.
14283         * Makefile.am: Use inssel-sparc.brg
14284         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
14285         an assert happy for now.
14286
14287 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
14288
14289         * mini-sparc.c: Fixed compile errors.
14290         * exceptions-sparc.c: Same.  We now produce a mono binary 
14291         on sparc-linux.  Yea.
14292
14293 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
14294
14295         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
14296         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
14297         They compile, but do not work.
14298
14299 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14300
14301         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
14302         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
14303         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
14304         (ct@gentoo.org).
14305
14306 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14307
14308         * mini.c: more opcodes implemented and better support for generics.
14309
14310 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
14311
14312         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
14313         * mini.c, mini.h: first cut at generics support: some new instructions 
14314         added and changed the behaviour of some of the existing ones.
14315
14316 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
14317
14318         * mini.c: Removed definition of metadata_shared mutex here.
14319
14320 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
14321
14322         * mini-x86.c: make vararg calls work for instance methods.
14323
14324 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
14325
14326         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
14327         returns the arguments in a separte list, now.
14328
14329 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14330
14331         * aot.c, mini.c: updates for array type representation changes.
14332
14333 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
14334
14335         * mini.c: register function to perform jit shutdown.
14336
14337 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14338
14339         * mini.c: use a faster allocator if possible.
14340
14341 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14342
14343         * aot.c: some cleanups and portability changes.
14344
14345 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14346
14347         * mini.c: use faster allocation for CEE_BOX if possible.
14348
14349 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
14350
14351         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
14352         Moved inlined mempcy code to its own function so that is can be
14353         reused. Added an inline memset function as well (optimized initobj).
14354         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
14355
14356 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14357
14358         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
14359
14360 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14361
14362         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
14363         arch code can setup the cpu for CLR execution, if needed.
14364         We use it on x86 to set the precision of FP operations.
14365
14366 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14367
14368         * mini.c: disable some optimizations if we can guess they'll cost too
14369         much for a given method.
14370
14371 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14372
14373         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
14374         
14375 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14376         * mini.h mini.c mini-x86.c: Added instruction level coverage 
14377         info collection support.
14378
14379 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14380
14381         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
14382         is now implemented in the profiling API. Get rid of a couple of
14383         unnecessary global variables.
14384
14385 2003-06-15  Nick Drochak <ndrochak@gol.com>
14386
14387         * basic-long.cs: tests for negative values for bigmul, and unsigned.
14388         * cpu-g4.md: add op_bigmul and op_bigmul_un
14389         * cpu_pentium.md: add op_bigmul_un
14390         * inssel-long32.brg: add rule for unsigned bigmul
14391         * mini-ops.h: define OP_BIGMUL_UN
14392         * mini-x86.c: THE BUG: handle (un)signed properly
14393         * mini.c: choose unsigned opcode if needed.
14394         This set of patches fixes bug #44291
14395
14396 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
14397
14398         * mini.c (optimize_branches): improved to handle all kinds of
14399         conditional branches.
14400
14401 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14402
14403         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
14404         don't raise exceptions.
14405
14406 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14407
14408         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
14409         to arch-specific files.
14410
14411 2003-06-09  Martin Baulig  <martin@ximian.com>
14412
14413         * Makefile.am (libs): Added $(LIBGC_LIBS).
14414
14415 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
14416
14417         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
14418         and OP_ATAN (fixes bug#44293).
14419
14420 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
14421
14422         * Makefile.am, mini-x86.c: rename cpu description array to
14423         pentium_desc, since some compilers define the 'pentium' preprocessor
14424         symbol.
14425
14426 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
14427
14428         * mini.c (mini_select_instructions): add explicit branch if the
14429         following block is not the false target of a conditional branch -
14430         we need this with any optimization that reorder or remove bblocks
14431
14432         * mini.c (optimize_branches): bug fixes
14433
14434 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
14435
14436         * mini.c (mono_method_to_ir): inline static readonly fields
14437
14438         * ssa.c (fold_tree): start cfold support for long (very simple
14439         cases only)
14440
14441         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
14442
14443 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14444
14445         * inssel.brg: fixed memcpy (bug #44219).
14446
14447 2003-06-05  Dick Porter  <dick@ximian.com>
14448
14449         * driver.c: Set the glib log levels to not abort if g_message
14450         recurses.
14451
14452         g_set_prgname() has to happen before mini_init() so that the
14453         process handle gets the info.
14454         
14455 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14456
14457         * driver.c: add intrins to the default optimizations to get wider
14458         exposure.
14459
14460 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14461
14462         * mini.h: some large basic blocks will overflow a 16-bit
14463         integers for symbolic registers.
14464
14465 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
14466
14467         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
14468         (mono_arch_output_basic_block): fix bug 43499 
14469
14470 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14471
14472         * mini.c: kill duplicated definition of mono_debug_format.
14473
14474 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
14475
14476         * mini-x86.c, arrays.cs: fixed register allocation bug.
14477
14478 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
14479
14480         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
14481
14482         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
14483
14484 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14485
14486         * mini.c:
14487         (print_method_from_ip): also print source location information if
14488         available.
14489
14490 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
14491
14492         * mini.c (mono_find_block_region): bug fix in region code
14493         (mini_method_compile): enable removing unreachable code again, but
14494         only in methods without exception clauses.
14495
14496 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
14497
14498         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
14499         Implemented arglist opcode and handling of TypedReference type.
14500         Fixed x86 call convention when a structure is returned.
14501         Minimal support for calling static vararg methods.
14502
14503 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
14504
14505         * mini.c (mini_method_compile):  always remove unreachable code,
14506         because the code in them may be inconsistent  (access to dead
14507         variables for example).
14508
14509 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14510
14511         * driver.c, debug-mini.c: warning fixes.
14512
14513 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
14514
14515         * Makefile.am, jit.h, mini.h: install header for embedding mono.
14516
14517 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
14518
14519         * mini.c: thread-static fields are registered in mono_class_vtable(),
14520         so ensure the function is called before checking for them.
14521
14522 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
14523
14524         * mini.c (optimize_branches): fix for bug 43586
14525
14526         * jit-icalls.c (mono_llmult_ovf): added an additional check for
14527         overflow (fixes Bug #43639)
14528
14529 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14530
14531         * mini.c, objects.cs: allow the use of stobj for primitive types.
14532
14533 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14534
14535         * mini.c: be less strict about argument checking until we support
14536         running the verifier.
14537
14538 2003-05-27  Nick Drochak <ndrochak@gol.com>
14539
14540         * basic-long.cs: tests for (ulong)int * (ulong)int also
14541         * mini.c: use the same trick for (ulong)int * (ulong)int
14542
14543 2003-05-27  Nick Drochak <ndrochak@gol.com>
14544
14545         * basic-long.cs: add regression test for (long)int * (long)int
14546         * cpu-pentium.md: add op_bigmul specification
14547         * inssel-long32.brg: add OP_BIGMUL rule
14548         * mini-ops.h: add OP_BIGMUL
14549         * mini-x86.c: register allocator: handle case where src1 needs to be
14550         in EAX.
14551         * mini.c: substitute special BIGMUL opcode in the tree for 
14552         (long)int * (long)int
14553
14554 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
14555
14556         * jit-icalls.c: call the type ctor on field access if needed.
14557
14558 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14559
14560         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
14561         to a method (including results of ldelema, bug#43207).
14562
14563 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
14564
14565         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
14566         colors to show exception handler blocks.
14567
14568         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
14569         (fix for pinvoke7.cs).
14570
14571 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14572
14573         * mini.h, mini.c: ensure correct initialization order for types that
14574         require it. Prepare for lazy compilation of jit icall wrappers.
14575         Provide a name for opcode emulation to reduce unneeded mallocing.
14576
14577 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
14578
14579         * mini-x86.c: better register restoring code and profiling
14580         support for tail calls.
14581
14582 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14583
14584         * mini.h, driver.c: prepare for leaf methods optimization.
14585
14586 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14587
14588         * mini.c: get targets of branches before converting a method.
14589
14590 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
14591
14592         * mini.c (optimize_branches): added some experimental code (disbaled) 
14593
14594 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
14595
14596         * mini.c (optimize_branches): fix branch to branch optimization 
14597
14598         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
14599
14600         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
14601
14602         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
14603
14604         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
14605         if needed.
14606
14607 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
14608
14609         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
14610         enable use of interface variables again.
14611
14612         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
14613         I1 to registers because there is no simply way to sign extend 8bit
14614         quantities in caller saved registers on x86.
14615
14616         * inssel-float.brg: set costs of some rules to 2 so
14617         that monobure always select the arch. specific ones if supplied,
14618         regardless of the order we pass the files to monoburg.
14619
14620 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
14621
14622         * mini.c, mini-x86.c: since the magic trampoline for jumps
14623         can't patch the code directly, we do it as soon as the
14624         method gets compiled.
14625
14626 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14627
14628         * mini-x86.c, mini.h: introduce a new patching method
14629         to support CEE_JMP and tail calls.
14630         * mini.c: obey tail.call. Don't precompile methods target
14631         of CEE_JMP.
14632         * tramp-x86.c: new trampoline code to handle methods
14633         reached through a jump.
14634
14635 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
14636
14637         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
14638         bit values to registers
14639
14640 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
14641
14642         * mini.c (mono_compile_get_interface_var): share interface
14643         variables if possible.
14644
14645 2003-05-16  Martin Baulig  <martin@ximian.com>
14646
14647         * debug-mini.c (mono_init_debugger): New function to initialize
14648         the debugger.  This is not in the debugger since it needs to
14649         access some of mini's internals.
14650
14651 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
14652
14653         * mini.c (mono_method_to_ir): inlining fixes/cleanups
14654
14655 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
14656
14657         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
14658         for value type handling.
14659
14660 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
14661
14662         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
14663         (mono_method_check_inlining): enable inlining of all kinds of wrappers
14664
14665 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
14666
14667         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
14668           the constructor through a proxy.
14669
14670 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14671
14672         * jit-icalls.c, inssel.brg: fixes to array element address
14673         calculations.
14674
14675 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
14676
14677         * mini-x86.c (is_regsize_var): allocate pointer to registers
14678
14679 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14680
14681         * driver.c: fixed typo, added intrins to the set of optimizations
14682         tested with regressions.
14683
14684 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14685
14686         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
14687         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
14688         test case.
14689
14690 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
14691
14692         * inssel.brg: remove some common pop instructions without side effects
14693
14694 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14695
14696         * inssel-x86.brg: fixed thinko in int to double conversions.
14697
14698 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
14699
14700         * mini.c, jit-icalls.c: added runtime thread-static variable support.
14701
14702 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14703
14704         * inssel-long32.brg: two more missing instructions.
14705
14706 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
14707
14708         * mini.c (mono_emit_call_args): set the cil_code for all arguments
14709         if not already set.
14710
14711 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
14712
14713         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
14714         correctly.
14715
14716         * basic-float.cs: Added tests for negative zero.
14717
14718 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14719
14720         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
14721         a couple of missing operations for long casts, with test cases.
14722
14723 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14724
14725         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
14726
14727 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
14728
14729         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
14730         code size estimation.
14731
14732 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
14733
14734         * mini.c (mono_jit_create_remoting_trampoline): make it work with
14735         abstract methods (fix bug 42542)
14736
14737         * aot.c: add ability to handle array types
14738         
14739 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
14740
14741         * mini.c: Call the _specific versions of the object allocation
14742         functions if possible.
14743
14744 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
14745
14746         * driver.c: call setlocale ().
14747
14748 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14749
14750         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
14751         windows build.
14752
14753 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
14754
14755         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
14756
14757         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
14758         wrappers (fix bug 42122)
14759
14760 2003-05-04  Martin Baulig  <martin@ximian.com>
14761
14762         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
14763
14764         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
14765         s/mini_set_defaults/mono_set_defaults/g.
14766
14767 2003-05-04  Martin Baulig  <martin@ximian.com>
14768
14769         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
14770
14771 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14772
14773         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
14774         (reported by Don Roberts).
14775
14776 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
14777
14778         * mini.c: temporarily work around two bugs for this release.
14779
14780 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14781
14782         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
14783         that contains -export-dynamic and it makes using the ld script
14784         useless.
14785         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
14786
14787 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14788
14789         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
14790         specific cpu.
14791
14792 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14793
14794         * mini.c: make sure leave calls all the needed finally blocks,
14795         even when the target jumps out of multiple exception clauses.
14796
14797 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14798
14799         * ldscript, Makefile.am: add linker script to reduce the number of
14800         exported symbols (should also fix the issues with libwine defining
14801         some of the same symbols in io-layer).
14802
14803 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
14804
14805         * driver.c (mini_main): Avoid assertion when no file name is given on 
14806         the command line.
14807
14808 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
14809
14810         * driver.c: added --version/-V command line option.
14811         Added the inline optimization in the regression tests.
14812
14813 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14814
14815         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
14816         to the type in the method signature (fixes bug#42134).
14817
14818 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
14819
14820         * mini.c: when inlining, check this is not null only when needed (bug #42135).
14821
14822 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
14823
14824         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
14825
14826 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14827
14828         * driver.c: fixed bug #42100.
14829
14830 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
14831
14832         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
14833
14834 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
14835
14836         * mini.c: moved most of the code required to do inlining to its own
14837         function so it can be reused. Inline also ctors if appropriate.
14838
14839 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
14840
14841         * Makefile.am: Link with -export-dynamic so shared libs loaded by
14842         the runtime can call mono API functions.
14843
14844 2003-04-27  Martin Baulig  <martin@ximian.com>
14845
14846         * debug-mini.c (mono_debug_init_method): Added
14847         `guint32 breakpoint_id' argument; if the method has a breakpoint,
14848         send a notification to the debugger.
14849
14850         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
14851         running in the Mono Debugger, just pass the breakpoint number to
14852         mono_debug_init_method().
14853
14854         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
14855
14856 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
14857
14858         * mini.c: allow some more unsafe compares.
14859
14860 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14861
14862         * mini-x86.c, Makefile.am: make distcheck works (partially from
14863         a patch by Richard Lee <r.h.lee@attbi.com>).
14864         * regset.c, regset.h: removed, they are unused.
14865
14866 2003-04-25  Dick Porter  <dick@ximian.com>
14867
14868         * driver.c: Usage reports the name as 'mono' not 'mini'
14869         * exceptions-x86.c: Build and run on freebsd
14870
14871 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
14872
14873         * Makefile.am: install the program with the 'mono' name and
14874         the library as libmono instead of mini and libmini.
14875
14876 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14877
14878         * driver.c: provide the APIs for the embedding interface of the old jit.
14879
14880 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
14881
14882         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
14883
14884 2003-04-23  Martin Baulig  <martin@ximian.com>
14885
14886         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
14887
14888         * driver.c: Added `--debug' command line argument to enable
14889         debugging support.
14890
14891 2003-04-23  Martin Baulig  <martin@ximian.com>
14892
14893         * debug.[ch]: Removed.  The code is now in
14894         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
14895
14896         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
14897         last six months.
14898
14899 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
14900
14901         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
14902
14903 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14904
14905         * mini.c:
14906         (mini_cleanup): moved mono_runtime_cleanup call after the call to
14907         mono_domain_finalize.
14908         (mini_method_compile): use mono_method_profile* if the the option is
14909         enabled.
14910
14911 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
14912
14913         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
14914         methods with their wrapper.
14915
14916         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
14917         methods with their wrapper.
14918
14919         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
14920         their wrapper.
14921
14922         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
14923         wrapper.
14924
14925         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
14926         methods.
14927
14928 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
14929
14930         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
14931
14932 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
14933
14934         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
14935         of the mempool. This is slightly faster and uses less memory
14936
14937 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14938
14939         * mini.c: avoid O(n) allocation for variables.
14940
14941 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14942
14943         * mini.c: handle items on the stack after inlining methods.
14944
14945 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14946
14947         * mini.c: make the method->opcode optimization dependent
14948         on MONO_OPT_INSTRINS and do it lazily.
14949
14950 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14951
14952         * driver.c: print overall results at the end of regression run.
14953
14954 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
14955
14956         * inssel.brg: don't overwrite symbolic registers.
14957
14958 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
14959
14960         * inssel-x86.brg: fix conversion from long to float.
14961
14962 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
14963
14964         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
14965
14966 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
14967
14968         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
14969
14970         * driver.c: Added --print-vtable option as in the old JIT.
14971
14972 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14973
14974         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
14975
14976 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
14977
14978         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
14979
14980 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
14981
14982         * mini.c regalloc.c regalloc.h: Fix memory leak.
14983
14984 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
14985
14986         * aot.c (mono_aot_get_method): register all used strings
14987
14988 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14989
14990         * mini.c: always intern strings references with ldstr at compile time.
14991
14992 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14993
14994         * Makefile.am: add BUILT_SOURCES.
14995
14996 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
14997
14998         * driver.c: give a better error message when the assembly to execute
14999         doesn't have an entry point.
15000
15001 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
15002
15003         * Makefile.am: added hack for automake
15004
15005         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
15006         correct sematics.
15007
15008         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
15009
15010 22003-04-07  Martin Baulig  <martin@ximian.com>
15011
15012         * Makefile.am: Added Makefile.am.
15013
15014         * debugger-main.c: Removed, this is now in the debugger where it
15015         belongs.
15016
15017         * mini.pc.in: Call this package `mini' for the moment.
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031