2008-08-18 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
2
3         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
4         as it crashes on the 2.0 mscorlib.
5
6         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
7         to cause crashes.
8         
9         * aot-compiler.c: Use is_plt_patch () in a few additional places.
10         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
11         by IMT.
12
13         * aot-compiler.c: Reorganize the got handling code to be a bit more
14         understandable.
15
16 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
17
18         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
19         mono_patch_info_equals/hash, and use it to massively simplify
20         get_plt_index ().
21
22         * mini.c (mono_patch_info_hash): Simplify this and add support for
23         more patch types.
24
25         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
26
27         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
28         handling code, since an offset is not enough to identify a trampoline.
29
30         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
31
32 2008-08-17  Mark Probst  <mark.probst@gmail.com>
33
34         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
35
36         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
37
38         * mini-ops.h: Argument and result types for OVF_CARRY ops.
39
40         * decompose.c: PPC decompositions for various ops.
41
42         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
43
44 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
45
46         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
47         call the generic trampoline code using a call, instead of a jump, to
48         remove some special casing from the generic trampoline code.
49
50         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
51         (mono_codegen): Ditto.
52
53         * aot-compiler.c aot-runtime.c: Ditto.
54
55         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
56
57         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
58         helper function to find the offset corresponding to a lazy fetch trampoline.
59
60         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
61         when doing generic sharing.
62
63         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
64         places.
65         
66         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
67         mini-trampolines.c to be with the other trampoline creation functions.
68
69         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
70         as it is equal to method->signature in most cases, add a 
71         mono_emit_method_call_full variant which takes a signature and an imt
72         argument as well.
73
74 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
75
76         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
77         to this function, since it could be computed easily from the method 
78         argument.
79         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
80         more.
81
82         * method-to-ir.c mini.c: Remove references to 
83         compile_generic_method_wo_context.
84
85         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
86         generic method calls.
87         
88         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
89         dimensional non-szarrays.
90
91         * mini.c (mini_init): Register mono_array_new_1.
92
93         * jit-icalls.c (mono_array_new_1): New jit icall.
94
95         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
96         pointing to the method.
97
98         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
99         method addresses belonging to METHOD_JUMP patches in the 
100         jump_target_got_slot_hash.
101         (mono_aot_load_method): Ditto.
102
103         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
104         METHOD_JUMP patches.
105
106         * mini.c (mini_create_jit_domain_info): New helper function which 
107         initializes/frees domain->runtime_info.
108         (mini_free_jit_domain_info): Ditto.
109         (mini_init): Install the domain hook functions with the runtime.
110
111         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
112         information maintained by the JIT.
113
114         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
115         insertion into jump_table_hash into mono_codegen (), also implement proper
116         locking.
117
118         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
119         tail calls, it is already done by the aot code.
120         
121         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
122         mechanism on amd64.
123
124         * iltests.il.in: Make the jmp test a bit more complex.
125
126         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
127         generic instances which doesn't have a token.
128
129         * aot-runtime.c (decode_method_ref): Ditto.
130         
131         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
132         can handle this case now.
133         (handle_box): Ditto.
134
135 2008-08-15  Geoff Norton  <gnorton@novell.com>
136
137         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
138         debugging check.
139
140 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
141
142         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
143         calling generic methods.
144
145         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
146
147         * aot-runtime.c (decode_patch_info): Ditto.
148
149         * mini.c (mono_resolve_patch_target): Ditto.
150         
151         * patch-info.h: Add METHOD_RGCTX.
152
153         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
154
155 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
156
157         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
158         arguments in registers.
159
160         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
161         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
162
163         * mini.c (mini_method_compile): Abort aot compilation for generic
164         methods if generic sharing is disabled.
165         
166         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
167         an mrgctx.
168
169         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
170         requiring an mrgctx.
171
172         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
173         store instructions when converting a vcall to a normal call.
174
175         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
176         mono_arch_find_jit_info.
177
178 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
179
180         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
181         avoid calling mono_method_full_name () for every method even if the
182         env var is not set.
183         (check_inline_caller_method_name_limit): Ditto.
184
185 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
186
187         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
188         assemblies in one run.
189
190         * aot-compiler.c (mono_compile_assembly): Only print out a count of
191         skipped methods if it is not 0.
192
193         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
194
195 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
196
197         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
198           MONO_ARCH_HAVE_UNWIND_TABLE.
199
200         Contributed under MIT/X11 license.
201
202 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
203
204         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
205           from default optimizaton list on Winx64.
206
207         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
208
209         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
210           the LMF from the MonoJitTlsData structure.
211
212         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
213
214         Contributed under MIT/X11 license.
215
216 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
217
218         * mini.c (sigsegv_signal_handler): Fix the build.
219
220         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
221         assembly->aot_module.
222
223         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
224         hash table. This simplifies and speeds up a lot of code, and fixes support
225         for .netmodules.
226
227         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
228         with the runtime.
229
230         * mini-exceptions.c: Ditto.
231         
232         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
233         'native_offset' argument, since these are computed in the 
234         mono_find_jit_info () function.
235
236         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
237         is used by exceptions-ppc.c.
238
239         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
240         mono_arch_find_jit_info ().
241         
242         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
243         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
244         generic code in mini-exceptions.c.
245
246 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
247
248         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
249
250         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
251         
252         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
253         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
254         called while holding the loader lock. Fixes #415608.
255         (mono_aot_get_method_from_token_inner): Ditto.
256
257 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
258
259         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
260         to reduce differences between this and the generic implementation in
261         mini-exceptions.c.
262         (ves_icall_get_frame_info): Ditto.
263
264         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
265
266         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
267         longer neccesarry.
268
269         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
270         mono_arch_get_call_filter () and make it non-static, for consistency with the
271         other architectures.
272
273 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
274
275         * mini.c:
276         * local-propagation.c:
277         * mini-x86.c: Correct the name of arch defines.
278
279 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
280
281         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
282         NO_EMULATE_LONG_SHIFT_OPS define.
283
284 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
285
286         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
287         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
288
289         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
290         MACH fixes. Merged from the 2.0 branch.
291
292         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
293
294         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
295         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
296
297         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
298
299         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
300         mono_marshal_get_native_wrapper () signature changes.
301
302 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
303
304         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
305         conversion bug under arm.
306
307 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
308
309         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
310
311         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
312         with overflow checking.
313
314 2008-08-05  Marek Habersack  <mhabersack@novell.com>
315
316         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
317         to the genmdesc.pl file
318
319 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
320
321         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
322         arg_array in the soft-float versions of the LOAD/STORE macros.
323
324         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
325         implementation.
326
327         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
328
329 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
330
331         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
332         a float HFA. Fixes #413621.
333
334 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
335
336         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
337         frame_size to args_size. Fixes build.
338
339 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
340
341         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
342         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
343
344         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
345         the stack are not unaligned. Fixes #413247.
346         
347 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
348
349         * mini.c: update jitted methods performance counters.
350
351 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
352
353         * mini-exceptions.c: increase the exceptions thrown performance
354         counter in mono_handle_exception ().
355
356 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
357
358         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
359         can work with netmodules.
360
361 2008-07-28  Geoff Norton  <gnorton@novell.com>
362
363         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
364         regression tests.
365
366 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
367
368         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
369         correct place.
370
371 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
372
373         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
374           The float param registers and other param registers must be the 
375           same index on Windows x64.
376
377         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
378           ArgValuetypeAddrInIReg argument case.  Setting the argument
379           op to OP_VTARG_ADDR (OP_REGOFFSET)).
380
381         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
382           variable computed above as the copy length for arguments of storage
383           type ArgValuetypeAddrInIReg.
384
385         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
386           ArgValuetypeAddrInIReg argument case.  This case will rely on
387           mono_arch_emit_outarg_vt to emit the correct code later in the process.
388
389         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
390           a 32 byte stack allocation for all calls.  We will omit the adjustment for
391           jump and tail call instructoins as they do not follow the typical call behavior.
392
393         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
394           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
395           local variable and pass the local variable by reference to the called method.
396
397         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
398           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
399           of a struct is passed in a register it must be saved with the other
400           volatile argument on the stack.
401
402         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
403           frame pointer the stack adjustment value must be saved to the unwind 
404           info structure.
405
406         Contributed under MIT/X11 license.
407
408 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
409
410         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
411         which got lost in the merge.
412
413 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
414
415         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
416         build.
417
418         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
419         
420         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
421         icalls, since they won't be patched.
422
423         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
424         different code sequence when running under valgrind to prevent some valgrind
425         errors.
426
427         * iltests.il.in: Add new regression test.
428
429         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
430         end with a throw.
431
432         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
433         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
434
435         * iltests.il.in: Add new test.
436
437         * aot-compiler.c: Fix some warnings.
438
439         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
440         Fixes #412494.
441
442 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
443
444         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
445         (mini_usage_jitdeveloper): Add a missing --wapi option.
446
447 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
448
449         * mini-codegen.c: Simplify the is_fp macros.
450         (free_up_ireg): Remove, use free_up_reg instead.
451         (free_up_reg): Fix the fp case.
452
453 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
454
455         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
456         lowered earlier.
457
458         * exceptions-x86.c: Merge some changes which seemed to have got lost
459         in the linear-ir merge.
460
461         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
462
463         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
464         long vreg volatile even if the variable was already created.
465
466         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
467         volatile variables.
468
469 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
470
471         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
472
473         * mini.c (mono_jit_compile_method_inner): Add support for 
474         MONO_EXCEPTION_BAD_IMAGE.
475
476         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
477         mini_method_get_context () returns NULL. Fixes #356531.
478
479         * mini.c (mono_method_to_ir): Ditto.
480         
481         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
482         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
483
484 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
485
486         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
487         in the LDFTN implementation.
488
489 2008-07-25  Mark Probst  <mark.probst@gmail.com>
490
491         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
492         code, patch calls to icalls, too, even if they're not in the
493         shared generic code hash.  Fixes #411962.
494
495 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
496
497         * cpu-x86.md: Increase the length of the fcall opcodes.
498
499         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
500         calls returning floats.
501
502         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
503         on NEWARR.
504         
505         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
506         missed earlier.
507
508         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
509         into the domain->method_code_hash.
510
511         * aot-compiler.c: Fix win32 build.
512
513         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
514         
515         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
516         gshared NEWARR implementation.
517
518         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
519
520         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
521         can be used outside of method_to_ir.
522
523         * mini.h (MonoCompile): Add arg_types field.
524
525         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
526         
527         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
528         the values of the local arg_array and param_types array.
529
530 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
531
532         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
533         got accesses might only get generated later when NEWOBJ is decomposed.
534         
535         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
536         looking up the native code of the target method when a delegate is called
537         for the first time.
538
539         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
540         optimization.
541
542         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
543
544         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
545         AOT work on platforms without a working dlsym implementation.
546
547         * mini.h: Bump AOT image format version.
548         
549 2008-07-24  Mark Probst  <mark.probst@gmail.com>
550
551         * mini-exceptions.c: Free a MonoType with
552         mono_metadata_free_type() instead of g_free().
553
554         * aot-runtime.c: Free a MonoType.
555
556 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
557
558         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
559         optimization.
560
561         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
562         fp stack on x86.
563
564 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
565         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
566         profiler hook.
567
568 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
569
570         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
571         NEWOBJ calls on valuetypes.
572
573         * iltests.il.in: Add new test.
574
575         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
576
577 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
578
579         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
580         is no longer needed.
581
582         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
583         non register sized integer arguments.
584         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
585         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
586         emit_memcpy2 ().
587
588         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
589         CEE_MONO_RETOBJ.
590         
591         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
592         two a binop with different sized arguments is emitted.
593
594         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
595         instruction in the ins==NULL case.
596
597 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
598
599         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
600
601         * mini-x86.c: Fix osx build.
602
603         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
604         opcodes as well.
605
606         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
607         instruction for non int sized variables.
608
609         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
610         implementation.
611
612 2008-07-23  Robert Jordan  <robertj@gmx.net>
613
614         * method-to-ir.c: Fix MSVC build.
615
616 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
617
618         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
619         a non int sized type, widen it to an int since newer versions of gcc seem to
620         generate code which needs this.
621
622         * ssa2.c abcremoval2.c: Fix warnings.
623
624         * *: Merge the Linear IR branch.
625
626         The original branch is at trunk/branches/vargaz/mini-linear-il, and
627         the ChangeLog file there describes all the changes done over the years. 
628         Further documentation can be found at www.mono-project.com/Linear_IL.
629
630 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
631
632         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
633           The float param registers and other param registers must be the 
634           same index on Windows x64.
635
636         Contributed under MIT/X11 license.
637
638 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
639
640         * mini.c: Make the previous fix GC safe.
641
642 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
643
644         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
645
646 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
647
648         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
649           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
650           ArgValuetypeAddrInIReg instead.
651
652         Contributed under MIT/X11 license.
653
654 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
655
656         * mini-codegen.c (get_register_spilling): Fix a warning.
657
658 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
659
660         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
661         for types which the initialization fails. Raises the provided exception
662         at the right stop after cleanup.
663
664 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
665
666         * aot-compiler.c: Free most of the memory allocated during compilation.
667
668         * mini.c (mini_parse_debug_options): Fix a leak.
669         
670         * mini.c (mini_method_compile): Don't add the method to the jit info tables
671         during aot compilation.
672
673 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
674
675         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
676         it has too much register pressure.
677
678 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
679
680         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
681
682 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
683
684         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
685         on x86.
686
687         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
688         on amd64 similar to the way it is done on arm.
689
690         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
691
692         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
693         consistency, normalize error messages, avoid loading aot-only modules in
694         normal mode.
695
696         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
697         for consistency.
698
699         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
700
701 2008-07-11  Martin Baulig  <martin@ximian.com>
702
703         * debug-debugger.h
704         (MonoDebuggerInfo): Add `interruption_request'.
705
706 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
707
708         * aot-compiler.c (emit_plt): Remove some dead code.
709
710         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
711
712         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
713         return the plt info offset belonging to a given plt entry.
714
715         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
716         mono_aot_get_plt_info_offset.
717         
718         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
719         similar to the amd64 code by makeing jumps through a separate jump table 
720         instead of embedding the jump addresses into the code.
721
722 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
723
724         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
725         method.
726
727 2008-07-10  Martin Baulig  <martin@ximian.com>
728
729         * mini.c (mini_method_compile): Disable generics sharing when
730         running in the debugger.
731
732 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
733
734         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
735
736         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
737         the local register allocator from running out of registers on x86 when 
738         using aot.
739
740 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
741
742         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
743         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
744         C4146.
745
746         Contributed under MIT/X11 license.
747
748 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
749
750         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
751         speed up the assembler.
752
753 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
754
755         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
756         support.
757
758         * mini.c: Move the soft float handling macros a bit earlier, add 
759         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
760         place.
761
762         * mini.h: Add prototype for mono_arch_fixup_jinfo.
763
764         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
765         read-only to help catch code allocation requests.
766         
767         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
768         and turn it off when using --aot-only or when compiling with --aot=full.
769
770         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
771         jump table for switches from the normal domain mempool, not the code
772         manager.
773
774         * mini-trampolines.c (get_unbox_trampoline): New function to return an
775         unbox trampoline which handles aot-only mode too.
776
777         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
778         an AOTed unbox trampoline.
779
780         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
781
782 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
783
784         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
785         ""
786
787         Contributed under MIT/X11 license.
788
789 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
790
791         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
792           the unwind information for the method at the end of the allocated block.
793           
794         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
795           MonoCompileArch to hold the unwind info for SEH on Winx64
796         
797         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
798           frame pointer info for the method being compiled.
799           
800         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
801           the call to mono_exception_from_token.
802           
803         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
804           storing the method prolog information in a format that the Winx64 SEH can understand.  This
805           information is stored a the end of the method block because it is all 32-bit offset based.
806
807         Contributed under MIT/X11 license.
808
809 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
810
811         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
812
813         * wapihandles.c: Fix warnings.
814
815         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
816         mode.
817
818         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
819         mono_jit_compile_method in aot-only mode since that calls the type 
820         initializer.
821         
822         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
823         get_delegate_invoke_impl in aot-only mode.
824
825         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
826
827 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
828
829         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
830
831         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
832         is on by default.
833
834         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
835
836         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
837         init trampoline from the AOT file as well.
838
839         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
840         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
841         code.
842
843         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
844         mono_init.
845
846         * exceptions-amd64.c: Add _full variants for the remaining exception code
847         creation functions as well, allow emission of relocatable code, remove
848         caching since that is now done by the caller.
849
850         * mini-exceptions.c: Add _full variants for the remaining exception code
851         creation functions as well, add aot-only support.
852
853         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
854         if we can determine a proper token for them.
855         (add_wrappers): Add a few more wrappers.
856         (emit_method_code): Remove some dead code.
857         (emit_trampolines): Emit exception code too.
858
859         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
860
861         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
862         mono_array_new_va which avoids varargs.
863
864         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
865
866         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
867         mono_arch_create_specific_trampoline () in all places.
868
869         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
870         a bit so it can be used for other things as well.
871         
872         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
873         on demand as well.
874
875         * exceptions-amd64.c: Rename the caching from the exception code creation
876         functions, it is done by the caller instead.
877         
878         * exceptions-amd64.c: Change the signature of the exception code creation 
879         functions to allow the creation of relocatable code later.
880
881         * mini-exceptions.c: Add a set of functions to query the various 
882         runtime-generated exception functions.
883
884         * mini.c mini-exceptions.c: Use the newly added functions instead of the
885         mono_arch_.. () functions.
886         
887 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
888
889         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
890
891         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
892
893         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
894         (mini_get_vtable_trampoline): Ditto.
895
896         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
897         code in the AOT case by returning the code size and a list of relocations to
898         the caller.
899
900         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
901
902 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
903
904         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
905           clean the stack.
906
907         Contributed under MIT/X11 license.
908
909 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
910
911         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
912         so the buffer size can be computed correctly. Fixes #404735.
913
914         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
915         normally as cfg->debug_info is already freed.
916
917 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
918
919         * mini-amd64.c: For calls returning vtypes in registers, don't store
920         the return address on the stack, instead allocate a separate local for
921         it. Fixes #404729.
922
923 2008-07-05  Mark Probst  <mark.probst@gmail.com>
924
925         * mini-trampolines.c, mini.h: Add an argument to
926         mono_create_jit_trampoline_in_domain() for turning off the adding
927         of the sync wrapper.
928
929         * mini.c: Use the JIT trampoline without sync instead of
930         ldftn_nosync in static RGCTX invoke wrappers so that the call can
931         be patched.
932
933 2008-07-04  Mark Probst  <mark.probst@gmail.com>
934
935         * driver.c: Turn on GSHARED optimization by default.
936
937 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
938
939         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
940         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
941
942         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
943         create a variant of the generic trampoline code callable from AOTed trampolines.
944
945         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
946         trampoline code callable from AOTed trampolines.
947
948         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
949
950 2008-07-04  Mark Probst  <mark.probst@gmail.com>
951
952         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
953         pass-through manner.
954
955         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
956         and don't fail sharing for them anymore.
957
958         * mini-exceptions.c: Handle exceptions in shared generic methods.
959
960         * generic-sharing.c: When checking the context of a generic
961         method, also check its class's context.  Don't treat wrappers as
962         sharable.
963
964         * mini-trampolines.c: Some code factored out to
965         metadata/generic-sharing.c.  Handle the MRGCTX case.
966
967         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
968         we must deal with the method being of another instantiation of the
969         class.  Add static rgctx invoke wrappers to generic methods.
970
971 2008-07-04  Mark Probst  <mark.probst@gmail.com>
972
973         * mini.c: Provide all jit infos of generic shared methods with a
974         generic jit info.
975
976         * mini-exceptions.c: Handle the new situation that a generic info
977         might be available, but not info about the this/vtable/mrgctx
978         variable.
979
980 2008-07-03  Mark Probst  <mark.probst@gmail.com>
981
982         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
983         generic methods.
984
985 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
986
987         * dominators.c (check_dominance_frontier): Fix a warning.
988
989         * mini.h: Add some missing prototypes.
990
991         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
992
993         * driver.c (mono_jit_init_version): Correct the comments since the first
994         argument should be the name of the root domain, not a filename.
995
996         * aot-runtime.c (make_writable): Error out if this is called while running
997         with --aot-only.
998         (load_aot_module): Ditto.
999
1000         * aot-compiler.c: Really fix the computation of method indexes.
1001
1002         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
1003         optimizations as this is no longer called frequently.
1004
1005         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
1006         method and the invoke impl code and pass it to the delegate trampoline instead of
1007         just the delegate class.
1008
1009 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
1010
1011         * aot-compiler.c: Fixup the computation of method indexes.
1012         (add_wrappers): Create the base methods of the runtime invoke wrappers using
1013         the method builder infrastructure.
1014
1015         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
1016         has no header.
1017
1018         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
1019         mode, load the method right away instead of creating a trampoline.
1020
1021         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
1022
1023         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
1024         some checks a bit.
1025
1026 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
1027
1028         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
1029         (mono_aot_load_method): Use method_index instead of method->token.
1030
1031         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
1032         can handle icalls etc. properly.
1033
1034         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1035
1036         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
1037
1038         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
1039         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
1040         JIT_ICALL_ADDR patch type.
1041
1042         * patch-info.h: Add JIT_ICALL_ADDR patch type.
1043
1044         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
1045         request flag.
1046         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
1047
1048         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
1049
1050 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
1051
1052         * mini.c: Use domain->jit_code_hash_lock for controlling access to
1053         domain->jit_code_hash.
1054
1055 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
1056
1057         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
1058
1059 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
1060
1061         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
1062         get_this_arg_from_call, let it compute it when needed.
1063
1064         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
1065         gsctx from code only when needed.
1066
1067         * mini-trampolines.c (get_generic_context): Rename this to 
1068         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
1069         it can be called by the arch backends.
1070
1071         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
1072
1073 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
1074
1075         * driver.c (mono_main): Add experimental --aot-only command line option.
1076
1077         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
1078         set.
1079
1080 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
1081
1082         * driver.c (DllMain): Remove mono_module_handle.
1083
1084         Contributed under MIT/X11 license.
1085
1086 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
1087
1088         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
1089         for emitting methods which are not in the source assembly. Detect and report
1090         failure of assembling+linking.
1091         
1092         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
1093
1094         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
1095
1096 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
1097
1098         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
1099
1100 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
1101
1102         * mini.h: Remove some obsolete prototypes.
1103
1104         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
1105
1106 2008-06-24  Mark Probst  <mark.probst@gmail.com>
1107
1108         * mini.c (get_object_generic_inst): Variable-sized arrays are not
1109         supported by Visual Studio, so use alloca().
1110
1111 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
1112
1113         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
1114         Fixes #402585.
1115
1116 2008-06-23  Mark Probst  <mark.probst@gmail.com>
1117
1118         * mini.c: Fail sharing of a generic method if it contains an open
1119         catch clause (because we don't pass MRGCTXs yet).
1120
1121 2008-06-23  Mark Probst  <mark.probst@gmail.com>
1122
1123         * mini.c: When compiling a method with generic sharing, insert the
1124         method instantiated with an all-Object generic context into the
1125         jit info table, instead of the context of the first instantiation
1126         of the method we happen to compile.
1127
1128 2008-06-18  Martin Baulig  <martin@ximian.com>
1129
1130         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
1131         `major_version' and `minor_version'.
1132
1133 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1134
1135         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
1136         mono_method_is_generic_sharable_impl() takes an additional
1137         argument specifying whether to treat type variables as reference
1138         types.
1139
1140 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1141
1142         * mini.h: Removed obsolete prototypes.
1143
1144 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1145
1146         * mini.c: Don't fail generic sharing for initobj and sizeof - we
1147         already handle them.
1148
1149 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1150
1151         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
1152         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
1153         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
1154         tramp-x86.c: Added a MonoGenericContext* argument to
1155         mono_arch_get_unbox_trampoline() so that it can call other
1156         functions which require it.
1157
1158 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1159
1160         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
1161         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
1162         mono_arch_get_this_arg_from_call() takes a
1163         MonoGenericSharingContext* as well.
1164
1165 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1166
1167         * mini.c: Factor out code for emitting unbox into emit_unbox() and
1168         implement generic sharing of unbox.
1169
1170 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1171
1172         * mini.c: Don't compute the vtable to determine whether a field is
1173         special static, because it might not work for open types.
1174
1175 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1176
1177         * mini.c: Removed the unused token_type and token_source arguments
1178         from get_runtime_generic_context_ptr().
1179
1180 2008-06-17  Marek Habersack  <mhabersack@novell.com>
1181
1182         * mini.c (ADD_BINOP): fix the build
1183
1184 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
1185
1186         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
1187         a widening op.
1188
1189 2008-06-16  Mark Probst  <mark.probst@gmail.com>
1190
1191         * mini.h: Removed class relations enum that's not used anymore.
1192
1193 2008-06-16  Mark Probst  <mark.probst@gmail.com>
1194
1195         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
1196
1197         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
1198         the lazy fetch trampoline access code.
1199
1200 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
1201
1202         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
1203
1204 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
1205
1206         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
1207
1208         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
1209
1210         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
1211
1212 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
1213
1214         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
1215         intrinsics.
1216
1217         * mini-ops.h: Add MIN/MAX_UN opcodes.
1218
1219         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
1220         intrinsics.
1221
1222         * basic-math.cs: Add more min/max tests.
1223
1224         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
1225
1226 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1227
1228         * mini.c: Small fix in the prologue of emit_castclass.
1229
1230 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
1231
1232         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
1233
1234         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
1235         do not work even for unsigned types. Fixes #400014.
1236
1237         * basic-math.cs: Add regression tests for unsigned Min/Max.
1238
1239 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1240
1241         * mini.c: Added additional context_used argument to several
1242         functions, which will be needed for sharing generic methods.  Use
1243         GET_RGCTX macro wherever appropriate.  Declare only one
1244         context_used in mono_method_to_ir().
1245
1246 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1247
1248         * mini.c, generic-sharing.c: Removed generic class relations.
1249
1250         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
1251         functions due to MRGCTX changes.
1252
1253 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1254
1255         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
1256         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
1257         with calculated IMT.
1258
1259         * mini.c: Generic sharing of calls via generic interfaces.
1260
1261         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
1262         generic method with non-constant MonoGenericContext*.  Instead,
1263         the context is taken out of the method itself.
1264
1265 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1266
1267         * mini.c: Generic sharing of ldvirtftn.
1268
1269 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1270
1271         * mini.c: Generic sharing of ldftn.
1272
1273 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1274
1275         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
1276
1277 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1278
1279         * mini.c: Generic sharing of the special case of ldtoken followed
1280         by a call to GetTypeFromHandle.
1281
1282 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1283
1284         * mini.c: Generic sharing of box for nullable types.
1285
1286 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
1287
1288         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
1289         are passed on the stack. Fixes #324807.
1290
1291 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
1292
1293         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
1294         for the ArgValuetypeAddrInIReg case.
1295
1296         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
1297         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
1298
1299         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
1300         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
1301         local variable and pass the local variable by reference to the called method.
1302           
1303         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
1304         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
1305
1306         Contributed under MIT/X11 license.
1307
1308 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
1309
1310         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
1311
1312         * debug-mini.c (mono_debug_print_vars): Release memory after printing
1313         everything.
1314
1315 2008-06-10  Martin Baulig  <martin@ximian.com>
1316
1317         * debug-mini.c
1318         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
1319
1320 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
1321
1322         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
1323         possible error when no arguments are passed.
1324
1325         Contributed under MIT/X11 license.
1326
1327 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
1328
1329         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
1330         where the file name is NULL.
1331
1332 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
1333
1334         * mini.c: Fix s390 build.
1335
1336 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
1337
1338         * trace.c (mono_trace_parse_options): Fix warnings.
1339
1340         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
1341
1342 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
1343
1344         * mini.c (remove_block_if_useless): Avoid printing the method name.
1345         
1346         * mini.c: Remove needless setting of ins->cil_code which is now done by 
1347         MONO_INST_NEW.
1348
1349         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
1350         LMF. Not yet used.
1351
1352         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
1353         translated code after it has been patched.
1354
1355 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
1356
1357         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
1358         avoid problems during code patching on SMP systems.
1359         (emit_call): Avoid adding a patch info which is already added by 
1360         emit_call_body.
1361         (mono_arch_emit_exceptions): Ditto.
1362
1363 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
1364
1365         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
1366         MONO_TYPE_ISSTRUCT already checks for it.
1367
1368 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
1369
1370         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
1371           structs with floats on Winx64 the float registers are not used.  
1372           The integer registers are always used..
1373         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
1374           only one register will be used and only if the size of the struct 
1375           is 1,2,4, or 8 bytes.
1376
1377         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
1378           to work for Winx64.
1379
1380         Contributed under MIT/X11 license.
1381
1382 2008-06-05  Martin Baulig  <martin@ximian.com>
1383
1384         * debug-debugger.c (debugger_lookup_class): Also call
1385         mono_class_setup_methods() here; we're only called from RTI.
1386
1387 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
1388
1389         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
1390         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
1391         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
1392         Post-process object files and add dtrace-generated object, if necessary.
1393
1394         Contributed under MIT/X11 license.
1395
1396 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1397
1398         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
1399         element class.
1400
1401         * mini.c: Generic sharing for unbox.any and castclass.
1402
1403 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1404
1405         * mini.c: Ignore tailcall prefix in shared generic code and when
1406         doing calls which require a vtable/rgctx argument.
1407
1408 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1409
1410         * mini.c: Don't free the JIT info.
1411
1412         * driver.c: Changes in the JIT info table testing code.
1413
1414 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
1415
1416         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
1417         interruption. Fix some warnings.
1418
1419         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
1420         interruption_checkpoint.
1421
1422 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
1423
1424         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
1425         from embedding applications.
1426
1427 2008-06-02  William Holmes  <billholmes54@gmail.com>
1428
1429         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
1430           reserving 32 bytes on the stack when making calls. 
1431
1432         Contributed under MIT/X11 license.
1433
1434 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
1435
1436         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
1437         the linear IL branch.
1438
1439         * driver.c: Print out more information for --version on arm.
1440
1441 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
1442
1443         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
1444         bb_exit instead, since out of line bblocks might not actually be emitted
1445         out-of-line.
1446         
1447         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
1448         maximum epilog size for out of line bblocks if tracing is enabled.
1449
1450         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
1451
1452 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
1453
1454         * arrays.cs: Regression tests for allocating arrays with negative sizes.
1455
1456 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
1457
1458         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
1459         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
1460         opcodes.
1461
1462 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
1463
1464         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
1465         the 'value' to store is a constant.
1466
1467         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
1468
1469         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
1470         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
1471
1472 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
1473
1474         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
1475         for accessing method->generic_container.
1476
1477 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
1478
1479         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
1480         
1481         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
1482
1483         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
1484
1485         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
1486         fails.
1487
1488 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
1489
1490         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
1491
1492         * mini.c: Handle the case when mono_class_vtable () fails.
1493
1494 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
1495         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
1496         the stat profiler.
1497
1498 2008-05-22  Mark Probst  <mark.probst@gmail.com>
1499
1500         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
1501         together with domain sharing.
1502
1503 2008-05-22  Mark Probst  <mark.probst@gmail.com>
1504
1505         * mini.c: Treat callvirts to final methods like non-virtual calls
1506         when doing generic sharing, i.e. look them up in the runtime
1507         generic context.
1508
1509 2008-05-22  Mark Probst  <mark.probst@gmail.com>
1510
1511         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
1512         with computed types (for generic sharing).
1513
1514         * mini.c: Generic sharing for mkrefany and refanyval.
1515
1516 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
1517
1518         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
1519         possible.
1520
1521         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
1522         the generic sharing code.
1523         
1524         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
1525         when needed.
1526
1527 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
1528
1529         * mini.h: Remove the declaration of mono_aot_init_vtable ().
1530
1531 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
1532
1533         * driver.c: updated copyright date
1534
1535 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
1536
1537         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
1538         needed.
1539
1540 2008-05-19  Martin Baulig  <martin@ximian.com>
1541
1542         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
1543         pointing to the new `_mono_debug_using_mono_debugger' variable.
1544
1545         * driver.c
1546         (mono_main): Check mono_debug_using_mono_debugger() rather than
1547         the `MONO_INSIDE_MDB' environment variable to check whether we're
1548         inside the debugger.
1549
1550 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
1551
1552         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
1553         argument.
1554
1555 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
1556
1557         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
1558
1559         * mini.c: Added mini_assembly_can_skip_verification. This
1560         function checks if the assembly requested to skip verification. 
1561         Fixes part of #387274.
1562
1563 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
1564
1565         * mini.c (mini_get_method): Disable the check for open generic classes when
1566         using generic sharing.
1567
1568         * generics.cs: Add a test #387034.
1569
1570         * mini.c (mini_get_method): Check whenever the method class is an open generic
1571         type, and return NULL in that case, causing a verification error. Fixes
1572         #384123.
1573
1574 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
1575
1576         * driver.c (mono_main): Revert r102623. The right
1577         thing to do is to enable the verifier under verifiable
1578         unless a --security flag was passed.
1579
1580         We need this non-trivial behavior for --verify-all otherwise
1581         mcs-compileall won't be able to use it. As it needs everything to
1582         be verified under validil.
1583
1584 2008-05-06  Martin Baulig  <martin@ximian.com>
1585
1586         Fix #383749.
1587
1588         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
1589         (mono_debugger_thread_cleanup): Likewise.
1590         (mono_debugger_extended_notification): Likewise.
1591
1592 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
1593
1594         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
1595         against both inflated and non-inflated methods. We need to check against the
1596         generic definition for cases where the instantiated method is not visible.
1597         We need to check against the inflated types for cases where the instantiation
1598         changes any super type. This fixes #382986.
1599
1600         Note that this doesn't need to be applied to other parts of mono_method_to_ir
1601         that check for visibiliy as generic params only appears as the type subject
1602         of tokens on call opcodes. Field manipulation and ldftn must always
1603         target an exact type.
1604
1605 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
1606
1607         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
1608         if no related --security flag is passed.
1609
1610 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
1611
1612         * mini-arch.h: Prepare support for ppc64.
1613
1614         Contributed under MIT/X11 license.
1615
1616 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
1617
1618         * aot-runtime.c: Prepare support for ppc64.
1619
1620         Contributed under MIT/X11 license.
1621
1622 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
1623
1624         * mini-ops.h: Prepare support for ppc64.
1625
1626         Contributed under MIT/X11 license.
1627
1628 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
1629
1630         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
1631
1632         Contributed under MIT/X11 license.
1633
1634 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
1635
1636         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
1637         assemblies, since aot_name is not a full path, causing us to load MS.NET 
1638         assemblies on windows.
1639
1640 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
1641
1642         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
1643         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
1644         * main.c: Use UTF-8 encoded command line instead of Windows default code
1645         page on Windows to support Unicode.
1646         * driver.c (DllMain): New function for mixed-mode assembly support.
1647         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
1648         export __stdcall functions without decoration.
1649
1650         Contributed under MIT/X11 license.
1651
1652 2008-04-28  Mark Probst  <mark.probst@gmail.com>
1653
1654         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
1655         saving it very early.
1656
1657 2008-04-28  Mark Probst  <mark.probst@gmail.com>
1658
1659         * mini.h, mini.c: Lots of code for accessing the old RGCTX
1660         deleted.  The only way to access the new RGCTX is via the
1661         trampline.
1662
1663         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
1664         vtable instead of the RGCTX to static methods.
1665
1666         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
1667         accessing the new RGCTX.
1668
1669         * generic-sharing.c: There is no separation between self, type
1670         arguments and other types in the RGCTX anymore.
1671
1672 2008-04-25  Jonathan Chambers <joncham@gmail.com>
1673
1674         * mini-amd64.c (add_general): Remove previous stack adjustment.
1675         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
1676         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
1677         for 32 bytes of stack space reserved for all calls.
1678         
1679         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
1680         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
1681         adjustment.
1682         
1683         Code contributed under MIT/X11 license.
1684
1685 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
1686
1687         * mini.c (mini_method_verify): Only verify non-inflated methods, check
1688         against the root definition, peeling out method and type instantiations.
1689         Cache verify success results, code that fails verification is still
1690         checked multiple times.
1691
1692 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
1693
1694         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
1695
1696 2008-04-23  Jonathan Chambers <joncham@gmail.com>
1697
1698         * mini-amd64.c (add_general): Always increment stack on Win64.
1699         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
1700         on Win64.
1701         
1702         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
1703         stack based argument handling on Win64.
1704         
1705         Code contributed under MIT/X11 license.
1706
1707 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
1708
1709         * Makefile.am (version.h): Add support for git-svn.
1710
1711 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
1712
1713         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
1714         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
1715         avoiding allocations and libc functions which might deadlock.
1716         
1717         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
1718         'no-gdb-backtrace' option is set.
1719
1720         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
1721
1722         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
1723
1724 2008-04-21  Martin Baulig  <martin@ximian.com>
1725
1726         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
1727         and `get_lmf_addr'; `notification_address' is no longer a pointer.
1728
1729 2008-04-21  Martin Baulig  <martin@ximian.com>
1730
1731         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
1732         `thread_vtable', `event_handler_ptr' and `event_handler'.
1733
1734 2008-04-21  Martin Baulig  <martin@ximian.com>
1735
1736         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
1737         allows delayed initialization of the `executable_code_buffer' when
1738         attaching.
1739
1740 2008-04-21  Martin Baulig  <martin@ximian.com>
1741
1742         * mini.h (mono_debugger_create_notification_function): Removed.
1743         * tramp-*.c (mono_debugger_create_notification_function): Removed.
1744
1745         * mdb-debug-info64.s
1746         (MONO_DEBUGGER__notification_function): Added this in the .text section.
1747
1748         * mdb-debug-info32.s
1749         (MONO_DEBUGGER__notification_function): Added this in the .text section.
1750
1751         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
1752         currently only works on x86 and x86_64, so don't create it on ppc.
1753
1754 2008-04-21  Martin Baulig  <martin@ximian.com>
1755
1756         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
1757
1758         * mini.c
1759         (mini_method_compile): In the fp elimination check, check
1760         `debug_options.mdb_optimizations' in addition to
1761         mono_debug_using_mono_debugger().       
1762
1763         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
1764         disable some JIT optimizations which are only disabled when
1765         running inside the debugger.
1766         Added `--help-debug' option to describe the debugging options.
1767         (parse_debug_options): New static function to parse the `--debug'
1768         options, so we can easily add more stuff in future.
1769
1770 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
1771
1772         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
1773         the method has no body.
1774
1775 2008-04-19  Jonathan Chambers <joncham@gmail.com>
1776
1777         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
1778         assembly is not allowed in MSVC 64-bit compiler. 
1779         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
1780         as we get floating point exceptions everywhere.
1781         
1782         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
1783         correctly align arguments for call to throw_exception.
1784         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
1785         
1786         Code contributed under MIT/X11 license.
1787
1788 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
1789
1790         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
1791
1792 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
1793
1794         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
1795
1796         * mini-amd64.c (NEW_INS): Set cil_code.
1797
1798         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
1799         from mini-amd64.c so all debugger related logic is in one place.
1800
1801         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
1802         later won't have a random ip assigned to them.
1803
1804 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
1805
1806         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
1807         the arch specific function initializes code_size.
1808         (mono_create_delegate_trampoline): Ditto.
1809
1810         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
1811         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
1812         platforms.
1813
1814         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
1815         running under the debugger.
1816
1817         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
1818         debugger.
1819
1820         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
1821         debugger. Also move the disabling of optimizations here from driver.c.
1822         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
1823         debugger.
1824
1825         * mini.h (MonoCompile): Add a few new flags.
1826
1827 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
1828
1829         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
1830         so the cil_code field of created MonoInst's is properly set.
1831         (mini_select_instructions): Ditto.
1832
1833         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
1834         (MONO_INST_NEW_CALL): Ditto.
1835
1836         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
1837         in many places so the ins->cil_code field is properly initialized.
1838
1839         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
1840         place.
1841
1842 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
1843
1844         * mini.c (mini_method_compile): Print a different message when compiling a 
1845         shared method.
1846         
1847         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
1848         > 1.
1849
1850 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
1851
1852         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
1853         SSE2 instructions.
1854
1855         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
1856         
1857 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
1858
1859         * mini.c (handle_stack_args): Make this return void since its return value was
1860         never used. Also set cfg->unverifiable for invalid IL instead of calling
1861         G_BREAKPOINT ().
1862
1863 2008-04-10  Mark Probst  <mark.probst@gmail.com>
1864
1865         * mini.c: Make sure "this" is live in catch clauses with type
1866         variables in shared generic code.
1867
1868 2008-04-08  Mark Probst  <mark.probst@gmail.com>
1869
1870         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
1871         generic_class_is_reference_type() to ensure the proper behaviour
1872         when sharing generic code and the type in question is a type
1873         argument.
1874
1875 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
1876
1877         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
1878         race conditions when printing thread dumps. Fixes #377738.
1879
1880 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
1881         
1882         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
1883         shows up when both MonoInst arguments can cause aliasig.
1884         There is likely no way in the current JIT to trigger this problem, but
1885         it showed up in the development of generics sharing, when in a new
1886         opcode both args of an OP_GROUP can be aliases (addresses of a local).
1887         When the generics sharing code will be committed, its tests will be
1888         valid also for this bug.
1889
1890 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
1891
1892         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
1893         PATCH_INFO_METHOD.
1894
1895         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
1896         NULL.
1897
1898 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
1899
1900         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
1901         use a more detailed exception message for InvalidCastException.
1902
1903         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
1904
1905         * driver.c (mono_main): Add --debug=casts option to turn on better 
1906         InvalidCastException message details.
1907
1908         * mini.c (mini_get_debug_options): New helper function to return the address of
1909         the debug_options variable.
1910
1911         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
1912         the jit_tls TLS variable.
1913
1914         * mini.c (mono_jit_tls): New TLS variable.
1915
1916         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
1917         option is used.
1918
1919 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
1920
1921         * mini.h: Removed verifer related stuff. This code was moved to verify.c
1922
1923         * mini.c: Removed verifer related stuff, code moved to verify.c.
1924
1925         * driver.c: Using code from verify.c instead of mini.c.
1926
1927 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
1928
1929         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
1930         longer valid.
1931
1932 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
1933
1934         * mini.c (check_for_method_verify): Enabling verification of
1935         corlib if mono_verify_all is set. Bugs in the verifier preventing that
1936         have been fixed.
1937
1938 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
1939
1940         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
1941         caller saved registers as well.
1942         
1943         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
1944         saved registers as well.
1945
1946 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
1947
1948         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
1949
1950         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
1951         code.
1952
1953 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
1954
1955         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
1956         to get_call_info.
1957         (get_call_info): Take a gsctx argument instead of 'cfg'.
1958
1959 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
1960
1961         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
1962         mono_verify_all is set.
1963
1964         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
1965
1966         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
1967
1968 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
1969
1970         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
1971         an exception.
1972
1973         * driver.c mini.c mini.h: Add a --verify-all development option to test the
1974         verifier and the code generated by the compiler.
1975
1976 2008-03-25  Mark Probst  <mark.probst@gmail.com>
1977
1978         * mini.c: Generic sharing of the non-nullable case of the box
1979         instruction.
1980
1981 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
1982
1983         * inssel.brg: Fix the build.
1984
1985         * iltests.il.in: Add a test for lconv.ovf.u8.un.
1986
1987 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
1988
1989         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
1990         Array:Address. Fixes #372410.
1991
1992         * iltests.il.in: New tests for readonly prefix.
1993
1994 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
1995
1996         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
1997         mini-trampolines.c.
1998
1999         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
2000         mini-exceptions.c.
2001
2002         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
2003         
2004         * mini.c (mono_decompose_op_imm): New helper function.
2005
2006         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
2007         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
2008         return value.
2009
2010         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
2011         mono_arch_output_basic_block. Fix warnings.
2012
2013         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
2014         for now.
2015
2016 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
2017
2018         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
2019         since the extra frame is now detected automatically inside the loop.
2020
2021         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
2022         opts which are now in mono_peephole_ins ().
2023         
2024         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
2025
2026         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
2027         frames and skip duplicate managed-to-native frames. Fixes #367665.
2028
2029         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
2030         opts which are now in mono_peephole_ins ().
2031         (mono_arch_peephole_pass_2): Ditto.
2032
2033         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
2034
2035         * mini-codegen.c (mono_peephole_ins): New helper function containing the
2036         arch independent peephole optimizations.
2037
2038         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
2039         opts which are now in mono_peephole_ins ().
2040
2041         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
2042         
2043         * mini-s390.c (mono_arch_output_basic_block): Fix build.
2044
2045         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
2046         pattern.
2047
2048         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
2049         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
2050         opcode. 
2051
2052 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
2053
2054         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
2055         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
2056         return value.
2057
2058         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
2059         mono_arch_output_basic_block. Fix warnings.
2060
2061 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2062
2063         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
2064         conv.ovf.u.un.
2065
2066 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2067
2068         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
2069         conv.ovf.u.un.
2070
2071         * iltests.il: Add new tests.
2072
2073 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
2074
2075         * mini.c: Removed Windows version macros.
2076
2077 2008-03-20  Mark Probst  <mark.probst@gmail.com>
2078
2079         * generic-sharing.c: Put reflection types in the extensible part
2080         of the runtime generic context.
2081
2082         * mini.c: Generic sharing of the GetTypeHandle special case of the
2083         ldtoken instruction.
2084
2085 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2086
2087         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
2088
2089         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
2090         
2091         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
2092         consistency with the other version on the linear IR branch.
2093
2094         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
2095
2096         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
2097
2098         * iltests.il.in: Add new tests.
2099
2100 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
2101
2102         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
2103
2104         * iltests.il.in: Add new tests.
2105
2106 2008-03-19  Mark Probst  <mark.probst@gmail.com>
2107
2108         * mini.c: Two variables with the same name were declared in
2109         nesting contexts and one wasn't initialized.  Fixed.
2110
2111 2008-03-19  Mark Probst  <mark.probst@gmail.com>
2112
2113         * mini.c: Generic sharing of the initobj instruction.
2114
2115 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
2116
2117         * mini.c: make the test to optimize ldtoken from typeof() more
2118         precise.
2119
2120 2008-03-18  Mark Probst  <mark.probst@gmail.com>
2121
2122         * mini.c: Generic sharing of the initobj instruction for reference
2123         types.
2124
2125 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
2126
2127         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
2128         the mono_breakpoint_clean_code() code to perform bound checks.
2129
2130 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
2131
2132         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
2133         mono_arch_patch_callsite() to include the start of the managed method
2134         to be able to perform bound checks.
2135
2136 2008-03-17  Mark Probst  <mark.probst@gmail.com>
2137
2138         * mini.c: Generic sharing for the isinst instruction.
2139
2140 2008-03-17  Mark Probst  <mark.probst@gmail.com>
2141
2142         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
2143         inssel-long32-mips.brg: Added opcodes for doing indirect calls
2144         with the runtime generic context argument.
2145
2146         * mini.c: Share calls to several types of unsharable methods by
2147         putting the address of the method code in the runtime generic
2148         context and doing an indirect call.
2149
2150         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
2151         to switches.
2152
2153 2008-03-16  Mark Probst  <mark.probst@gmail.com>
2154
2155         * generic-sharing.c: Change due to a change in the runtime genric
2156         context API.
2157
2158 2008-03-15  Martin Baulig  <martin@ximian.com>
2159
2160         * tramp-x86.c
2161         (mono_arch_nullify_class_init_trampoline): Add call to
2162         mono_breakpoint_clean_code() to make things work when running
2163         inside the debugger.
2164
2165         * tramp-amd64.c
2166         (mono_arch_nullify_class_init_trampoline): Add call to
2167         mono_breakpoint_clean_code() to make things work when running
2168         inside the debugger.
2169
2170 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
2171
2172         * inssel-long.brg (reg): Fix 64 bit build.
2173
2174 2008-03-14  Mark Probst  <mark.probst@gmail.com>
2175
2176         * mini.c, mini.h: Share static generic code by passing it an
2177         implicit argument pointing to the runtime generic context.
2178
2179         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
2180         inssel-long32-mips.brg: New opcodes for calling shared static,
2181         which need to be passed the runtime generic context.
2182
2183         * mini-amd64.c, mini-x86.c: Save the runtime generic context
2184         argument on the stack in the prologue if needed.  New function for
2185         finding the runtime generic context argument from the registers
2186         saved by the trampoline.
2187
2188         * mini-amd64.h, mini-x86.h: Specify which register to use for the
2189         runtime generic context argument.
2190
2191         * tramp-amd64.c: Also restore the register used for the runtime
2192         generic context argument.
2193
2194         * mini-trampoline.c: Resolve shared static calls by consulting the
2195         runtime generic context via the new argument.
2196
2197         * generic-sharing.c: Add an argument to sharability-checking
2198         functions that specifies whether type variables should be treated
2199         as sharable type arguments.
2200
2201         * inssel-x86.brg: Removed a superfluous, buggy rule.
2202
2203         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
2204         to switches.
2205
2206 2008-03-14  Martin Baulig  <martin@ximian.com>
2207
2208         * debug-debugger.c (main_thread_handler): Call
2209         mono_runtime_run_main() without sending any notifications.
2210
2211         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
2212
2213 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
2214
2215         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
2216
2217 2008-03-14  Mark Probst  <mark.probst@gmail.com>
2218
2219         * tramp-x86.c: Fixed register restore offsets in the trampoline
2220         code for ECX and EDX.
2221
2222 2008-03-12  Geoff Norton  <gnorton@novell.com>
2223
2224         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
2225         different ucontext_t implementations.
2226         * exceptions-arm.c: Use the above defines to get exceptions working on 
2227         iPhone (based on a patch by Luke Howard lukeh@padl.com)
2228         * mini-arm.c: Implement iPhone icache support (based on a patch by
2229         Luke Howard lukeh@padl.com)
2230
2231 2008-03-12  Mark Probst  <mark.probst@gmail.com>
2232
2233         * mini.c: Enable generic sharing of calls to non-static
2234         non-interface non-generic non-value-type methods.
2235
2236         * mini-trampolines.c: Resolve calls from shared generic code.
2237
2238 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
2239
2240         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
2241
2242         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
2243
2244 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
2245
2246         * mini.c: some fixes for the AOT compiler.
2247
2248 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
2249
2250         * cpu-amd64.md: Add clob:1 to some float opcodes.
2251
2252 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
2253
2254         * mini.h: Added MiniVerifierMode enumeration.
2255
2256         * mini.c: Added mini_verifier_set_mode to control
2257         the usage of the new verifier.
2258
2259         * mini.c (mono_method): Integrated the new verifier.
2260
2261         * driver.c: Extended --security option with validil and
2262         verifiable options to activate the new verifier.
2263
2264 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
2265
2266         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
2267         optimization to ctors taking 0 or 2 arguments too.
2268
2269         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
2270         a bit.
2271
2272         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
2273
2274         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
2275
2276 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
2277
2278         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
2279         non-aot case as well.
2280
2281         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
2282
2283         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
2284         changes.
2285
2286         * aot-compiler.c (encode_patch): Ditto.
2287
2288         * mini.h (G_MININT32): Fix the definition of this.
2289
2290 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
2291
2292         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
2293
2294         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
2295
2296 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
2297
2298         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
2299         methods returning vtypes in registers.
2300         (mono_arch_allocate_vars): Ditto.
2301
2302         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
2303
2304         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
2305
2306         * generics.cs: Add a test from the linear IR branch.
2307
2308         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
2309
2310         * mini.c (inline_method): Cache failed inline attempts.
2311
2312 2008-03-04  Mark Probst  <mark.probst@gmail.com>
2313
2314         * mini.c: For shared methods of generic classes put the location
2315         of "this" into the MonoGenericJitInfo.
2316
2317         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
2318         register out of a MonoContext by register number.  Add the generic
2319         sharing context as an argument to mono_arch_find_this_argument().
2320
2321         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
2322         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
2323         for new arch function.
2324
2325         * mini-exception.c: Handle open exception clauses in shared
2326         generic code.
2327
2328         * mini-trampolines.c: Supply additional argument to
2329         mono_arch_find_this_argument().
2330
2331 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
2332
2333         * Makefile.am (regtests): Run the bench.exe tests last.
2334
2335 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
2336
2337         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
2338         a bit.
2339
2340 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
2341
2342         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
2343         with MS.
2344
2345         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
2346         
2347         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
2348
2349         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
2350         whose class has no cctor.
2351
2352         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
2353
2354 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
2355
2356         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
2357         unverified.
2358
2359 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
2360
2361         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
2362         to be in sync with the code on the linear IR branch.
2363
2364         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
2365
2366         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
2367
2368 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
2369
2370         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
2371
2372         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
2373
2374         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
2375
2376         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
2377
2378         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
2379         
2380         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
2381         body.
2382
2383 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
2384
2385         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
2386         OP_LOADR4_MEMBASE emission.
2387
2388         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
2389         (mono_spillvar_offset_float): Ditto.
2390
2391         * mini-mips.c (mono_arch_emit_prolog): Ditto.
2392
2393         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
2394         emission.
2395
2396         * basic-long.cs: Add regression tests for them.
2397
2398         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
2399         use.
2400         (mono_arch_allocate_vars): Fix representation of single-precision float
2401         argument.
2402         (mono_arch_output_basic_block): Ditto.
2403
2404         * inssel-mips.brg: Ditto, remove duplicate items.
2405
2406         * mini-mips.c (emit_load_volatile_arguments): New function to handle
2407         arguments of tail calls as on other platforms.
2408         (mono_arch_output_basic_block): Handle tail calls.
2409
2410         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
2411         register.
2412
2413         * objects.cs (test_5_pass_static_struct): Add test for it.
2414
2415         Contributed under MIT/X11 license.
2416
2417 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
2418
2419         * Makefile.am: Use gmcs for compiling the regression tests.
2420
2421         * *.2.cs *.2.il: Rename to *.cs and *.il.
2422
2423 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
2424
2425         * regalloc.h: Make the vassign array smaller.
2426
2427         * mini.c (mini_method_compile): Remove an unused field in cfg.
2428
2429         * mini-codegen.c: Add a bunch of micro optimizations.
2430
2431 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
2432
2433         * regalloc.h: Remove some unused fields.
2434
2435 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
2436
2437         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
2438
2439         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
2440
2441 2008-02-22  Mark Probst  <mark.probst@gmail.com>
2442
2443         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
2444
2445         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
2446         trampoline: Fetch an entry from the runtime generic context.  If
2447         it's NULL, jump to the actual trampoline to fill the runtime
2448         generic context.  Otherwise, return it.
2449
2450         * mini.c: Call the lazy fetch trampoline to get entries out of the
2451         runtime generic context.
2452
2453         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
2454         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
2455         tramp-sparc.c: Stubs for the lazy fetch trampoline.
2456
2457 2008-02-21  Mark Probst  <mark.probst@gmail.com>
2458
2459         * mini.c: Fetch data out of the extensible part of the runtime
2460         generic context instead of calling a helper function.
2461
2462         * generic-sharing.c: Some functions moved into
2463         metadata/generic-sharing.c.  Helper function for fetching other
2464         types now checks and asserts against extensible rgctx (just for
2465         debugging purposes - the helper function isn't called anymore
2466         unless for debugging).
2467
2468 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
2469
2470         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
2471         for tail calls up to the point that the tests in iltests.exe run. Also add a
2472         dummy CKFINITE implementation.
2473         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
2474         needed for trampoline LMF frames.
2475
2476         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
2477         trampoline LMF frames.
2478
2479 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
2480
2481         * mini.c (inline_method): clean any pending loader error when inlining fail.
2482         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
2483
2484 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
2485
2486         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
2487
2488         * aot-runtime.c (decode_patch_info): Ditto.
2489
2490         * mini.c (mono_resolve_patch_target): Ditto.
2491         
2492         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
2493         icall wrappers.
2494
2495         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
2496         
2497         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
2498         if it references an icall address.
2499
2500 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
2501
2502         * cpu-s390x.md: Remove some more unused opcodes.
2503         
2504         * cpu-s390x.md: Remove some unused opcodes.
2505
2506         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
2507         mono_op_imm_to_op ().
2508
2509         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
2510         instead of a switch statement.
2511         
2512         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
2513         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
2514
2515         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
2516         
2517         * mini-codegen.c: Remove unused mono_regstate2_... functions.
2518
2519         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
2520         -1.
2521
2522 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
2523
2524         * driver.c (mono_main): Improve error reporting when an assembly cannot be
2525         opened. Fixes #362607.
2526
2527         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
2528
2529         * iltests.il.in: Add a test for static methods in interfaces.
2530
2531 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
2532
2533         * genmdesc.c (build_table): Fix a crash on older glib versions.
2534
2535         * cpu-sparc.md: Remove some unused opcodes.
2536         
2537         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
2538         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
2539
2540         * cpu-amd64.md: Remove some unused opcodes.
2541
2542         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
2543         like the other opcodes.
2544
2545 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
2546
2547         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
2548
2549         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
2550
2551         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
2552         variables 'cfg' instead of 'm' for consistency.
2553
2554         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
2555
2556         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
2557         argument holding the vtype return address, to avoid the ambigious use of
2558         cfg->ret for this purpose.
2559
2560         * mini.c (NEW_RETLOADA): Use vret_addr if set.
2561
2562         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
2563         
2564         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
2565         new mono_print_ins () function which only takes one argument.
2566
2567 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
2568
2569         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
2570         macro arguments.
2571
2572 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
2573
2574         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
2575
2576         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
2577
2578         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
2579         opcodes and other small changes.
2580
2581         * mini-ops.h: Add some new opcodes from the linear IR branch.
2582
2583         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
2584
2585         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
2586         opcodes, use the REG_MEMBASE opcodes instead.
2587         
2588         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
2589         opcodes, use the REG_MEMBASE opcodes instead.
2590         
2591         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
2592         linear IR branch.
2593
2594         * mini.c (mono_op_imm_to_op): New helper function.
2595
2596         * mini-ops.h: Add some opcodes from linear IR branch.
2597
2598 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
2599
2600         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
2601         <tsv@solvo.ru>.
2602
2603 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
2604
2605         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
2606         OP_ICONV_TO_R4/R8.
2607
2608         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
2609
2610 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
2611
2612         * aot-compiler.c (emit_method_code): Add an assert.
2613
2614         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
2615         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
2616         methods.
2617
2618 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
2619
2620         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
2621         some load/store opcodes so they are consistent. 
2622         (mono_arch_emit_prolog): Simplify some code.
2623
2624         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
2625
2626         * objects.cs: Add tests for large argument offsets on ARM.
2627
2628         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
2629         stack offsets. Fixes #359651.
2630
2631         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
2632
2633         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
2634
2635         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
2636
2637         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
2638
2639         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
2640
2641         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
2642         rid of CEE_CONV_R_UN.
2643
2644         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
2645
2646 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
2647
2648         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
2649
2650         * mini.c (mono_normalize_opcodes): Add some more opcodes.
2651
2652         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
2653
2654         * cpu-amd64.md: Remove some unused opcodes.
2655
2656         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
2657
2658         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
2659
2660         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
2661         arch specific functions for its parts. Call the peephole pass after local
2662         regalloc so the prolog can compute a more accurate max_offset.
2663         
2664         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
2665         the corresponding OP_I/OP_L opcodes.
2666
2667         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
2668
2669         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
2670
2671 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
2672
2673         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
2674         as they are handled in mini.c.
2675
2676         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
2677         
2678         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
2679         case since it is handled in mini.c.
2680
2681         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
2682
2683         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
2684
2685         * *.c: Use the new opcodes in the IR and back end code.
2686
2687         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
2688
2689         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
2690
2691 2008-02-06  Mark Probst  <mark.probst@gmail.com>
2692
2693         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
2694         an assert because it has a race condition.
2695
2696 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
2697
2698         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
2699
2700         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
2701
2702         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
2703
2704         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
2705         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
2706
2707 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
2708
2709         * cpu-amd64.md (move): Correct the maximum size of move.
2710
2711 2008-02-05  Mark Probst  <mark.probst@gmail.com>
2712
2713         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
2714         the generic class init trampoline to return quickly if the class
2715         is already inited.
2716
2717 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
2718
2719         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
2720         issues where an 32 bit callsite cannot be patched by a 64 bit address.
2721
2722 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
2723
2724         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
2725         branch.
2726
2727 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
2728
2729         * objects.cs: Add some soft-float tests.
2730
2731         * mini.c: Fix a couple more soft-float issues.
2732
2733         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
2734
2735         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
2736         avoid a REX prefix.
2737
2738 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
2739
2740         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
2741         exception happens while compiling a virtual method.
2742
2743 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
2744
2745         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
2746         
2747         * mini-sparc.c: Fix build.
2748
2749         * mini-sparc.c (get_call_info): Add support for generic sharing.
2750
2751         * mini-exceptions.c: Add a FIXME.
2752
2753 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
2754
2755         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
2756         altstack handling code.
2757
2758         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
2759         
2760         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
2761
2762         * mini-s390.c: Add support for generic sharing.
2763
2764         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
2765         Fix CAS on s390.
2766         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
2767
2768         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
2769
2770         * mini-s390x.c: Add support for generic sharing.
2771         
2772         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
2773         Fix CAS on ia64.
2774         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
2775
2776         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
2777         can be used since it takes a 16 bit signed immediate.
2778
2779         * inssel-s390x.brg: Fix OP_SETRET.
2780
2781         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
2782
2783         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
2784
2785         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
2786
2787         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
2788
2789         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
2790         in one place.
2791
2792         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
2793         stuff.
2794
2795         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
2796         of the unused mono_arch_patch_delegate_trampoline stuff.
2797
2798 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
2799
2800         * basic-long.cs: Move the fp related tests to basic-float.cs.
2801
2802         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
2803
2804         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
2805
2806         * basic-calls.cs: Add a test for proper float argument passing.
2807
2808         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
2809         if the context corresponds to an exception received through a signal.
2810
2811         * exceptions.cs: Add a test for nullref handling at the start of a try
2812         clause.
2813
2814         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
2815
2816         * jit-icalls.c (mono_break): New JIT icall.
2817
2818         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
2819
2820         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
2821
2822 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
2823
2824         * cpu-*.md: Get rid of unused opcodes.
2825
2826         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
2827
2828         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
2829         by all platforms.
2830
2831         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
2832         define.
2833
2834         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
2835         the arch independent trampoline code in mini-trampolines.c.
2836
2837         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
2838
2839         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
2840
2841         * mini-s390.h: Remove an unused define.
2842         
2843         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
2844         the arch independent trampoline code in mini-trampolines.c.
2845
2846         * mini-arm.c (mono_arch_emit_prolog): Fix build.
2847
2848 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
2849
2850         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
2851
2852         * mini-s390.c (mono_arch_emit_prolog): Fix build.
2853
2854         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
2855
2856         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
2857
2858         * cpu-amd64.md: Use smaller sizes for int opcodes.
2859
2860         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
2861
2862         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
2863         objects.cs.
2864
2865         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
2866         debugging.
2867
2868         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
2869         instead of though a pointer to save an indirection when accessing elements of
2870         the array.
2871
2872         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
2873         some typos.
2874         (NOT_IMPLEMENTED): New helper macro.
2875         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
2876         of a bb.
2877
2878         * *.c: Use the new helper macro.
2879
2880 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
2881
2882         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
2883
2884 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
2885
2886         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
2887         stack slots.
2888
2889 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
2890
2891         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
2892         profiling is enabled.
2893         
2894         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
2895         the end.
2896         (mono_arch_emit_prolog): Add more first bblock optimizations.
2897
2898         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
2899         in order if possible.
2900         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
2901         bblock, since the arguments are still in their original registers.
2902
2903         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
2904
2905 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
2906
2907         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
2908         as well.
2909
2910         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
2911         offset 0.
2912
2913         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
2914
2915         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
2916         process async exceptions received while in unmanaged code.
2917
2918         * mini.c (mini_init): Install a callback with the runtime which will be called
2919         when a thread receives an async exception while in unmanaged code.
2920
2921         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
2922
2923         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
2924
2925 2008-01-16  Wade Berrier  <wberrier@novell.com>
2926
2927         * cpu-g4.md:
2928         * cpu-arm.md:
2929         * cpu-s390x.md:
2930         fix build
2931
2932 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
2933
2934         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
2935         compilation with sun cc.
2936
2937         * cpu-*.md: Fix the build.
2938
2939         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
2940
2941         * mini-amd64.h: Add some comments to the MonoLMF structure.
2942
2943         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
2944         
2945         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
2946         in the LMF structure if possible. This saves two instructions in the
2947         managed->native wrappers.
2948
2949         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
2950
2951 2008-01-16  Mark Probst  <mark.probst@gmail.com>
2952
2953         * generic-sharing.c: New type argument lookup code which uses the
2954         runtime generic context template.
2955
2956 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
2957
2958         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
2959
2960         * mini-arm.c (add_general): Fix arm eabi parameter passing.
2961         (mono_arch_output_basic_block): Fix localloc implementation.
2962
2963         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
2964
2965         * mini-ia64.c (peephole_pass): Fix ia64 build.
2966
2967         * mini-amd64.c (peephole_pass): Fix a warning.
2968         
2969         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
2970         at a constant offset from sp/fp.
2971
2972         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
2973         instead of obtaining it from *lmf in the managed method case.
2974
2975 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
2976
2977         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
2978
2979 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
2980
2981         * mini.h (MonoInstList): New type.
2982         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
2983         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
2984         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
2985         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
2986         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
2987         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
2988         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
2989         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
2990         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
2991         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
2992         MONO_INST_LIST_FOR_EACH_ENTRY,
2993         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
2994         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
2995         mono_inst_list_first, mono_inst_list_last,
2996         mono_inst_list_next, mono_inst_list_prev): New instruction
2997         list handling interfaces.
2998         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
2999         list head 'ins_list'.
3000         (MonoInst): Replace next pointer with list head 'node'.
3001         (MonoCallInst): Make 'out_args' a MonoInstList.
3002         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
3003         (MonoCompile): Delete reverse_inst_list and
3004         reverse_inst_list_len.
3005         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
3006         mono_arch_lowering_pass, mono_arch_local_regalloc,
3007         mono_arch_output_basic_block, mono_arch_emit_prolog):
3008         Convert to new instruction lists.
3009         (insert_after_ins): Delete.
3010         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
3011         instruction lists.
3012         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
3013         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
3014         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
3015         mono_emulate_opcode, mono_emit_load_got_addr,
3016         inline_method, mono_method_to_ir, mono_print_bb_code,
3017         print_dfn, decompose_pass, nullify_basic_block,
3018         replace_out_block_in_code, remove_block_if_useless,
3019         merge_basic_blocks, move_basic_block_to_end,
3020         try_unsigned_compare, optimize_branches, mono_print_code,
3021         mini_select_instructions, remove_critical_edges): Likewise.
3022         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
3023         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
3024         mono_arch_output_basic_block, mono_arch_emit_prolog):
3025         Likewise.
3026         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
3027         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3028         mono_arch_output_basic_block): Likewise.
3029         (inst_list_prepend, insert_after_ins): Delete.
3030         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
3031         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
3032         instruction lists.
3033         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
3034         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
3035         mono_arch_emit_prolog): Likewise.
3036         * cfold.c (mono_constant_fold): Likewise.
3037         * liveness.c (visit_bb, mono_analyze_liveness,
3038         optimize_initlocals): Likewise.
3039         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
3040         * graph.c (mono_draw_code_cfg): Likewise.
3041         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
3042         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
3043         mono_ssa_cprop): Likewise.
3044         * abcremoval (get_relations_from_previous_bb, process_block):
3045         Likewise.
3046         * local-propagation (mono_cprop_invalidate_values,
3047         mono_local_cprop_bb): Likewise.
3048         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
3049         peephole_pass, mono_arch_output_basic_block,
3050         mono_arch_emit_prolog): Likewise.
3051         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
3052         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3053         mono_arch_emit_prolog): Likewise.
3054         (insert_after_ins): Delete.
3055         * aliasing.c (print_code_with_aliasing_information,
3056         mono_build_aliasing_information, mono_aliasing_deadce):
3057         Convert to new instruction lists.
3058         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
3059         peephole_pass, NEW_INS, mono_arch_lowering_pass,
3060         mono_arch_local_regalloc, mono_arch_output_basic_block):
3061         Likewise.
3062         (insert_after_ins): Delete.
3063         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
3064         peephole_pass, mono_arch_output_basic_block): Convert to
3065         new instruction lists.
3066         * mini-codegen (InstList, inst_list_prepend,
3067         insert_after_ins): Delete.
3068         (insert_before_ins, get_register_force_spilling,
3069         get_register_spilling, free_up_ireg, free_up_reg,
3070         create_copy_ins, create_spilled_store, alloc_int_reg,
3071         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
3072         to new instruction lists.
3073         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
3074         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3075         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
3076         (insert_after_ins): Delete.
3077         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
3078         mono_arch_local_regalloc, mono_arch_output_basic_block,
3079         mono_arch_call_opcode): Convert to new instruction lists.
3080         (insert_after_ins): Delete.
3081         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
3082         peephole_pass, mono_arch_output_basic_block,
3083         mono_arch_emit_prolog): Convert to new instruction lists.
3084
3085 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
3086
3087         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
3088
3089         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
3090         Fixes #353182.
3091
3092         * Makefile.am (version.h): Make this work with non-bash shells.
3093
3094 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
3095
3096         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
3097
3098 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
3099
3100         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
3101         the InitializeArray optimization.
3102
3103 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
3104
3105         * mini.c driver.c: Don't include os/gc_wrapper.h.
3106
3107 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
3108
3109         * mini.c (print_jit_stats): Print GC statistics if available.
3110
3111 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
3112
3113         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
3114
3115 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
3116
3117         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
3118
3119 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
3120
3121         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
3122         
3123         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
3124
3125         * driver.c (mono_main): Ditto.
3126
3127 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
3128
3129         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
3130
3131         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
3132         in the vtable can't be encoded.
3133         (compile_method): Ditto.
3134
3135 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
3136
3137         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
3138         defined.
3139
3140         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
3141         lmf->rbp.
3142
3143         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
3144         the top LMF entry belongs to the current method.
3145
3146         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
3147
3148 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
3149
3150         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
3151         
3152         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
3153
3154         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
3155
3156         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
3157
3158         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
3159
3160         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
3161         implementation.
3162
3163         * basic-float.cs: Add an ulong->double cast test.
3164
3165 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
3166
3167         * mini.c (mono_method_to_ir): Fix a warning.
3168
3169 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
3170
3171         * mini-ops.h: Add OP_SWITCH.
3172
3173         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
3174         CEE_SWITCH in back-end code, use OP_SWITCH instead.
3175
3176 2007-12-11  Geoff Norton  <gnorton@novell.com>
3177
3178         * mini-s390x.c: Minor change to the MAX() define to allow
3179         it to compile with other gcc versions.
3180
3181 2007-12-11  Geoff Norton  <gnorton@novell.com>
3182
3183         * cpu-s390x.md:
3184         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
3185
3186 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
3187
3188         exceptions-arm.c (mono_arch_get_restore_context): Restore
3189         the frame pointer.
3190
3191         exceptions-arm.c (throw_exception): Save the frame pointer.
3192         This is a partial fix for #323747. Only the client side is
3193         fixed.
3194
3195 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
3196
3197         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
3198         was using an unrelated variable to log the class which
3199         needed the cctor to be called. This was crashing on arm.
3200
3201 2007-12-09  Robert Jordan  <robertj@gmx.net>
3202
3203         * mini-x86.c (mono_arch_emit_epilog):
3204         Consider all kinds of 64-bit types. Fixes #323114.
3205
3206 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
3207
3208         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
3209
3210 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
3211
3212         * mini-amd64.c (peephole_pass): Add a missing instruction check.
3213
3214 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3215
3216         * mini.c: run type ctor before allocating an object, not only
3217         when running it's constructor method (fixes at least part of bug #342507).
3218
3219 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
3220         
3221         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
3222         
3223         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
3224         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
3225         function.
3226
3227         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
3228         mono_generic_class_init_trampoline () the same as it is done with the other
3229         trampolines.
3230
3231         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
3232         aot-runtime.c aot-compiler.c: Implement AOT support.    
3233
3234 2007-12-07  Mark Probst  <mark.probst@gmail.com>
3235
3236         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
3237         build for archs which don't have the vtable trampoline defined
3238         yet.
3239
3240 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
3241
3242         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
3243
3244         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
3245
3246         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
3247
3248         * tramp-<ARCH>.c: Use the new helper function.
3249
3250 2007-12-07  Mark Probst  <mark.probst@gmail.com>
3251
3252         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
3253         trampoline call, which takes a vtable argument.
3254
3255         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
3256         OP_TRAMPCALL_VTABLEs like other calls.
3257
3258         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
3259         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
3260         call.  Implemented a support function which fetches the vtable
3261         from a register set.
3262
3263         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
3264         Implemented a generic class init trampoline, using the
3265         OP_TRAMPCALL_VTABLE opcode.
3266
3267         * mini.c: Implemented static field access when sharing generic
3268         code.  This implies initing the class using the new
3269         OP_TRAMPCALL_VTABLE call.
3270
3271 2007-12-07  Mark Probst  <mark.probst@gmail.com>
3272
3273         * mini.c: Don't compile methods with sharing enabled if their
3274         classes are disabled for sharing.
3275
3276 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
3277
3278         * inssel.brg: Add a missing sign extension to the GETCHR and array access
3279         opcodes. Fixes #346563.
3280
3281         * objects.cs: Add a new test.
3282
3283         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
3284
3285         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
3286         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
3287
3288 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
3289
3290         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
3291
3292 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
3293
3294         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
3295         code stream.
3296
3297 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
3298
3299         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
3300
3301         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
3302         optimization in the AOT case.
3303         
3304 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
3305
3306         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
3307         
3308         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
3309
3310         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
3311
3312         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
3313
3314         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
3315         is created by the inlined delegate ctor.
3316
3317         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
3318
3319         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
3320
3321 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
3322
3323         * cpu-x86.md: Fix the length of ckfinite.
3324
3325 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
3326
3327         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
3328         
3329         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
3330         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
3331
3332         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
3333
3334         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
3335         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
3336
3337 2007-11-28  Martin Baulig  <martin@ximian.com>
3338
3339         * mini-x86.c
3340         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
3341         after creating the trampoline.
3342
3343 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
3344
3345         * aot-runtime.c (load_aot_module): Check runtime version if needed.
3346
3347         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
3348         the same version.
3349
3350         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
3351         instead of the calling method to help AOT.
3352
3353         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
3354
3355 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
3356
3357         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
3358         is defined.
3359
3360 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
3361
3362         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
3363         
3364         * aot-compiler.c (compile_method): Correct check for generic method definitions.
3365         (encode_method_ref): No need to handle generic method definitions specially.
3366
3367         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3368
3369         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
3370         decode_klass_info.
3371
3372         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
3373         encode_klass_info.
3374         (compile_method): Enable generic sharing.
3375
3376 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
3377
3378         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
3379         (mini_method_compile): Add preliminary support for AOTing shared generic code.
3380
3381         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
3382         generic code.
3383
3384         * mini-trampolines.c: Fix a warning.
3385
3386         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
3387         NEW_PCONST.
3388         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
3389         (generic_class_is_reference_type): Remove unused function.
3390
3391         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
3392         in the generic vtable trampoline case.
3393
3394         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
3395         
3396         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
3397         return an AOT method based on a vtable slot.
3398
3399         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
3400
3401         * mini.c (mini_get_vtable_trampoline): Export this.
3402
3403 2007-11-22  Martin Baulig  <martin@ximian.com>
3404
3405         * debug-debugger.h
3406         (MonoDebuggerInfo): Move `debugger_version' up.
3407
3408 2007-11-22  Martin Baulig  <martin@ximian.com>
3409
3410         * mini-amd64.c
3411         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
3412
3413         * mini-trampolines.c
3414         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
3415         after compiling the method.
3416
3417 2007-11-20  Martin Baulig  <martin@ximian.com>
3418
3419         * debug-mini.c
3420         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
3421         (mono_debugger_remove_breakpoint): Likewise.
3422         (mono_debugger_check_breakpoints): Likewise.
3423
3424         * debug-debugger.c: Implement the new breakpoint interface here.
3425
3426 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
3427
3428         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
3429         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
3430
3431         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
3432
3433 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
3434
3435         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
3436
3437         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
3438         mini.c.
3439
3440         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
3441         mini.c.
3442
3443         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
3444         returning a vtype in a register.
3445
3446         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
3447         here from the arch specific code.
3448
3449         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
3450         mini.c.
3451
3452         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
3453         (mono_arch_emit_prolog): Increment maximum prolog size.
3454
3455         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
3456         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
3457
3458         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
3459         MonoGenericSharingContext.
3460
3461         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
3462         MonoGenericSharingContext. Allocate memory from the cfg mempool.
3463
3464 2007-11-15  Mark Probst  <mark.probst@gmail.com>
3465
3466         * mini.c, mini.h, generic-sharing.c: Functions for producing code
3467         which extract fields out of the runtime generic context.  Full
3468         sharing of the NEWARR opcode.
3469
3470 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3471
3472         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
3473         --enable-minimal=ssa.
3474
3475 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
3476
3477         * mini-trampolines.c (mono_delegate_trampoline): Update after 
3478         mono_marshal_get_delegate_invoke () signature change.
3479
3480 2007-11-13  Mark Probst  <mark.probst@gmail.com>
3481
3482         * mini.c: Removed the shared context in favor of the generic
3483         sharing context.  Allocate the MonoJitInfo structure with room for
3484         the generic sharing context if it's needed.
3485
3486         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
3487         domain-internals.h now.
3488
3489         * mini-x86.c: Pass the generic sharing context to get_call_info ().
3490
3491         * generic-sharing.c: Several changes for working without a shared
3492         context and instead operating on open types instead.
3493
3494 2007-11-12  David S. Miller  <davem@davemloft.net>
3495
3496        * inssel-sparc.brg: Fix double instruction emit.
3497
3498 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
3499
3500         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
3501         Get/Set/Address methods.
3502         
3503         * mini.c debug-debugger.c mini-trampolines.c: Update after 
3504         mono_marshal_get_delegate_invoke signature change.
3505
3506 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
3507
3508         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
3509         This can happens with dynamic methods. Fixes the other bug in #322722.
3510
3511 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
3512
3513         * tramp-arm.c (mono_arch_patch_callsite): Support patching
3514         BX call sequence.
3515
3516         * mini-arm.c (arm_patch): Implement patching of BX call
3517         sequence. Fixes one of the bugs in #322722.
3518
3519 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
3520
3521        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
3522        under Linux.  We only need to flush every 32-byte cache line.    
3523
3524 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
3525
3526         * mini.c:
3527         move_basic_block_to_end: Add branches when needed, eventually creating
3528         a new BB.
3529         optimize_branches: added a parameter that tells if it's ok to create
3530         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
3531         and avoid calling move_basic_block_to_end when it's not ok.
3532         Fixes bug 318677.
3533
3534 2007-11-07  Mark Probst  <mark.probst@gmail.com>
3535
3536         * mini.c: Abort inlining call to InitializeArray if something
3537         looks wrong.  Let the icall handle it, which now has proper safety
3538         checks.
3539
3540 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
3541
3542         * mini.c (mono_spill_call): add support for soft-float.
3543
3544         * mini.c (mono_method_to_ir): add support for soft-float
3545         to inlined functions that return float.
3546
3547         * mini.c (mono_method_to_ir): add support for soft-float
3548         to cee_stsfld opcode on float fields.
3549
3550 2007-11-05  Geoff Norton  <gnorton@novell.com>
3551
3552         * mini-x86.h: Fix the structure access for X86 Leopard.
3553
3554
3555 2007-11-05  Martin Baulig  <martin@ximian.com>
3556
3557         * mini-trampolines.c
3558         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
3559         after compiling the method to notify the debugger.
3560
3561 2007-11-05  Martin Baulig  <martin@ximian.com>
3562
3563         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
3564
3565 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
3566
3567         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
3568         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
3569
3570 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
3571
3572         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
3573         native-to-managed wrappers.
3574         
3575 2007-11-01  Geoff Norton  <gnorton@novell.com>
3576
3577         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
3578         members.
3579
3580 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
3581
3582         * mini.c, mini-x86.c: when getting back from unmanaged code
3583         to managed via a marshaled delegate we also need to set the
3584         right domain.
3585
3586 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3587
3588         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
3589         for amd64.
3590
3591 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3592
3593         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
3594         let the debugger or other external agents to tell the JIT when
3595         a sw breakpoint has been inserted in the code that the JIT needs
3596         to be able to inspect.
3597
3598 2007-10-31  Martin Baulig  <martin@ximian.com>
3599
3600         * debug-debugger.h
3601         (MonoDebuggerInfo): Remove `runtime_class_init'.
3602
3603 2007-10-30  Martin Baulig  <martin@ximian.com>
3604
3605         * debug-mini.h
3606         (mono_debugger_thread_created): Added `MonoThread *' argument.
3607         (mono_debugger_extended_notification): New public method.
3608         (mono_debugger_trampoline_compiled): New public method.
3609
3610         * debug-mini.c
3611         (MonoDebuggerThreadInfo): Added `thread' and
3612         `extended_notifications' fields.
3613
3614         * debug-debugger.c
3615         (debugger_executable_code_buffer): New static variable.
3616
3617         * debug-debugger.h
3618         (MonoDebuggerInfo): Added `executable_code_buffer',
3619         `executable_code_buffer_size', `breakpoint_info_area',
3620         `breakpoint_table' and `breakpoint_table_size'.
3621
3622 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
3623
3624         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
3625         that IP  either is an unused value or the vtable pointer. IMT 
3626         calls use vtable + offset now. Reduced by almost half the size
3627         of IMT entries.
3628
3629 2007-10-26  Jonathan Chambers <joncham@gmail.com>
3630
3631         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
3632         defines to access param registers. Replace long usage with
3633         gsize as sizeof(long) != sizeof(void*) on Win64.
3634
3635         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
3636         on Win64. Fix intrinsic, use _AddressOfReturnAddress
3637         instead of non-existant _GetAddressOfReturnAddress.
3638
3639         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
3640         param registers. Save/restore %rdi and %rsi in MonoLMF.
3641
3642         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
3643         param registers. Modify (throw_exception) signature to take 
3644         %rdi and %rsi on Win64. 
3645
3646         Code is contributed under MIT/X11 license.
3647
3648 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3649
3650         * helpers.c: unlink debugging output files.
3651
3652 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
3653
3654         * mini.c: Move mono_create_ftnptr () to object.c.
3655
3656 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
3657
3658         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
3659         optional. This function can now be used to disassemble code generated
3660         outside the JIT such as trampolines and IMT thunks.
3661
3662         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
3663
3664         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
3665         vtable pointer from a ldr instruction.
3666
3667         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
3668         new IMT call sequence.
3669
3670         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
3671         call sequence for interface invocations.
3672
3673         * mini-arm.c (mono_arch_emit_imt_argument): added, required
3674         for imt support. This function is empty since IMT on ARM requires no
3675         special handling on the IR side.
3676
3677         * mini-arm.c (mono_arch_find_imt_method): added, required for
3678         imt support.
3679
3680         * mini-arm.c (mono_arch_find_this_argument): added, required
3681         for imt support.
3682
3683         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
3684         a ldr instruction to load a value stored in the code stream.
3685
3686         * mini-arm.c (mono_arch_build_imt_thunk):added, required
3687         for imt support.
3688
3689
3690 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
3691
3692         * mini.c (mini_init): Install the jump trampoline callback.
3693
3694 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3695
3696         * mini-trampolines.c: handle synchronized methods with the common
3697         vtable trampoline (bug #335601).
3698
3699 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
3700
3701         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
3702
3703         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
3704         64 bit platforms.
3705
3706         * mini-ia64.h mini-ia64.c: Add support for IMT.
3707
3708         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
3709         prolog. Fixes #331958.
3710
3711 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
3712
3713         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
3714
3715 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3716
3717         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
3718         trampoline.
3719
3720 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3721
3722         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
3723         trampoline.
3724
3725 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
3726
3727         * mini-x86.c, mini-x86.h: x86 support for the common vtable
3728         trampoline.
3729
3730 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
3731
3732         * mini-trampolines.c: changed the magic rampoline to understand
3733         the common vtable trampoline method: the method to invoke is
3734         determined by the vtable displacement of the call.
3735
3736 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3737
3738         * mini.c, mini.h: register the common vtable trampoline if the
3739         architecture supports it.
3740
3741 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3742
3743         * cpu-amd64.md: use the correct max length for tls_get.
3744
3745 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
3746
3747         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
3748         CEE_STELEM_ANY. Fixes #333696.
3749
3750 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
3751
3752         * exceptions-x86.c: provide more graceful handling of the case where
3753         we followed a bogus function pointer from managed code (bug #332866).
3754
3755 2007-10-11  Mark Probst  <mark.probst@gmail.com>
3756
3757         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
3758         replaces the generic_shared flag and will carry more information
3759         in the future.
3760
3761         * generic-sharing.c: Added mini_type_stack_size() which allows
3762         allows open types if given a generic sharing context.
3763         mini_get_basic_type_from_generic() takes a
3764         MonoGenericSharingContext* instead of a MonoCompile* now.
3765
3766         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
3767         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
3768         mini-sparc.c, mini-x86.c: Trivial changes required by the two
3769         changes above.  Just passing arguments through to the right
3770         places.
3771
3772 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
3773
3774         * mini-arm.c: unify the call emission to emit_code_seq().
3775
3776 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
3777
3778         * tramp-arm.c: reduced the trampoline size.
3779
3780 2007-10-10  Mark Probst  <mark.probst@gmail.com>
3781
3782         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
3783         variable handling out of arch-specific code.
3784
3785 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
3786
3787         * mini-arm.c: implemented fast delegate dispatch.
3788
3789 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
3790
3791         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
3792         that fp elimination is turned off if the space required by locals is too
3793         big. Fixes #331958.
3794
3795 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3796
3797         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
3798         ARM to the new style trampoline.
3799
3800 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
3801
3802         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
3803
3804         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
3805
3806 2007-10-09  Martin Baulig  <martin@ximian.com>
3807
3808         * debug-debugger.h
3809         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
3810         `field_info_offset_offset'.     
3811
3812 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
3813
3814         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
3815         removed more internal usage of the r11 register and made it available
3816         to the register allocator.
3817
3818 2007-10-08  Mark Probst  <mark.probst@gmail.com>
3819
3820         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
3821         when sharing generics and treat type variables as references.
3822
3823 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
3824
3825         * mini-ppc.c: started removing the internal uses of register r11
3826         to eventually allow the register allocator to manage it as an
3827         additional available register.
3828
3829 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
3830
3831         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
3832
3833 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
3834
3835         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
3836         specific trampolines as they are not performance critical as a jump
3837         target (maybe align as before only for AOT code?). This saves about
3838         200 KB of native code on x86 for monodevelop startup.
3839
3840 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
3841
3842         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
3843         monodevelop startup.
3844
3845 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
3846
3847         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
3848
3849         * mini-sparc.h mini-sparc.c: Implement IMT support.
3850
3851         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
3852         its smaller and doesn't clobber sparc_g1.
3853
3854         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
3855
3856 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
3857
3858         * mini-ppc.c: optimized the size of the IMT thunks a bit.
3859
3860 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
3861
3862         * mini-ppc.c: implemented fast delegate invocation.
3863
3864 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
3865
3866         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
3867
3868 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
3869
3870         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
3871         code to the new style trampoline in preparation for IMT support.
3872
3873 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
3874
3875         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
3876         systems already. This also reduces the specific trampiline sizes and
3877         prepares for the use of r12 as the IMT identifier register.
3878
3879 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3880
3881         * mini-mips.h: endianess fix (simplified from a patch by
3882         Thomas Kunze <thommy@tabao.de>, bug #323737).
3883
3884 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
3885
3886         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
3887         to access ucontext fields and enable netbsd support
3888         (partially from Magnus Henoch <mange@freemail.hu>).
3889
3890 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3891
3892         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
3893         use the preprocessor from the CPP env var if it is set.
3894
3895 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
3896
3897         * mini-trampolines.c: fixed an assertion and moved it earlier in the
3898         code, before interface_offset gets used.
3899
3900 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
3901
3902         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
3903         mono_class_setup_vtable () before accessing klass->vtable.
3904
3905 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
3906
3907         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
3908         hackish.
3909
3910 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3911
3912         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
3913         IMT slots (this saves hundreds of KB of memory in programs like
3914         IronPython and Monodevelop).
3915
3916 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
3917
3918         * mini.c: print the delegate counter.
3919
3920 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
3921
3922         * mini-x86.c: make it easier to enable the debugging code for IMT
3923         slots.
3924
3925 2007-09-28  Martin Baulig  <martin@ximian.com>
3926
3927         * debug-debugger.h
3928         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
3929         `mono_method_klass_offset' and `mono_method_token_offset'.
3930
3931 2007-09-20  Mark Probst  <mark.probst@gmail.com>
3932
3933         * mini.c: First generics sharing implementation.  Can only share
3934         in very simple cases.  If sharing doesn't work it falls back to
3935         dedicated compilation.
3936
3937         * mini.h: Flag in MonoCompile to specify whether generic
3938         compilation is shared.  Flags enum for marking which generic inst
3939         of a context is used.  Prototypes for helper functions.
3940
3941         * generic-sharing.c: Helper functions for generic method sharing.
3942
3943         * optflags-def.h: Optimization flag (gshared) for enabling generic
3944         method sharing added.
3945
3946         * Makefile.am: generic-sharing.c added.
3947
3948 2007-09-19 Daniel Nauck <dna@mono-project.de>
3949
3950         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
3951
3952 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
3953         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
3954         fixes bug 325507.
3955
3956 2007-09-19  Martin Baulig  <martin@ximian.com>
3957
3958         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
3959         mono_debug_cleanup() is now part of mono_cleanup().
3960
3961 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
3962
3963         * driver.c (mono_main): Fix a warning.
3964
3965 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
3966
3967         * aot-compiler.c: Optimize various parts when processing large assemblies.
3968         Fixes ##325568.
3969
3970         * mini.c (mono_patch_info_hash): Improve hash function.
3971
3972 2007-09-14  Jonathan Chambers <joncham@gmail.com>
3973
3974         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
3975         
3976         Code is contributed under MIT/X11 license.
3977
3978 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
3979
3980         * mini.c (mini_init): Fix a leak.
3981
3982         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
3983
3984 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3985
3986         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
3987
3988 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
3989
3990         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
3991
3992 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
3993
3994         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
3995         variance tests.
3996
3997         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
3998
3999         * mini.c (handle_alloc): Enable managed allocators in AOT code.
4000
4001         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
4002
4003         * aot-runtime.c (decode_patch_info): Ditto.
4004
4005 2007-09-12  Jonathan Chambers <joncham@gmail.com>
4006
4007         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
4008         static case. Cache delegates in architecture specific code, 
4009         based on number of parameters.
4010         
4011         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
4012         in architecture specific code, based on number of parameters.
4013         
4014         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
4015         caching happen in architecture specific code now.
4016         
4017         Code is contributed under MIT/X11 license.
4018
4019 2007-09-12  Jonathan Chambers <joncham@gmail.com>
4020
4021         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
4022         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
4023         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
4024
4025         Code is contributed under MIT/X11 license.
4026
4027 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
4028         * mini.c: (mono_thread_abort) Fixed bug #82416.
4029
4030 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
4031
4032         * mini.: hook the new managed GC allocation feature into the JIT.
4033
4034 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4035
4036         * mini.c: implementation for the new runtime tls opcode.
4037
4038 2007-09-11  Martin Baulig  <martin@ximian.com>
4039
4040         * debug-debugger.h
4041         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
4042         `mono_method_inflated_offset'.
4043
4044 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
4045
4046         * driver.c mini.h mini.c: Add a new devel command line option for injecting
4047         async exceptions into a method.
4048
4049         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
4050         purpose of testing whenever the unwinder works at every instruction.
4051
4052 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
4053
4054         * mini.c: check accessibility of method used in ldftn (fixes
4055         bug #82635).
4056
4057 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
4058
4059         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
4060
4061         * inssel.brg: Fix a warning.
4062
4063 2007-09-03  Martin Baulig  <martin@ximian.com>
4064
4065         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
4066         now takes the `main_method' as argument.
4067
4068 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
4069
4070         * cpu-sparc.md (endfilter): Add missing src1:i argument.
4071
4072 2007-08-30  Jonathan Chambers <joncham@gmail.com>
4073
4074         * driver.c: include the cil-coff.h header on Windows.
4075         
4076         Code is contributed under MIT/X11 license.
4077
4078 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
4079
4080         * mini.c, driver.c: don't include the cil-coff.h header.
4081
4082 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
4083
4084         * mini.c: flag places that needs fixes fo soft-float support.
4085
4086 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
4087
4088         * mini.h, inssel-float.brg: fix soft-float constant loads on big
4089         endian systems (partially from Dean Jenkins, bug #81924).
4090
4091 2007-08-28  Mark Probst  <mark.probst@gmail.com>
4092
4093         * mini.c (check_linkdemand): Remove embedded reference object in
4094         call to LinkDemandSecurityException.
4095         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
4096         with an IntPtr instead of a reference object.
4097
4098 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
4099
4100         * mini.c (handle_initobj): Handle alignment properly.
4101
4102         * inssel.brg (mini_emit_memset): Ditto. 
4103
4104         * inssel.brg (mini_emit_memcpy): Ditto. 
4105
4106         * inssel-sparc.brg: Ditto.              
4107
4108         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
4109
4110 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
4111
4112         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
4113         exceptions raised in unmanaged code. Fixes part of #82594.
4114
4115 2007-08-24  Mark Probst  <mark.probst@gmail.com>
4116
4117         * mini.c (mono_method_to_ir), declsec.c
4118         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
4119
4120 2007-08-22  Martin Baulig  <martin@ximian.com>
4121
4122         * debug-mini.h
4123         (MonoDebuggerThreadInfo): New typedef.
4124         (mono_debugger_thread_table): New global variable.
4125         (mono_debugger_thread_created): New public function.
4126         (mono_debugger_thread_cleanup): New public function.
4127
4128         * debug-debugger.h
4129         (MonoDebuggerInfo):
4130         - removed `get_current_thread' and `lookup_assembly'.
4131         - removed `data_table'.
4132         - added `thread_table'.
4133
4134         * mini.c
4135         (mono_thread_start_cb): Call mono_debugger_thread_created().
4136         (mono_thread_attach_cb): Likewise.
4137         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
4138         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
4139         initial domain.
4140
4141         * driver.c (mono_main): Move mono_debug_init() up, before calling
4142         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
4143
4144 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4145
4146         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
4147         together when passing several arguments of type double (gives a small
4148         speedup and saves a few bytes of generated code).
4149
4150 2007-08-20  Jb Evain  <jbevain@novell.com>
4151
4152         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
4153
4154 2007-08-20  Jb Evain  <jbevain@novell.com>
4155
4156         * mini.c (mono_method_to_ir): throw MethodAccessException
4157         and FieldAccessException instead of InvalidProgramException.
4158
4159 2007-08-20  Mark Probst  <mark.probst@gmail.com>
4160
4161         * mini.c: CoreCLR security checks.
4162
4163         * mini.h: Removed MonoSecurityMode (moved to
4164         metadata/security-manager.h) and mono_security_mode global var
4165         (replaced by set/get functions in security-manager.h).
4166
4167         * driver.c: Added "core-clr-test" security mode for testing.  Used
4168         set-function for setting security mode.
4169
4170 2007-08-17  Mark Probst  <mark.probst@gmail.com>
4171
4172         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
4173         the new jit_info_table.
4174
4175         * driver.c: Test code for the new jit_info_table (enabled by the
4176         define MONO_JIT_INFO_TABLE_TEST).
4177
4178 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
4179
4180         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
4181         detection of call <REG> instruction sequence. Fixes build on freebsd.
4182
4183 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
4184
4185         * mini-exceptions.c: Fix a warning.
4186
4187 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
4188
4189         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
4190         stack overflow handling code on amd64 too.
4191
4192         * mini-exceptions.c (mono_setup_altstack): Make this use 
4193         mono_thread_get_stack_bounds ().
4194
4195         * mini-x86.h: Disable sigaltstack on solaris x86.
4196
4197 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
4198
4199         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
4200
4201 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
4202
4203         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
4204
4205 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
4206
4207         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
4208
4209         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
4210
4211 2007-08-03  Neale Ferguson <neale@sinenomine.net>
4212
4213         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
4214         due to alignment.
4215
4216 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
4217
4218         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
4219         to be emitted (bug #82281).
4220
4221 2007-08-01  Martin Baulig  <martin@ximian.com>
4222
4223         Merged the `debugger-dublin' branch.
4224
4225         * debug-debugger.h (MonoDebuggerInfo):
4226         Removed the `old_*' compatibility entries.
4227         Added `debugger_version' and `data_table'.
4228         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
4229         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
4230
4231         * debug-mini.c
4232         (MiniDebugMethodBreakpointInfo): Add `address_list'.
4233         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
4234         instead of a `gconstpointer'.
4235         (mono_debugger_insert_method_breakpoint): Return a
4236         `MonoDebugMethodAddressList *'.
4237
4238 2007-06-28  Martin Baulig  <martin@ximian.com>
4239
4240         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
4241
4242 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
4243
4244         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
4245         __builtin_frame_address () since it is broken on older gcc versions.
4246
4247 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4248
4249         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
4250         on the stack overflow handling and made the managed stack overflows
4251         catchable in most cases using soft guard pages.
4252         * exceptions-x86.c: added code to restore the protection in the soft
4253         guard pages at the end of exception handling.
4254
4255 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
4256
4257         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
4258
4259 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4260
4261         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
4262         exception handling.
4263
4264 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4265
4266         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
4267         signal handling support until it has been ported to the new mechanism.
4268         * mini.c: fixed stack overflow detection and use the new
4269         architecture code  to handle signals on the altstack.
4270
4271 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
4272
4273         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
4274         stack overflows on the alt stack.
4275
4276 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
4277
4278         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
4279         stack overflows on the alt stack.
4280
4281 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
4282
4283         * exceptions-ppc.c: cleanup preparing for altstack support.
4284
4285 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
4286
4287         * exceptions-arm.c: cleanup preparing for altstack support.
4288
4289 2007-07-27  Mark Probst  <mark.probst@gmail.com>
4290
4291         * mini.c (print_jit_stats): Output hazard pointer stats.
4292
4293 2007-07-26  Mark Probst  <mark.probst@gmail.com>
4294
4295         * driver.c, mini.c: Replaced security mode flags with a single
4296         enum variable.
4297
4298 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4299
4300         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
4301
4302 2007-07-25  Mark Probst  <mark.probst@gmail.com>
4303
4304         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
4305         (which doesn't do anything yet) for activating Core CLR
4306         (Silverlight) security.
4307
4308 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
4309
4310         * mini-codegen.c: work around a possible gcc bug on arm.
4311
4312 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4313
4314         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
4315         message for platforms that don't support AOT compilation.
4316
4317 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4318
4319         * mini.h, mini.c, driver.c: temporary smcs hack.
4320
4321 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
4322
4323         * mini-arm.h, mini-arm.c: arm EABI fixes.
4324
4325 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
4326
4327         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
4328         case.
4329
4330         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
4331         trampolines taking a method argument.
4332
4333         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
4334
4335         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
4336         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
4337
4338         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
4339         JIT compilation throws an exception. Fixes #82050.
4340
4341 2007-07-19  Mark Probst  <mark.probst@gmail.com>
4342
4343         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
4344         with the MONO_EXCEPTION_ defines.
4345
4346 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
4347
4348         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
4349         #82117.
4350         
4351         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
4352         the cause of an assertion.
4353
4354 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
4355
4356         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
4357         removed.
4358
4359 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
4360
4361         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
4362         assert. Should fix #82103.
4363
4364 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
4365
4366         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
4367         here too. Fixes #82095.
4368
4369         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
4370         addresses.
4371
4372         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
4373
4374         * mini-amd64.h: Enable IMT for amd64.
4375         
4376         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
4377
4378 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
4379
4380         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
4381
4382 2007-07-12  Mark Probst  <mark.probst@gmail.com>
4383
4384         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
4385         as soon as check_linkdemand sets an exception_type.
4386
4387 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
4388
4389         * mini-x86.c: fixed offsets for IMT call sequence.
4390         * mini-x86.h: enable IMT again.
4391
4392 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
4393
4394         * trace.c (mono_trace_enter_method): Decode MonoType too.
4395
4396         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
4397
4398         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
4399
4400         * mini-amd64.c: Add preliminary IMT implementation.
4401         
4402 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
4403
4404         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
4405         understand the new IMT-base interface invocation (thanks to
4406         Daniel Nauck for the report and the remote debugging session).
4407
4408 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4409
4410         * mini-x86.c: size and speed optimizations for the IMT bsearch.
4411
4412 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
4413
4414         * Makefile.am (aotcheck): Make this actually use the AOTed code.
4415
4416 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
4417
4418         * mini-trampolines.c: implement AOT IMT support.
4419         * mini-x86.h: enable IMT support for wider testing.
4420
4421 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
4422
4423         * inssel.brg (emit_imt_argument): Add aot support here.
4424
4425         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
4426
4427 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4428
4429         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
4430         of the IMT implementation, partially from massi, with my
4431         implementation of the bsearch sequence. Disabled by default until
4432         the AOT code is implemented.
4433
4434 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
4435
4436         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
4437
4438         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
4439
4440 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4441
4442         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
4443         arch-independent IMT JIT code from Massimiliano
4444         Mantione (massi@ximian.com) with small cleanups from me.
4445
4446 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
4447
4448         * Makefile.am: fix svn invocation to get the svn revision to be
4449         independent of the local language (build fix).
4450
4451 2007-07-09  Mark Probst  <mark.probst@gmail.com>
4452
4453         * mini.c (inline_method): Reset cfg->exception_type if the
4454         inlining is aborted.  Fixes: 82049.
4455
4456 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
4457
4458         * mini.c: remove assert from exception handling code when exception_ptr
4459         is not set.
4460
4461 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
4462
4463         * mini.c (mono_codegen): Add an assert.
4464
4465         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
4466         enter and leave code.
4467         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
4468
4469 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4470
4471         * mini-ppc.c: fixed memory corruption for localloc(0)
4472         (bug #81852).
4473
4474 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
4475         
4476         * mini.c: Fix warnings.
4477
4478 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
4479
4480         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
4481         to emit better double->int conversions.
4482
4483 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4484
4485         * mini.c: the provided Min/Max optimizations are valid for unisgned
4486         ints.
4487
4488 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
4489
4490         * 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
4491
4492 2007-06-28  Miguel de Icaza  <miguel@novell.com>
4493
4494         * mini.c (mono_running_on_valgrind): Add support for reporting the
4495         method and  its boundaries to valgrind.
4496
4497 2007-06-28  Martin Baulig  <martin@ximian.com>
4498
4499         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
4500
4501 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
4502
4503         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
4504
4505         * generic.2.cs: Add new test case.
4506
4507 2007-06-25  Martin Baulig  <martin@ximian.com>
4508
4509         Merged the `debugger-dublin' branch.
4510
4511         * debug-mini.c
4512         (mono_debugger_insert_method_breakpoint): New public method.
4513         (mono_debugger_remove_method_breakpoint): Likewise.
4514         (mono_debugger_check_breakpoints): New static method.
4515         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
4516
4517         * debug-debugger.h (MonoDebuggerInfo):
4518         Renamed (to keep backward compatibility in the vtable):
4519         `insert_breakpoint' -> `old_insert_breakpoint'.
4520         `remove_breakpoint' -> `old_remove_breakpoint'.
4521         `create_string' -> `old_create_string'.
4522         `lookup_class' -> `old_lookup_class'.
4523         `lookup_type' -> removed; changed into a dummy field.
4524         `lookup_assembly' -> `old_lookup_assembly'.
4525         Added (same functionality, but different signature):
4526         `create_string', `lookup_class', `lookup_assembly'
4527         Added new:
4528         `get_method_addr_or_bpt', `remove_method_breakpoint',
4529         `runtime_class_init'.
4530
4531         * debug-debugger.c: Merged the `debugger-dublin' branch.
4532
4533 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
4534
4535         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
4536         well.
4537         (peephole_pass): Likewise.
4538
4539 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
4540
4541         * driver.c: hopefully make setaffinity work also for ancient
4542         versions of linux.
4543
4544 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
4545
4546         * driver.c : win32 build fix.
4547
4548 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
4549
4550         * driver.c: check for the MONO_NO_SMP env var and bind to a single
4551         processor if it is set.
4552
4553 2007-06-21  Martin Baulig  <martin@ximian.com>
4554
4555         * debug-mini.h: New file.
4556
4557         * debug-mini.c
4558         (mono_debugger_insert_breakpoint_full): Moved here from
4559         ../metadata/mono-debug-debugger.c.
4560         (mono_debugger_remove_breakpoint): Likewise.
4561         (mono_debugger_breakpoint_callback): Likewise.
4562
4563 2007-06-15  Raja R Harinath  <rharinath@novell.com>
4564
4565         * jit-icalls.c (mono_helper_compile_generic_method): Update to
4566         changes in MonoGenericClass.
4567
4568 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
4569
4570         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
4571
4572 2007-06-14  Raja R Harinath  <rharinath@novell.com>
4573
4574         * jit-icalls.c (mono_helper_compile_generic_method): Update to
4575         removal of MonoGenericMethod.
4576
4577 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4578
4579         * mini-exceptions.c: hooks for the exception events profiling API.
4580
4581 2007-06-14  Randolph Chung  <tausq@debian.org>
4582
4583         * Makefile.ma: Add hppa target.
4584         * mini-arch.h: Include mini-hppa.h
4585         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
4586         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
4587         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4588
4589 2007-06-14  Randolph Chung  <tausq@debian.org>
4590
4591         * inssel.brg: Add rules for "chained" compare-branch operations so that
4592         a single compare op can affect multiple branches.  Adjust cost for
4593         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
4594         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
4595         cost for some rules so that they can more easily be overridden by
4596         per-arch rules (with fixes from lupus).
4597         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4598
4599 2007-06-13  Randolph Chung  <tausq@debian.org>
4600
4601         * mini-ops.h: Reorder branch ops so that they match the order of the
4602         corresponding CEE_* ops.  The code expects them this way.
4603         Add new ops for HPPA target.
4604         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4605
4606 2007-06-13  Randolph Chung  <tausq@debian.org>
4607
4608         * mini-exceptions.c: Handle cases where the stack grows towards
4609         larger addresses.
4610         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4611
4612 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
4613
4614         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
4615         counter.
4616         * driver.c: explain where a non-matching corlib is found.
4617
4618 2007-06-13  Mark Probst  <mark.probst@gmail.com>
4619
4620         * mini.c (print_jit_stats): Output dynamic code allocation stats.
4621
4622 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
4623
4624         * mini-exceptions.c: Generate a method profile leave event during
4625         an exception to ensure that the profiler gets notified.
4626
4627 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
4628
4629         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
4630         branch.
4631
4632         * cpu-amd64.md: Add long_and/or/xor opcodes.
4633
4634 2007-06-06  Wade Berrier  <wberrier@novell.com>
4635
4636         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
4637         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
4638         length of instruction shr_imm (expected 8, got 10)
4639
4640 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
4641
4642         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
4643
4644 2007-06-06  Mark Probst  <mark.probst@gmail.com>
4645
4646         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
4647         MonoInternalHashTable again (fixed bug in the internal hash table
4648         code).
4649
4650 2007-06-06  Mark Probst  <mark.probst@gmail.com>
4651
4652         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
4653         Have to figure out what makes it crash the SWF regression.
4654
4655 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
4656
4657         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
4658
4659 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4660
4661         * mini.c: optimize out the type check when storing null in a
4662         reference array.
4663
4664 2007-06-04  Mark Probst  <mark.probst@gmail.com>
4665
4666         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
4667         MonoInternalHashTable.
4668
4669 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
4670
4671         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
4672         signed integer methods.
4673
4674 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
4675
4676         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
4677         permanently since the current approach doesn't work.
4678
4679 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
4680
4681         * inssel.brg (stmt): Only call delegate->invoke_impl if 
4682         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
4683
4684 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
4685
4686         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
4687         the sreg2==rdx case.
4688         
4689         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
4690         account if it contains a rex prefix.
4691         (peephole_pass): Handle OP_FMOVE as well.
4692
4693 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
4694
4695         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
4696         as it causes regressions.
4697
4698 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
4699
4700         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
4701         static case as well.
4702
4703         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
4704
4705         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
4706         (mono_arch_get_this_arg_from_call): Ditto.
4707
4708         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
4709
4710         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
4711         invoke_impl field.
4712
4713         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
4714         (mono_arch_get_this_arg_from_call): Ditto.
4715
4716         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
4717         
4718         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
4719         try to create optimized invoke code and use that for further invocations. 
4720         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
4721
4722         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
4723
4724 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
4725
4726         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
4727         sealed classes or methods.
4728         *devirtualization.cs: tests for the new optimization
4729
4730 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
4731
4732         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
4733         by the update_volatile () function.
4734
4735 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
4736
4737         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
4738         require it.
4739
4740         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
4741
4742 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
4743
4744         * mini.c: Add configure checks for header files.
4745         * mini-x86.c: Add configure checks for header files.
4746         * trace.c: Add configure checks for header files.
4747         * aot-runtime.c: Add configure checks for header files.
4748         * aot-compiler.c: Add configure checks for header files.
4749         * driver.c: Add configure checks for header files.
4750         * mini-codegen.c: Add configure checks for header files.
4751         
4752         Code is contributed under MIT/X11 license.
4753
4754 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
4755
4756         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
4757         icompare_imm -128 + op_iclt. Fixes #81703.
4758
4759 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
4760
4761         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
4762
4763 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
4764
4765         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
4766         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
4767         so that all isinst checks now use "interface_bitmap".
4768
4769 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
4770
4771         * cpu-amd64.md (jmp): Fix a warning.
4772
4773         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
4774
4775         * basic.cs: Add new regression test.
4776
4777         * basic.cs: Remove test which is now in basic-long.cs.
4778
4779         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
4780
4781         * basic-long.cs: Add new test.
4782         
4783 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
4784
4785         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
4786
4787 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
4788
4789         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
4790
4791         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
4792         places.
4793         
4794         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
4795         throwing code a bit.
4796
4797         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
4798         the exception throwing code a bit.
4799
4800         * mini-x86.c (get_call_info): Allocate result from a mempool.
4801
4802 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
4803
4804         * aot-compiler.c (find_typespec_for_class): Fix the assert.
4805
4806         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
4807
4808         * mini.h (MonoCompile): Add 'token_info_hash' field.
4809
4810         * mini.c: Save token->method associations during compilation so the AOT 
4811         compiler can use it.
4812         
4813         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
4814         which reference generic classes and methods.
4815
4816 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
4817
4818         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
4819
4820         * aot-compiler.c (compile_method): Fix a typo in a comment.
4821
4822         * aot-runtime.c (decode_cached_class_info): Skip generic types.
4823
4824         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
4825         everything generic.
4826
4827         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
4828
4829 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
4830
4831         * mini.h (MonoCompile): Add 'args' field.
4832
4833         * mini.c (mono_compile_create_vars): Store variables representing the arguments
4834         into cfg->args.
4835
4836         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
4837
4838 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
4839
4840         * mini.c (mono_compile_get_interface_var): Remove this unused function.
4841
4842         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
4843
4844         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
4845         opcodes for some opcodes.
4846
4847         * mini.h *.brg *.c: Use the new opcodes.
4848
4849 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
4850
4851         * mini.h: Bumped aot revision.
4852
4853         * inssel.brg: modified code generation of type checks for interfaces
4854         to use the new "MonoClass.interface_bitmap" instead of the old
4855         "MonoClass.interface_offsets".
4856
4857 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
4858
4859         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
4860
4861 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
4862
4863         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
4864         64 bit platforms.
4865
4866 2007-04-27  Neale Ferguson <neale@sinenomine.net>
4867
4868         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
4869
4870 2007-04-27  Wade Berrier  <wberrier@novell.com>
4871
4872         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
4873         mini.h) to fix build.
4874
4875 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
4876
4877         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
4878         
4879         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
4880         causes the corlib unit tests to fail.
4881
4882 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
4883
4884         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
4885
4886         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
4887
4888         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
4889         opcodes to the comparison relations.
4890
4891         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
4892         opcodes to their types.
4893         
4894         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
4895
4896         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
4897         it in cfg->arch.cinfo.
4898
4899         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
4900
4901         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
4902         cfg->cil_offset_to_bb.
4903
4904 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
4905
4906         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
4907         created becase of initlocals.
4908
4909 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
4910
4911         * mini-alpha.c cpu-alpha.md: More alpha port work from 
4912         Sergey Tikhonov <tsv@solvo.ru>.
4913
4914 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
4915
4916         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
4917
4918 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
4919
4920         * cpu-s390.md (break): Correct the length of break instruction.
4921
4922 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4923
4924         * mini.c: fix a couple of soft-float issues and comments.
4925
4926 2007-04-15  Miguel de Icaza  <miguel@novell.com>
4927
4928         * trace.c (is_filenamechar): - is also a filename char.
4929
4930 2007-04-15  Neale Ferguson <neale@sinenomine.net>
4931
4932         * mini-s390.c: Correct checking for enum type in return value processing.
4933
4934 2007-04-14  Raja R Harinath  <rharinath@novell.com>
4935
4936         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
4937         (version.h): Makefile is in the build directory.
4938
4939 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
4940
4941         * mini-amd64.h: fix for assertion failure on Solaris/amd64
4942
4943 2007-04-11  Martin Baulig  <martin@ximian.com>
4944
4945         * mini.c (can_access_member): Fix handling of generic classes;
4946         fixes #81259.
4947
4948 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
4949
4950         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
4951
4952 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
4953
4954         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
4955
4956 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
4957
4958         * mini-codegen.c: make sure the right spill amount is
4959         used for fp or integer registers (fixes the float_sub_spill() on ppc).
4960
4961 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
4962
4963         * mini-ppc.c: fixes for the fp_branch_nan test.
4964
4965 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
4966
4967         * basic.cs: Comment out new test which still fails on ia64.
4968
4969 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4970
4971         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
4972
4973 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
4974
4975         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
4976
4977 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
4978
4979         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
4980         on 64 bit machines. Fixes part of #80738.
4981
4982         * basic.cs: Add regression test.
4983
4984 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
4985
4986         * inssel.brg basic.cs: Revert previous change to fix build.
4987
4988         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
4989         platforms.
4990         
4991         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
4992
4993         * basic.cs: Add new regression test.
4994
4995 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
4996
4997         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
4998         many arguments.
4999
5000 2007-03-16  Neale Ferguson <neale@sinenomine.net>
5001
5002         * cpu-s390x.md: Correct length of break instruction.
5003
5004 2007-03-16  Neale Ferguson <neale@sinenomine.net>
5005
5006         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
5007         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
5008
5009 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
5010
5011         * *.c: Begin WIN64 port.
5012         * mini.c:  Use correct register in profiler.
5013         * mini-amd64.c: No inline assembly on Win64.
5014         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
5015         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
5016         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
5017         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
5018         mono_arch_ip_from_context for Win64.
5019         
5020         Contributed under MIT/X11 license.
5021
5022 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
5023
5024         * exceptions-amd64.c (seh_handler): Ditto.
5025
5026         * exceptions-x86.c (seh_handler): Fix a memory leak.
5027
5028 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
5029
5030         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
5031         mini-s390x.c: fixed peephole optimizations to deal
5032         correctly with 1 and 2 byte reload avoidance.
5033
5034 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
5035
5036         * cpu-s390.md, cpu-s390x.md: update localloc length.
5037
5038 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
5039
5040         * cpu-g4.md: added missing descriptions.
5041
5042 2007-03-14  Miguel de Icaza  <miguel@novell.com>
5043
5044         *  Makefile.am: Add support so the tail tests are not executed on
5045         PowerPC as that is a known limitation of the PowerPC port.
5046
5047 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
5048
5049         * runmdesc.bat:  Move to msvc directory.
5050         
5051 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
5052
5053         * runmdesc.bat:  Run executable that was produced by the current
5054         target and sent via an argument.
5055         
5056 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
5057
5058         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
5059         #81102.
5060
5061         * generics.2.cs: Add regression test.
5062
5063 2007-03-09  Wade berrier  <wberrier@novell.com>
5064
5065         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
5066
5067 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
5068
5069         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
5070         AOT code depends on this.
5071
5072 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
5073
5074         * mini.c: more precise tracking of types in the eval stack
5075         (part of fix for bug #81044).
5076
5077 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
5078
5079         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
5080
5081         * aot-compiler.c (encode_patch): Remove an obsolete comment.
5082
5083 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
5084
5085         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
5086
5087         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
5088
5089 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
5090
5091         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
5092         a pointer on 64 bit systems. Fixes #80190.
5093
5094         * iltests.il: Add new regression test.
5095
5096 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5097
5098         * mini.c: inline a constant for Environment.IsRunningOnWindows.
5099
5100 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
5101
5102         * trace.c: Remove an erroneous alignemnt check when tracing.
5103           Fixes --trace on OSX86.
5104
5105 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
5106
5107         * mini-$(arch).h: initialize SP in context for all the archs.
5108
5109 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
5110
5111         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
5112         regressions in the thread tests.
5113
5114 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
5115
5116         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
5117         - fixed implementation of LOCALLOC opcode
5118         - implemented non-un compare for floats
5119         - code cleanup
5120         - implementation of FDIV and CKFINITE opcodes
5121         - fixes for latest mono updates
5122         - additional arch opcodes
5123
5124 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
5125
5126         * Makefile.am: simplify and merge rules for cross-compilation.
5127
5128 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
5129
5130         * local-propagation.c: Actually *apply* the fix for bug 80591...
5131
5132 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
5133
5134         * mini-exceptions.c: backuot part of the last change
5135         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
5136
5137 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
5138         * inssel.brg: Fix bug 59286.
5139
5140
5141 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
5142
5143         * mini-exceptions.c: patch from Zoltan to correctly check for
5144         stack boundaries (using the stack register, not the frame register),
5145         fixes bugs #80724, #79717.
5146
5147 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
5148
5149         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
5150         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
5151
5152         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
5153         presence of frame pointer elimination.
5154
5155 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
5156         
5157         * mini-x86.h: NetBSD UCONTEX_REG defines.
5158
5159 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
5160
5161         * inssel-amd64.brg: Fix amd64 build.
5162
5163 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
5164
5165         * mini.h: remove extern to workaround what looks likes gcc bug 26905
5166         on amd64.
5167
5168 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
5169
5170         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
5171         ends.
5172
5173         * mini-<ARCH>.c: Use mono_is_regsize_var ().
5174
5175 2007-01-30 Mark Mason <mason@broadcom.com>
5176
5177            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
5178            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
5179            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
5180            beginning support for CEE_JMP [not quite working yet]
5181            * tramp-mips.c: LMF handling now works
5182         
5183 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
5184
5185         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
5186
5187         * mini.h (NULLIFY_INS): New macro.
5188
5189 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5190
5191         * mini.c: statistical profiler fix for windows, patch
5192         from Tor Lillqvist (tml@novell.com).
5193
5194 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
5195         * local-propagation.c: Fix bug 80591.
5196
5197 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
5198
5199         * Makefile.am: put back the --export-dynamic option as with
5200         the previous gmodule flags (thanks to Robert Jordan).
5201
5202 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
5203
5204         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
5205
5206         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
5207         simplify and speed up the local register allocator. Also rename some fields
5208         like iassign->vassign.
5209         
5210         * regalloc.c: Remove some functions which are no longer used since their
5211         inlined version is in mini-codegen.c.
5212         
5213         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
5214
5215         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
5216
5217 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
5218
5219         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
5220         narrowing. Fixes #80622.
5221
5222         * iltests.il: Add new regresssion test. 
5223
5224 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
5225
5226         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
5227         debug-debugger.c, debug-debugger.h: warning fixes.
5228         * driver.c: updated copyright year and made it fit in one line.
5229
5230 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
5231
5232         * aot-runtime.c: updated to use mono-dl instead of gmodule.
5233
5234 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
5235
5236         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
5237
5238         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
5239
5240         * iltests.il: Add new test for bug #80507.
5241
5242 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5243
5244         * mini-arm.h: use soft-float also on vfp for now.
5245
5246 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
5247
5248         * mini.c: fix some more soft-float issues.
5249
5250 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
5251
5252         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
5253
5254 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
5255         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
5256         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
5257         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
5258
5259 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
5260
5261         * mini-arm.c: typo fix.
5262
5263 2007-01-23  Neale Ferguson <neale@sinenomine.net>
5264
5265         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
5266
5267 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
5268
5269         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
5270         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
5271
5272         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
5273
5274         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
5275
5276         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
5277         
5278         * inssel.brg: Fix a warning.
5279
5280         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
5281
5282         * abcremoval.c ssa.c ssapre.c: Update after this change.
5283         
5284         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
5285
5286         * dominators.c (df_set): Use mono_bitset_union_fast.    
5287
5288 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
5289
5290         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
5291         mini-codegen.c: reduce relocations and memory usage for the cpu
5292         description.
5293
5294 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
5295
5296         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
5297
5298         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
5299         to reduce their size.
5300
5301 2007-01-19 Mark Mason <mason@broadcom.com>
5302
5303         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
5304         * mini-mips.c: more configuration macros, support long conditional branches, additional
5305         asserts, fix epilog instrumentation.
5306         * mini-mips.h: use standard stack walk
5307         * cpu-mips.md: increase size of div, rem and conditional branches
5308         
5309 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
5310
5311         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
5312         to cpu spec data.
5313
5314 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
5315
5316         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
5317         (compile_method): Ditto.
5318
5319         * aot-runtime.c (decode_klass_info): Ditto.
5320
5321         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
5322         needed by the code generated by inssel.brg. Also fix a warning.
5323
5324 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
5325
5326         * mini.c: deal with enums that become genericinsts by
5327         being nested in a generic class (bug #79956).
5328
5329 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
5330
5331         * mini.c: match the generic definition to check for
5332         private access with generic types (bug #78431).
5333
5334 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
5335
5336         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
5337         to make life easier for people cross-compiling that insist on not
5338         using scratchbox.
5339
5340 2007-01-17 Mark Mason <mason@broadcom.com>
5341
5342         * inssel-long.brg: patch to deal with mips missing flags
5343         * inssel-long32-mips.brg: implement overflow checks
5344         * insset-mips.brg: implement overflow checks
5345         * mini-mips.h: implement conditional exception handling
5346         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
5347           Remove unused code, minor cleanups.
5348         * exceptions-mips.c: minor cleanups
5349         * mini-ops.h: add mips conditional exception ops
5350         * cpu-mips.md: add mips conditional exception ops
5351
5352         
5353 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
5354
5355         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
5356         to deal with mips missing of flags.
5357
5358 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
5359
5360         * exceptions-ppc.c: execute fault handlers.
5361
5362 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
5363
5364         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
5365
5366 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
5367
5368         * mini.c: handle also floating point values in initialize_array.
5369
5370 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
5371
5372         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
5373         array initialization and make it conditional on the intrins option.
5374
5375 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
5376
5377         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
5378         relocations and put the patch info names close to the enum definition.
5379
5380 2007-01-15 Mark Mason <mason@broadcom.com>
5381
5382         * basic.cs, exceptions.cs: break up large tests to increase debugability.
5383
5384 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5385
5386         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
5387
5388 2007-01-12  Raja R Harinath  <rharinath@novell.com>
5389
5390         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
5391
5392 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
5393
5394         * Makefile.am: distribute the mips sources.
5395
5396 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5397
5398         * mini-codegen.h: handle bug #80489 here, by excluding ecx
5399         directly.
5400
5401 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
5402
5403         * cpu-x86.md: back out for now as this triggers other regressions.
5404
5405 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
5406
5407         * cpu-x86.md: force src1 and dest regpair for long shift instructions
5408         to eax:edx, so ecx can't get allocated to them (bug #80489).
5409
5410 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
5411
5412         * mini.c, mini-exceptions.c: enabled running fault handlers
5413         (bug #80469).
5414
5415 2007-01-03  Miguel de Icaza  <miguel@novell.com>
5416
5417         * driver.c: If nothing fail, do not use the string "failed",
5418         because it makes it very annoying to view test result logs on the
5419         web. 
5420
5421 2006-12-30  Miguel de Icaza  <miguel@novell.com>
5422
5423         * debug-debugger.c (mono_debugger_main): Rename "main" to
5424         "main_method" to prevent a warning.
5425
5426         Remove a warning for unused field.
5427
5428 2006-12-28  Martin Baulig  <martin@ximian.com>
5429
5430         * debug-debugger.c
5431         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
5432
5433 2006-12-22  Martin Baulig  <martin@ximian.com>
5434
5435         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
5436         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
5437         seperate `.mdb_debug_info' section, so we can access it from the
5438         debugger even if the binary is stripped.
5439
5440         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
5441         from the `.mdb_debug_info' here to prevent the linker from
5442         removing that section.
5443
5444         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
5445         mdb-debug-info64.s.
5446
5447 2006-12-19  Robert Jordan  <robertj@gmx.net>
5448
5449         * mini-x86: enable the code to return small structures in
5450         registers for FreeBSD as well. Fixes bug #80278.
5451         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
5452
5453 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5454
5455         * mini-x86.c: align the stack when calling the profiler
5456         function instrumenting the prolog (on OSX).
5457
5458 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
5459
5460         * mini.c: emit a break opcode where Debugger.Break () is called.
5461
5462 2006-12-13  Miguel de Icaza  <miguel@novell.com>
5463
5464         * mini.c (mono_method_to_ir): Provide useful information on this
5465         assert, to prevent others from debugging like I did.
5466
5467 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
5468
5469         * mini.c: enable code which was incorrectly commented
5470         (bug #80235).
5471
5472 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
5473
5474         * mini-x86.c: enable on OSX, too, the code to return small
5475         structures in registers.
5476
5477 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
5478
5479         * mini-x86.c: remove the use of the dynamic code manager here, too.
5480
5481 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
5482
5483         * mini.h, debug-debugger.c, tramp-*.c: fixed 
5484         mono_debugger_create_notification_function() to use
5485         mono_global_codeman_reserve () instead of a dynamic code manager.
5486
5487 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
5488
5489         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
5490         ves_array_element_address() jit icall and use a generated
5491         managed method instead (which is about 4 times faster for a rank 3
5492         array access).
5493
5494 2006-11-29  Mark Mason  <mason@broadcom.com>
5495
5496         * basic-calls.cs: additional tests for passing
5497         structures as function arguments.
5498
5499 2006-11-29  Mark Mason  <mason@broadcom.com>
5500
5501         * mini-mips.h: disable custom exception handling
5502         * mini-mips.c: throw/rethrow should use jalr to call
5503         exception stubs.  Fixed bug with passing structures
5504         by value. More support for tracing floating point
5505         functions.
5506
5507 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5508
5509         * mini.c: fixed typo in the soft-float ldind.r4 handling
5510         (bug #80086).
5511
5512 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
5513
5514         * mini.c, mini.h, driver.c: added --runtime command line
5515         option to select a different runtime than the autodetected one.
5516         * jit.h: added API for embedders to initialize with a specific
5517         runtime version.
5518
5519 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
5520
5521         * mini.c: handle also boxing of r4 values (bug #80024).
5522
5523 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
5524
5525         * mini-ppc.c: force indirect calls until we reserve
5526         enough address space for all the generated code.
5527
5528 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
5529
5530         * exceptions-arm.c: workaround bugs in the libc definition
5531         of struct ucontext.
5532
5533 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
5534
5535         * inssel.brg: fixes from me and Mark Mason.
5536
5537 2006-11-23  Dick Porter  <dick@ximian.com>
5538
5539         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
5540         semaphore display now we've fixed the initial value
5541
5542 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
5543
5544         * inssel.brg: partially revert the last change to fix the build.
5545
5546 2006-11-21  Mark Mason  <mason@broadcom.com>
5547
5548         * inssel.brg: Add and use compare-and-branch macros to support
5549         architectures that do not have condition code registers (ie. MIPS).
5550         * *-mips.{c,brg,md}: Fix copyright statements
5551
5552 2006-11-20  Mark Mason  <mason@broadcom.com>
5553
5554         * Makefile.am: remove mini-codegen.c from list of MIPS sources
5555         * mini.c: Allow GET_CONTEXT to be specified by the arch port
5556         * mini.h: Added declaration for mono_print_ins()
5557         * mini-codegen.c: added ins_spec initializer for MIPS
5558         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
5559         vreg to be virtual and hreg to be non-virtual.
5560         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
5561         is not yet working/implemented correctly.
5562         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
5563         non-static, fixup calls to print_ins() from other parts in the file.
5564
5565 2006-11-20  Mark Mason  <mason@broadcom.com>
5566
5567         * basic-calls.cs: added tests for passing structures as arguments
5568         to calls.
5569
5570 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
5571
5572         * inssel-long32.brg: optimize signed division by power of two.
5573
5574 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
5575
5576         * mini-arm.c: added support for interworking with thumb code
5577         (mono must be still be built using the ARM instruction encoding).
5578
5579 2006-11-19  Miguel de Icaza  <miguel@novell.com>
5580
5581         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
5582         verifier has different rules for it.   Fixes a few verifier issues
5583         in the test suite.
5584
5585         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
5586         at the end, so people know what happened.
5587
5588 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
5589
5590         * brach-opts.c: in optimize_exception_target() make sure we
5591         are in a catch clause (fixes bug #79871).
5592
5593 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
5594
5595         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
5596         more soft-float support fixes.
5597
5598 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
5599
5600         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
5601         that are passed half on the stack and half in registers.
5602
5603 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
5604
5605         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
5606         more mips integration work from Mark E Mason 
5607         <mark.e.mason@broadcom.com>.
5608
5609 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
5610
5611         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
5612         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
5613         tramp-mips.c: added sources for the mips port, not
5614         integrated in the build yet. Contributed by
5615         Mark E Mason <mark.e.mason@broadcom.com>.
5616
5617 2006-11-14  Neale Ferguson <neale@sinenomine.net>
5618
5619         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
5620
5621 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
5622
5623         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
5624         put the soft-float rules in its own file since it seems to
5625         break s390 compilation.
5626
5627 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
5628
5629         * mini-arm.c: fixed wrnings.
5630
5631 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
5632
5633         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
5634         inssel-arm.brg: ARM support for soft-float.
5635
5636 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
5637
5638         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
5639         loads and stores of 32 bit fp values.
5640
5641 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
5642
5643         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
5644
5645         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
5646         works. Fixes #79852 and #79463.
5647
5648 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
5649
5650         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
5651         more soft-float support WIP and fixes.
5652
5653 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
5654
5655         * mini-arm.c: some VFP updates.
5656
5657 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
5658
5659         * mini-exceptions.c: 0 is a valid local var offset in some
5660         architectures, don't assert (bug #78508).
5661
5662 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
5663
5664         * exceptions-arm.c: fixed off by one error in stack walk code.
5665
5666 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
5667
5668         * mini.h, mini.c: more precise tracking of type load exceptions.
5669
5670 2006-11-03  Robert Jordan  <robertj@gmx.net>
5671
5672         * Makefile.am: [WIN32] Add monow.exe target.
5673         * driver.c: [WIN32] Don't detach the console when debugging.
5674         Fixes bug #79797.
5675         
5676 2006-10-30  Miguel de Icaza  <miguel@novell.com>
5677
5678         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
5679
5680 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
5681
5682         * aot-compiler.c (emit_method_info): Add a case missed earlier.
5683
5684         * driver.c (mini_regression): Fix --regression with AOT.
5685
5686         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
5687
5688 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
5689
5690         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
5691
5692         * mini-sparc.h: Don't use sigaction on sparc/linux.
5693
5694         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
5695
5696         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
5697
5698         * mini-exceptions.c: Add proper include files for getpid ().
5699
5700 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
5701
5702         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
5703         address instead of a MonoJitInfo* to avoid decoding the exception info for the
5704         method.
5705
5706         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
5707         name cache to reduce its size.
5708
5709         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
5710
5711 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
5712
5713         * mini-x86.c: Save/restore the current LMF structure more efficiently using
5714         the mono_lmf TLS variable.
5715
5716         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
5717         trampoline lmf frames.  
5718
5719         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
5720
5721 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
5722
5723         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
5724         the mono_lmf TLS variable.
5725
5726         * mini-exceptions.c: Access the LMF structure through accessors.
5727
5728         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
5729         variable instead of in jit_tls->lmf.
5730
5731         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
5732         
5733         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
5734         trampoline lmf frames.
5735
5736         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
5737
5738 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
5739
5740        * mini.c trace.c mini-x86.c: Revert these too.
5741         
5742        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
5743        signature change.
5744
5745 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
5746
5747         * genmdesc.c: removed now dead code.
5748
5749 2006-10-09  Robert Jordan <robertj@gmx.net>
5750
5751         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
5752
5753 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
5754
5755         * mini.h: do not leave gaps in the opcode values.
5756
5757 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
5758
5759         * jit-icalls.h: flag functions as internal here, too.
5760
5761 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
5762
5763         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
5764         functions with the internal attribute.
5765
5766 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
5767
5768         * aot-compiler.c: fclose the file descriptor in the profile read loop.
5769
5770 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
5771
5772         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
5773         for soft-float.
5774
5775 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
5776
5777         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
5778         tail calls as on other platforms.
5779
5780         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
5781
5782         * iltests.il: Add a few tailcall tests.
5783
5784 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5785
5786         * driver.c: fix loop for old compilers (bug #79521).
5787
5788 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
5789
5790         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
5791
5792         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
5793
5794         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
5795         metadata without any code.
5796
5797         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
5798         more precise debugging information using gdb.
5799
5800 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
5801
5802         * inssel-ia64.brg: Make the helper methods static.
5803
5804 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
5805
5806         * inssel-x86.brg: make the helper methods static.
5807
5808 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
5809
5810         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
5811
5812 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
5813
5814         * mini.c: updates for monoburg changes.
5815         * inssel.brg: make a few helper functions static as they should.
5816
5817 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
5818
5819         * Makefile.am: Move mini-codegen.c to common_sources.
5820
5821 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5822
5823         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
5824         instructions.
5825         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
5826         mini-ppc.h: port to use the common local register allocator.
5827
5828 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
5829
5830         * mini.h: Remove the comment too then.
5831
5832 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
5833
5834         * mini.h: put back backend.data which is to be used shortly and
5835         doesn't increase the size of MonoInst. If any 64 bit arch aligned
5836         pointers on 4 byte boundaries it'd have much bigger issues running
5837         and you can ifdef it out anyway.
5838
5839 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
5840
5841         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
5842         MonoInst size by 4 bytes on 64 bit machines.
5843
5844 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
5845
5846         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
5847         replacement with more meaningful field names. Arch maintainers, please
5848         check the assigned names are good enough for your arch.
5849
5850 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
5851
5852         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
5853         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
5854
5855 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
5856
5857         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
5858         relocations and memory requirements, put the optimization flags
5859         definitions in their own file.
5860
5861 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
5862
5863         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
5864
5865         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
5866
5867 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
5868
5869         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
5870
5871 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
5872
5873         * inssel.brg: use the correct function to get the size of an item
5874         in an array, given an element class.
5875         * aot-compiler.c: do not access class->class_size directly.
5876
5877 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
5878
5879         * mini.h, debug-mini.c: added a debugging function to print
5880         info about local variables and arguments in a jitted method.
5881
5882 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
5883
5884         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
5885
5886         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
5887
5888 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
5889
5890         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
5891         inner and outer loops when passing vtypes.
5892
5893 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
5894
5895         * mini-ppc.c: take into account the cpu errata for cache flushing
5896         which caused some random errors (bug #79381).
5897
5898 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
5899
5900         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
5901         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
5902
5903 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
5904
5905         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
5906         loaded.
5907
5908         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
5909         freebsd ports tree.
5910
5911         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
5912         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
5913
5914         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
5915         displacement.
5916
5917 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
5918
5919         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
5920
5921 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
5922
5923         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
5924         macro does not have to be changed during debugging.
5925
5926         * 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>.
5927
5928         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
5929
5930         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
5931         
5932         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
5933         MONO_ARCH_NO_EMULATE_MUL is defined.
5934
5935         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
5936
5937         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
5938
5939         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
5940
5941         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
5942         
5943 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
5944
5945         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
5946         stuff to mini-exceptions.c where it is used.
5947
5948         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
5949         setup code, the real one is in mini-exceptions.c.
5950
5951         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
5952         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
5953         some changes from the freebsd ports tree.
5954
5955         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
5956         constants.
5957         
5958         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
5959
5960 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
5961
5962         * mini.c: on Linux, check for /proc to be mounted
5963         (bug# 79351, novell bug#201204).
5964
5965 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
5966
5967         * mini.c: handle cases where pthread_attr_getstack() behaves
5968         incorrectly (bug #78096).
5969
5970 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
5971
5972         * mini-arm.c: support larger stack frames (bug #79272).
5973
5974 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
5975
5976         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
5977
5978         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
5979         tokens.
5980
5981         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
5982         mono_class_from_name () to find a class from its name.
5983
5984         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
5985
5986 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
5987
5988         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
5989
5990 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
5991
5992         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
5993
5994 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
5995
5996         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
5997         callinfo->trampoline.
5998
5999         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
6000         fixes #79271.
6001         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
6002         future.
6003
6004 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
6005
6006         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
6007
6008 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
6009
6010         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
6011         stats.method_trampolines, it is already done by the generic trampoline code.
6012
6013         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
6014         
6015 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
6016
6017         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
6018
6019         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
6020
6021         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
6022
6023         * mini.c (print_jit_stats): Print mscorlib mempool size too.
6024         
6025         * mini.c (print_jit_stats): Print new stats.
6026
6027         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
6028
6029 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
6030
6031         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
6032         Address on two dimensional arrays. Fixes #78729.
6033
6034         * mini.h (MonoCompile): Add a 'skip_visibility' field.
6035
6036         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
6037         a method.
6038
6039         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
6040
6041         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
6042         #79130.
6043         
6044         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
6045         a race condition.
6046         (mini_get_ldelema_ins): Ditto.
6047
6048 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
6049
6050         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
6051         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
6052         Fixes #79213.
6053
6054 2006-08-29 Neale Ferguson <neale@sinenomine.net>
6055
6056         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
6057         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
6058
6059         * exceptions-s390x.c: Cosmetic change.
6060
6061         * tramp-s390.c: Fix warning.
6062
6063         * cpu-s390.md: Correct length of mul_imm.
6064
6065 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
6066
6067         * aot-compiler.c: added binary writer with ELF backend
6068         implementation (only on Linux/x86 for now).
6069
6070 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
6071
6072         * Makefile.am: Don't run net 2.0 AOT tests.
6073
6074         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
6075         (mono_compile_assembly): Skip net 2.0 assemblies as well.
6076
6077         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
6078
6079 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6080
6081         * aot-compiler.c: simplified and refactored the asm-writing code
6082         to allow different backends.
6083
6084 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
6085
6086         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
6087
6088         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
6089         little. Share patches of type TYPE_FROM_HANDLE as well.
6090
6091         * mini.c (mono_patch_info_equal): New helper function.
6092         (mono_patch_info_hash): Ditto.
6093
6094         * aot-compiler.c (emit_method_code): Fix s390 build.
6095
6096         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
6097         is not handled because it is stored as a flag and not as a type ctor. Fixes
6098         #79016.
6099
6100 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
6101
6102         * aot-compiler.c: Fix computation of GOT slot statistics.
6103         
6104         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
6105         Also remove support for not PIC AOT.
6106
6107         * mini.h: Bump AOT file format version.
6108
6109         * objects.cs: Add a test for #78990.
6110
6111         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
6112         (peter.dettman@iinet.net.au). Fixes #79087.
6113
6114         * basic-long.cs: Add a test for the above.
6115
6116 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
6117
6118         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
6119         
6120         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
6121         code somewhat.
6122
6123 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
6124
6125         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
6126         exceptions.
6127
6128 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
6129
6130         * mini.c: Don't verify COM proxy invoke calls
6131         
6132
6133 2006-08-10  Dick Porter  <dick@ximian.com>
6134
6135         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
6136         which process is holding semaphores locked.
6137
6138 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
6139
6140         * mini-ia64.c mini-amd64.c: Fix #79027.
6141
6142         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
6143
6144         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
6145
6146         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
6147         implicit arguments in a vararg call. Fixes #79027.
6148
6149 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
6150
6151         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
6152         (mono_get_array_new_va_signature): Ditto.
6153
6154 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
6155
6156         * aot-runtime.c: Call init_plt lazily.
6157
6158         * inssel-long.brg: Fix unsigned long->int conversion.
6159
6160         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
6161
6162         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
6163         that most data is now in the .rss/.data section.
6164
6165 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
6166
6167         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
6168
6169         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
6170
6171         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
6172
6173         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
6174
6175         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
6176         virtual call. Fixes #79010.
6177
6178         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
6179         and use the result as the this argument in the real call.
6180
6181         * generics.2.cs: Add a new test for #79010.
6182         
6183 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
6184
6185         * mini-x86.c: Fix a warning.
6186
6187         * aot-compiler.c: Add a bunch of statistics.
6188
6189         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
6190
6191 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
6192
6193         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
6194
6195 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
6196
6197         * 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>.
6198
6199 2006-07-13  Miguel de Icaza  <miguel@novell.com>
6200
6201         * mini.c (mono_method_to_ir): Obtain the original method in the
6202         CIL stream and use this to perform validation.
6203
6204         Fixed: #78816
6205
6206 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
6207
6208         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
6209         (mono_arch_call_opcode): Ditto.
6210
6211         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
6212         #78826.
6213
6214         * mini.c (mono_patch_info_dup_mp): New helper function.
6215         
6216         * aot-compiler.c (compile_method): Fix some of the memory allocated during
6217         compilation. Fixes #78827.
6218
6219 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
6220
6221         * declsec.c: Use original security informations for
6222           MONO_WRAPPER_MANAGED_TO_MANAGED.
6223
6224 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
6225
6226         * mini.c: Allow Com Interop methods/classes and
6227         don't verify COM wrapper calls
6228         
6229
6230 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
6231
6232         * inssel-long32.brg: Fix long->i4 checked conversion.
6233
6234         * exceptions.cs: Add a test for the above.
6235
6236 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
6237
6238         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
6239
6240         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
6241         leaks.
6242
6243         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
6244         #78775.
6245
6246 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
6247
6248         * mini.c: Fix solaris/x86 exception handling.
6249
6250         * Makefile.am: Get rid of $(ICU_LIBS).
6251
6252 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
6253
6254         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
6255         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
6256         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
6257
6258         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
6259
6260         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
6261         this function causes a SIGSEGV.
6262
6263 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
6264
6265         * mini.c: Remove unused solaris/x86 includes.
6266
6267 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
6268
6269         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
6270
6271 2006-06-20  Jb Evain  <jbevain@gmail.com>
6272
6273         * cpu-g4.md: fix max length of start_handler instruction.
6274
6275 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
6276         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
6277
6278 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
6279         * ssa.c: Fixed bug 78653 for SSA based deadce.
6280         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
6281         MonoInst.flags, used in SSA based deadce.
6282         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
6283         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
6284
6285 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
6286
6287         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
6288         it can end up using non executable memory on ppc64 systems
6289         running ppc32 userspace (fix from Johannes Berg).
6290
6291 2006-06-14  Dick Porter  <dick@ximian.com>
6292
6293         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
6294         4.1.1
6295
6296 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
6297         * mini.c: Made so that inline is locally disabled if it would
6298         trigger a .cctor, because too many apps depend on this behavior
6299         (which seems to be also the one of the MS CLR).
6300
6301 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
6302
6303         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
6304         No idea why this worked before.
6305
6306         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
6307         which branch to outer exception clauses since they could skip the
6308         inner finally clauses. Fixes #78633.
6309
6310         * exceptions.cs: Add a test for the above.
6311
6312         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
6313         Fixes #78629.
6314
6315         * iltests.il: Add a test for the above.
6316
6317 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
6318
6319         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
6320         after the end of a try bblock, to prevent asserts in mini_method_compile ().
6321
6322         * iltests.il: Add a test for the above.
6323
6324 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
6325
6326         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
6327         
6328         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
6329         methods as instrinsics.
6330
6331 2006-06-09  Wade Berrier <wberrier@novell.com>
6332
6333         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
6334         (simple-cee-ops.h ssapre-mini-ops.h)
6335
6336 2006-06-09  Neale Ferguson <neale@sinenomine.net>
6337
6338         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
6339         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
6340         instruction).
6341         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
6342         * cpu-s390x.md: Fix max. length values for a couple of instructions.
6343
6344 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
6345
6346         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
6347
6348 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
6349
6350         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
6351         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
6352         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
6353         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
6354         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
6355         of opcodes, so that bug 78549 should not happen again.
6356         * ssapre.c: Updated to use the renamed files.
6357
6358 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
6359
6360         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
6361         in OP_ATOMIC_EXCHANGE_I4.
6362
6363 2006-06-07  Wade Berrier <wberrier@novell.com>
6364
6365         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
6366         in mono_debugger_create_notification_function)
6367
6368 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
6369
6370         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
6371         
6372         * mini.c (type_from_stack_type): Disable some changes which do not
6373         seem to work.
6374
6375         * driver.c: Reenable opts.
6376
6377         * mini.h (MonoStackSlot): New structure to keep track of the verification state
6378         of the evaluation stack.
6379         
6380         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
6381         evaluation stack trace at entry to the bblock.
6382
6383         * mini.c (merge_stacks): New function to perform verification of stack merges.
6384         Turned off by default.
6385
6386         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
6387         STACK_MP.
6388         
6389 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
6390
6391         * local-propagation.c: Fixed bug 78549.
6392
6393 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
6394
6395         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
6396
6397 2006-06-02  Miguel de Icaza  <miguel@novell.com>
6398
6399         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
6400         tramp-arm.c, tramp-ia64.c
6401         (mono_debugger_create_notification_function): Update signature to
6402         new signature and use new protocol for creating the notification
6403         function.  
6404
6405         Should fix the build.
6406
6407 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
6408
6409         * exceptions-ppc.c (mono_jit_walk_stack)
6410         (ves_icall_get_frame_info): Fix the build
6411
6412 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
6413
6414         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
6415
6416 2006-05-31  Raja R Harinath  <rharinath@novell.com>
6417
6418         * il2tests.2.il: New file for generics CIL tests.  Add test for
6419         #78019.
6420         * Makefile.am: Update.
6421
6422         Fix #78019
6423         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
6424         to nullable types.
6425
6426 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
6427
6428         * aliasing.c: Fixed bug 78311.
6429
6430 2006-05-29  Martin Baulig  <martin@ximian.com>
6431
6432         * mini-exceptions.c (mono_find_jit_info): When computing the
6433         native offset, check whether we're actually inside the method's
6434         code; call mono_debug_print_stack_frame() to format the frame.
6435         (ves_icall_System_Exception_get_trace): Call
6436         mono_debug_print_stack_frame() to format the stack frame.
6437         (ves_icall_get_trace): Update to the new debugging API.
6438         (mono_jit_walk_stack_from_ctx): Likewise.
6439         (ves_icall_get_frame_info): Likewise.
6440
6441         * mini.c (get_method_from_ip): Use the new debugging API.
6442         (mono_print_method_from_ip): Likewise.
6443
6444         * exceptions-ppc.c
6445         (mono_jit_walk_stack): Use the new debugging API.
6446         (ves_icall_get_frame_info): Likewise.   
6447
6448 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
6449
6450         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
6451
6452 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
6453
6454         * mini.c: Added "limitator" to inline for debugging.
6455
6456 2006-05-24  Martin Baulig  <martin@ximian.com>
6457
6458         * debug-debugger.c (mono_debugger_init): Create a private,
6459         malloc()-based code manager for the notification function and
6460         intentionally leak it on exit.  This fixes the crash-on-exit race
6461         condition.
6462
6463         * tramp-amd64.c
6464         (mono_debugger_create_notification_function): Added
6465         `MonoCodeManager *' argument.
6466
6467         * tramp-x86.c
6468         (mono_debugger_create_notification_function): Added
6469         `MonoCodeManager *' argument.
6470
6471 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
6472
6473         * aliasing.c: Fixed 64 bit issue.
6474         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
6475         default since all known bugs are fixed (one more time!).
6476
6477 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6478
6479         * mini.c: write barrier support.
6480
6481 2006-05-23  Martin Baulig  <martin@ximian.com>
6482
6483         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
6484         check at the top of the file.
6485
6486 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
6487
6488         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
6489         reverting changes without reason and without changelog entries.
6490
6491 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
6492
6493         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
6494         to a few opcodes. Fixes #78439.
6495
6496         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
6497         consistency with other archs.
6498
6499         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
6500
6501 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
6502
6503         * debug-debugger.c: fix the build.
6504
6505 2006-05-17  Martin Baulig  <martin@ximian.com>
6506
6507         * debug-debugger.c
6508         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
6509         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
6510         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
6511         (debugger_attach): Call GC_mono_debugger_add_all_threads().
6512
6513 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
6514
6515         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
6516
6517 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
6518
6519         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
6520         MONO_TYPE_GENERICINST.
6521         
6522         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
6523         MONO_TYPE_GENERICINST.
6524
6525 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
6526
6527         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
6528         #78325.
6529
6530 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
6531
6532         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
6533         mempool.
6534         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
6535
6536 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
6537
6538         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
6539         mono_trace_cleanup ().
6540
6541         * iltests.il: Fix problem with the newly added test.
6542
6543         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
6544         due to register constraints, free up the previous hreg. Fixes #78314.
6545
6546         * iltests.il: Add new test for #78314.  
6547
6548         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
6549         Interlocked.Add. Fixes #78312.
6550
6551         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
6552         
6553 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
6554
6555         * inssel.brg (mini_emit_virtual_call): Fix a warning.
6556
6557 2006-05-05  Martin Baulig  <martin@ximian.com>
6558
6559         * debug-mini.c (mono_debug_open_block): New method.
6560
6561         * mini-amd64.c
6562         (mono_arch_output_basic_block): Call mono_debug_open_block() at
6563         the beginning of each basic block.
6564
6565         * mini-x86.c
6566         (mono_arch_output_basic_block): Call mono_debug_open_block() at
6567         the beginning of each basic block.
6568
6569 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
6570
6571         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
6572         default until I understand why they break the build on amd64.
6573
6574 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
6575
6576         * mini.c (mini_cleanup): Call mono_cleanup ().
6577
6578         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
6579         errors.
6580
6581 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
6582
6583         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
6584         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
6585         default since all known bugs are fixed, and I cannot reproduce bug
6586         77944... I'm asking Matt Hargett to test again after this commit.
6587
6588 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
6589
6590         * mini-codegen.c: Fixed typo that thrashed inline.
6591
6592 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
6593
6594         * dominators.c (compute_dominators): Avoid using a worklist since
6595         it is not correct in some cases. Instead, iterate over all bblocks as
6596         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
6597
6598 2006-04-28  Miguel de Icaza  <miguel@novell.com>
6599
6600         * mini.c (mono_jit_compile_method_inner): Use
6601         mono_prepare_exception_from_error that resets the value
6602         internally.
6603
6604 2006-04-27  Miguel de Icaza  <miguel@novell.com>
6605
6606         * mini.c: Move the mini_loader_error_to_exception to metadata. 
6607         
6608 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
6609
6610         * aliasing.c: Fixed bug 78210.
6611
6612 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
6613
6614         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
6615         default until all their problems (or the ones they trigger) are fixed.
6616
6617 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
6618
6619         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
6620         
6621         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
6622         as loaded only after resolving patches since that could invoke the same method.
6623
6624         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
6625
6626         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
6627         functions.
6628
6629         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
6630         AOT loader.
6631
6632         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
6633         stack.
6634
6635         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
6636         made from AOT code through the PLT table.
6637
6638         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
6639         holding the plt offset when a call is made to the aot plt trampoline.
6640         
6641 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
6642
6643         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
6644         amd64 AOT support.
6645
6646         * Makefile.am (common_sources): Fix build breakage.
6647
6648         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
6649         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
6650         intra-assembly calls if possible.
6651         
6652         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
6653
6654         * mini-trampolines.c: Handle PLT entries.
6655
6656         * mini.c: Avoid creating a GOT var for calls.
6657
6658         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
6659         from mscorlib code.
6660
6661         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
6662         from mscorlib code.
6663
6664         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
6665         AOT code.       
6666
6667         * mini.h: Bump AOT file format version.
6668         
6669         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
6670         covers more cases.
6671
6672 2006-04-25  Martin Baulig  <martin@ximian.com>
6673
6674         * driver.c: Disable copyprop, consprop and inline when running
6675         inside the debugger.
6676
6677 2006-04-25  Martin Baulig  <martin@ximian.com>
6678
6679         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
6680         with `get_current_thread' and added `detach'.
6681         (MonoDebuggerMetadataInfo): Added `thread_size',
6682         `thread_tid_offset', `thread_stack_ptr_offset' and
6683         `thread_end_stack_offset'.
6684
6685 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
6686
6687         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
6688         aot-runtime.c.
6689
6690         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
6691         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
6692
6693         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
6694
6695         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
6696
6697         * aot.c: Add support for ADJUSTED_IID.  
6698
6699 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
6700
6701         * aot.c (emit_method_order): Don't align method_order_end.
6702
6703         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
6704         the interface ID changes.
6705
6706 2006-04-21  Dick Porter  <dick@ximian.com>
6707
6708         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
6709         cleaning up a thread.  Fixes the new part of bug 77470.
6710
6711 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
6712
6713         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
6714         to managed wrapper.
6715                      
6716 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
6717
6718         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
6719         
6720         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
6721         SIGSEGV. Fixes #78072.
6722
6723         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
6724         unregister our SIGABRT handler.
6725
6726 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
6727
6728         * mini.c: Disabled inline where it can alter the call stack in a
6729         way visible from managed code.
6730         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
6731         default.
6732
6733 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
6734
6735         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
6736         on other platforms. Fixes #78089.
6737
6738 2006-04-13  Martin Baulig  <martin@ximian.com>
6739
6740         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
6741         determine whether we're inside the debugger.
6742
6743         * debug-debugger.h
6744         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
6745
6746 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
6747
6748         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
6749         handler clauses. Fixes #78024.
6750
6751         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
6752         in the CALL_MEMBASE opcodes. Fixes #78088.
6753         (mono_arch_get_vcall_slot_addr): Ditto.
6754
6755 2006-04-10  Martin Baulig  <martin@ximian.com>
6756
6757         * debug-debugger.c: The thread handling code has now been moved
6758         into ../metadata/threads.c.
6759
6760 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
6761
6762         * driver.c (mono_main): Fix --with-gc=none build.
6763
6764         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
6765         (mono_spillvar_offset_float): Ditto.
6766         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
6767         hreg, not when its !global, since on ia64, there is a third category: stacked
6768         registers.      
6769
6770 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
6771
6772         * mini.c: set MonoInst->klass for load field address and a few other
6773         places.
6774
6775 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
6776
6777         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
6778
6779 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
6780
6781         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
6782         the branch opt changes.
6783
6784 2006-04-06  Dick Porter  <dick@ximian.com>
6785
6786         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
6787         
6788         * wapihandles.c (mini_wapi_seminfo): 
6789         * driver.c (mono_main): Add semaphore info option
6790
6791 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
6792
6793         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
6794         branch optimization changes. Fixes #78009.
6795
6796 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
6797
6798         * mini.c: ignore accessibility of methods in managed->native wrappers.
6799
6800 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
6801
6802         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
6803         
6804         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
6805
6806 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
6807
6808         * mini.c: Modify the branch optimizations to preserve the invariant that
6809         the entries inside the in_bb and out_bb arrays are unique.
6810         (mono_unlink_bblock): Avoid creation of new arrays.
6811
6812 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
6813
6814         * mini.c (mono_unlink_bblock): Fix regression caused by previous
6815         change (#77992).
6816
6817 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
6818
6819         * mini.c (optimize_branches): Remove the "optimizations" in
6820         the cbranch1/cbranch2 -> branch cases which were causing several
6821         problems in the past. Fixes #77986.
6822
6823 2006-03-31  Chris Toshok  <toshok@ximian.com>
6824
6825         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
6826         default optimizations :(
6827
6828 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
6829
6830         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
6831         branch.
6832
6833 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
6834
6835         * local-propagation.c: Added comments to structs and removed
6836         "Mono" prefixes from local tree mover types.
6837
6838 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
6839
6840         * Makefile.am (arch_sources): Define this for each architecture so 
6841         libmono_la_SOURCES is defined in one place.
6842
6843 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
6844
6845         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
6846         from handles/.
6847
6848 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
6849
6850         * driver.c: print the GC name supplied by configure.
6851
6852 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
6853
6854         * local-propagation.c: Added tree mover, and moved here all the
6855         local propagation code from mini.c
6856         * mini.c: Added support for treeprop, and moved all the local
6857         propagation code to local-propagation.c
6858         * mini.h: Added support for treeprop
6859         * driver.c: Added support for treeprop, enabled consprop, copyprop,
6860         treeprop, inline and deadce by default
6861         * Makefile.am: Added local-propagation.c
6862
6863 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
6864
6865         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
6866
6867 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
6868
6869         * debug-debugger.c: make it compile without the Boehm GC.
6870
6871 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6872
6873         * mini.c: fixed issue with mismatch when an icall is registered
6874         with multiple names but same address.
6875
6876 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
6877
6878         * declsec.c, mini-exceptions.c: use write barrier to set reference
6879         fields of managed objects.
6880
6881 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
6882
6883         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
6884         (can_access_internals): Fix a warning.
6885
6886         * mini.c (print_method_from_ip): Rename this to 
6887         mono_print_method_from_ip so it gets exported.
6888
6889         * trace.c: Deal with strings inside StringBuilder's containing garbage
6890         and fix memory leaks. Fixes #77848.
6891
6892 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
6893
6894         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
6895         fixes #77787.
6896
6897 2006-03-16 Neale Ferguson <neale@sinenomine.net>
6898         
6899         * mini-s390.c: Remove OP_X86_TEST_NULL.
6900
6901 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
6902
6903         * mini.c: use the correct GetHashCode() for the moving collector.
6904
6905 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
6906
6907         * liveness.c: Regalloc spill cost tuning.
6908
6909 2006-03-15 Neale Ferguson <neale@sinenomine.net>
6910         
6911         * mini-s390x.h: Correct S390_LONG macro.
6912
6913         * mini-s390x.c: Cleanup unused code.
6914
6915 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
6916
6917         * jit-icalls.h: New file.
6918
6919         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
6920         icalls and include that instead of including jit-icalls.c.
6921
6922         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
6923         OP_X86 opcodes.
6924
6925 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
6926
6927         * mini.c: when checking for member accessibility, also check for
6928         friend assemblies and for explicit interface implementations.
6929
6930 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
6931
6932         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
6933
6934         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
6935
6936         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
6937         common cases are done first.    
6938
6939         * mini-ops.h: Only define platform specific opcodes on the given platform.
6940
6941         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
6942         branch.
6943         
6944 2006-03-14  Martin Baulig  <martin@ximian.com>
6945
6946         Revert Paolo's change from r57348:
6947
6948         * mini.h: don't use gboolean for bitfields.
6949         * mini.c: verifier changes for fields and methods accessibility.
6950
6951 2006-03-13  Neale Ferguson <neale@sinenomine.net>
6952
6953         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
6954
6955         * mini-s390x.c: Fix conv_r_un.
6956
6957         * cpu-s390, cpu-s390x.md: Fix lengths.
6958
6959 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
6960
6961         * mini.c: nested types have access to all the nesting
6962         levels, not just the enclosing types.
6963
6964 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6965
6966         * mini.c: added a few more verification checks.
6967
6968 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
6969
6970         * liveness.c: Merge optimizations from the linear-il branch.
6971
6972 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
6973
6974         * mini-ia64.c (emit_call): Add a comment.
6975
6976         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
6977
6978         * tramp-ia64.c: Fix some warnings.
6979
6980 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
6981
6982         * mini.h: don't use gboolean for bitfields.
6983         * mini.c: verifier changes for fields and methods accessibility.
6984
6985 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
6986
6987         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
6988         lazy icall wrapper changes.
6989
6990         * dominators.c: Replace all the dominator algorithms with faster
6991         ones from the linear-il branch.
6992
6993         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
6994         the mempool.
6995
6996         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
6997         common cases are done first.
6998
6999         * mini-amd64.c: Fix some warnings.
7000
7001         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
7002         from the mempool.
7003
7004         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
7005         added code.
7006
7007         * mini.h: Add a missing prototype.
7008
7009 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
7010
7011         * mini.c: Compile icall wrappers lazily.
7012
7013         * mini-codegen.c: Use printf instead of g_print since its much faster.
7014
7015         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
7016         function.
7017
7018         * mini.c (optimize_branches): Cache the negative result from 
7019         remove_block_if_useless ().
7020
7021         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
7022         Also fix some bblock linking issues.
7023
7024         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
7025         assembly files.
7026
7027         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
7028
7029         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
7030         accessed fields first, for better cache behavior.
7031         
7032 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7033
7034         * mini.c: speedup IList<T> array accesses.
7035
7036 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
7037
7038         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
7039         inline_costs counter. Fixes #77190.
7040
7041 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
7042
7043         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
7044         trace messages. Fixes #77706.
7045
7046 2006-03-04  Martin Baulig  <martin@ximian.com>
7047
7048         * tramp-amd64.c, tramp-x86.c
7049         (mono_debugger_create_notification_function): Use
7050         mono_global_codeman_reserve() to allocate a buffer at runtime and
7051         return it.
7052
7053         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
7054
7055         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
7056         notification function at runtime and then call `initialize' in the
7057         `MONO_DEBUGGER__debugger_info' vtable.
7058
7059 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
7060
7061         * iltests.il: Fix a visibility problem.
7062
7063 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
7064
7065         * driver.c, mini.c: add hooks for the counters API.
7066
7067 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
7068
7069         * driver.c: show disabled options.
7070
7071 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7072
7073         * linear-scan.c: always use cost-driven selection.
7074
7075 2006-02-28  Raja R Harinath  <rharinath@novell.com>
7076
7077         * jit-icalls.c (helper_compile_generic_method): Revert change from
7078         2006-02-24.
7079
7080 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
7081
7082         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
7083
7084 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
7085
7086         * inssel.brg: style fixes, mostly to force the updated monoburg
7087         to run for people using svn.
7088
7089 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
7090
7091         * mini.c: match monoburg changes.
7092
7093 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7094
7095         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
7096         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
7097         declaration in the header file.
7098
7099 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
7100
7101         * helpers.c: reduce relocations and mem usage.
7102
7103 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
7104
7105         * mini.h, mini-codegen.c: disable logging features if
7106         requested by configure.
7107
7108 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
7109
7110         * mini.c: tiny verifier changes.
7111
7112 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
7113
7114         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
7115         cpu-pentium.md: stack alignment changes for osx/x86,
7116         partially from Geoff Norton <gnorton@customerdna.com>.
7117
7118 2006-02-24  Raja R Harinath  <harinath@gmail.com>
7119
7120         * jit-icalls.c (helper_compile_generic_method): Update to changes
7121         in metadata/class.c.
7122
7123 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
7124         
7125         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
7126         
7127         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
7128         interface calls with large offsets.
7129
7130 2006-02-23  Raja R Harinath  <rharinath@novell.com>
7131
7132         * jit-icalls.c (helper_compile_generic_method): Document the
7133         special-case we depend on so that we can inflate the method twice
7134         with the same context with no bad side-effects.
7135
7136 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
7137
7138         * mini-x86.c, mini-amd64.c: fix for case when xen support
7139         is disabled.
7140
7141 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
7142
7143         * mini-x86.c, mini-amd64.c: generate code to access tls items
7144         in a faster way for Xen systems.
7145
7146 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
7147
7148         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
7149         updates and compilation fixes for the OSX/x86 port, mostly from
7150         Geoff Norton <gnorton@customerdna.com>.
7151
7152 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
7153
7154         * inssel.brg: faster interface call implementation
7155         to sync with the interface_offsets MonoVTable changes.
7156
7157 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
7158
7159         * mini.c: more verification checks.
7160
7161 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
7162
7163         * mini.c: added a few more verification checks.
7164
7165 2006-02-17      Neale Ferguson <neale@sinenomine.net>
7166
7167         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
7168         facility on the processor and use it if available.
7169
7170 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
7171
7172         * driver.c, aot.c, mini.c: throw exception if the IL code is
7173         invalid or unverifiable.
7174
7175 2006-02-17  Raja R Harinath  <rharinath@novell.com>
7176
7177         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
7178         m.StructField.
7179
7180 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
7181
7182         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
7183
7184 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7185
7186         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
7187         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
7188         handling of instantiated generic valuetypes.
7189
7190 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
7191
7192         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
7193         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
7194         instead.
7195
7196         * generics.2.cs: Revert the nullable reftypes tests.
7197
7198 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
7199
7200         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
7201         using __builtin_frame_address (1) as it doesn't work in the presence
7202         of optimizations. Hopefully fixes #77273.
7203
7204         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
7205         -> generics.cs change as it doesn't work with some automake versions.
7206
7207 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
7208
7209         * mini.c: handle systems that sue a different way to
7210         retrieve the stack address of the current thread.
7211
7212 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
7213
7214         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
7215         it specially in the makefile.
7216
7217         * generics.2.cs: Add tests for nullable reference types.
7218
7219 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7220
7221         * mini.c: always handle the case when mono_jit_init()
7222         is called in a thread different from the main thread,
7223         confusing libgc (bug #77309).
7224
7225 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
7226
7227         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
7228
7229 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7230
7231         * mini.c: change optimize_branches () to use a single loop
7232         and introduce a new optimization to simplify some range checks.
7233
7234 2006-02-03  Martin Baulig  <martin@ximian.com>
7235
7236         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
7237         and merged with debugger_thread_manager_add_thread().
7238         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
7239         inform the debugger about the main thread.
7240
7241 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
7242
7243         * basic.cs: Add test for div.un/rem.un constant folding.
7244
7245 2006-02-03  Neale Ferguson <neale@sinenomine.net>
7246
7247         * cpu-s390x.md: correct int_xor_imm length
7248
7249 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
7250
7251         * generics.2.cs: New test for #77442.
7252
7253         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
7254         #77442.
7255
7256 2006-02-02  Martin Baulig  <martin@ximian.com>
7257
7258         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
7259         <mono/metadata/mono-debug-debugger.h>   
7260
7261         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
7262
7263 2006-02-02  Martin Baulig  <martin@ximian.com>
7264
7265         * debug-debugger.h: New header file for debug-debugger.c.
7266
7267         * debug-debugger.c: Big API cleanup; don't run the managed Main()
7268         function is a separate thread anymore; add support for attaching.
7269
7270 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
7271
7272         * tramp-x86.c: Fix a warning.
7273
7274 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
7275
7276         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
7277         on very large methods.
7278
7279         * aot.c (load_patch_info): Fix a warning.
7280
7281 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
7282
7283         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
7284         mini-ops.h: alu membase optimizations.
7285
7286 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
7287
7288         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
7289         to speedup StringBuilder.
7290
7291 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
7292
7293         * dominators.c (mono_compute_natural_loops): Fix detection of
7294         loop body start blocks.
7295
7296         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
7297
7298 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
7299
7300         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
7301         #75145.
7302
7303 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
7304
7305         * aliasing.c: Fixed aliasing issue on 64 bit archs.
7306
7307 2006-01-25  Martin Baulig  <martin@ximian.com>
7308
7309         * debug-debugger.c: Moved the `MonoDebuggerManager' and
7310         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
7311         started to cleanup this file a little bit.
7312
7313 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
7314
7315         * mini.c: optimize a codepath frequently happening in generics code.
7316
7317 2006-01-23  Martin Baulig  <martin@ximian.com>
7318
7319         * Makefile.am: Only compile debug-debugger.c on supported platforms.
7320
7321         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
7322         functions directly.
7323
7324         * driver.c: debug-debugger.c is only available if
7325         `MONO_DEBUGGER_SUPPORTED' is defined.   
7326
7327 2006-01-23  Martin Baulig  <martin@ximian.com>
7328
7329         * debug-debugger.c: Only enable this on platforms where the Mono
7330         Debugger is working (x86 and x86_64).
7331
7332 2006-01-21  Martin Baulig  <martin@ximian.com>
7333
7334         The Mono Debugger is now using the normal `mono' instead of the
7335         `mono-debugger-mini-wrapper' when executing managed code.
7336
7337         * debug-debugger.c: New file; previously known as
7338         debugger/wrapper/wrapper.c.
7339
7340         * debug-mini.c (mono_init_debugger): Removed.
7341
7342         * driver.c (mono_main): Added new `--inside-mdb' command line
7343         argument which is used when running inside the debugger.
7344
7345 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
7346
7347         * liveness.c (mono_analyze_liveness): Remove some unused data
7348         structures.
7349
7350 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
7351
7352         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
7353
7354 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
7355
7356         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
7357         depends on implementation details of monobitset.
7358
7359         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
7360         Fixes #77271.
7361
7362 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
7363
7364         * liveness.c: Update after monobitset changes.
7365
7366 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
7367
7368         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
7369
7370 2006-01-11 Neale Ferguson <neale@sinenomine.net>
7371
7372         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
7373
7374         * mini-s390x.c: Remove warning messages.
7375
7376 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
7377
7378         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
7379
7380 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
7381
7382         * generics.2.cs: Add ldelem/stelem_any test.
7383
7384 2006-01-10 Neale Ferguson <neale@sinenomine.net>
7385
7386         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
7387
7388 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
7389
7390         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
7391         
7392 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
7393
7394         * generics.2.cs: Reenable vtype tests.
7395
7396         * inssel-x86.brg: Remove an icorrect valuetype rule.
7397
7398 2006-01-06 Neale Ferguson <neale@sinenomine.net>
7399
7400         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
7401         initial support for OP_ABS.
7402
7403 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7404
7405         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
7406
7407 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7408
7409         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
7410         conversion and implement LADD/LSUB.
7411
7412         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
7413         architectures.
7414
7415 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7416
7417         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
7418
7419         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
7420         architectures.
7421
7422 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7423
7424         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
7425         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
7426         (stack walk problem).
7427
7428 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
7429
7430         * aot.c (mono_aot_load_method): Fix a warning.
7431
7432 2006-01-03  Neale Ferguson <neale@sinenomine.net>
7433
7434         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
7435
7436 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
7437
7438         * iltests.il: Add test for #77148.
7439
7440         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
7441         #77148.
7442
7443 2006-01-03  Neale Ferguson <neale@sinenomine.net>
7444
7445         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
7446
7447 2006-01-03  Neale Ferguson <neale@sinenomine.net>
7448
7449         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
7450         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
7451
7452         * basic-long.cs: Add lconv-to-r4/r8 tests.
7453
7454 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
7455
7456         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
7457
7458         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
7459         here as on other archs.
7460
7461 2005-12-29 Neale Ferguson <neale@sinenomine.net>
7462
7463         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
7464
7465 2005-12-29 Neale Ferguson <neale@sinenomine.net>
7466
7467         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
7468         
7469         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
7470
7471         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
7472         instrument_prolog; Add memory_barrier instruction.
7473
7474 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
7475
7476         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
7477
7478 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
7479
7480         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
7481
7482         * aliasing.c inssel.brg: Fix warnings.
7483
7484         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
7485         could skip initialization of some parts of memory.
7486
7487         * mini.c mini-ia64.c: Fix warnings.
7488
7489         * inssel-sparc.brg: Add an implementation of lneg which actually works.
7490
7491 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
7492
7493         * aliasing.c (mono_build_aliasing_information): Add a workaround for
7494         a crash seen on sparc.
7495
7496         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
7497         
7498         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
7499
7500 2005-12-21 Neale Ferguson <neale@sinenomine.net>
7501
7502         * mini-ops.h: Add s390_backchain instruction
7503
7504         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
7505
7506         * cpu-s390.md: Add s390_backchain instruction
7507
7508         * mini-s390.c: Significant ABI changes
7509
7510         * mini-s390.h: Cater for zero length structures
7511
7512 2005-12-20 Neale Ferguson <neale@sinenomine.net>
7513
7514         * mini-s390.c: ABI fixes
7515
7516         * inssel-s390.brg: Remove debug statements
7517
7518         * cpu-s390.md: Fix length of ATOMIC_xx operations
7519
7520 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
7521
7522         * basic-float.cs: Add float<->long conversion tests.
7523
7524 2005-12-16 Neale Ferguson <neale@sinenomine.net>
7525
7526         * mini-s390.c: Fix LOCALLOC processing.
7527
7528         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
7529
7530 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
7531
7532         * iltests.il: Add tests for some opcodes not covered by the other
7533         tests.
7534
7535 2005-12-15 Neale Ferguson <neale@sinenomine.net>
7536
7537         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
7538         register loading for Tail processing; Correct trace output.
7539
7540         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
7541
7542         * cpu-s390.md: Correct size of jmp instruction. 
7543
7544 2005-12-13 Neale Ferguson <neale@sinenomine.net>
7545
7546         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
7547
7548 2005-12-13 Neale Ferguson <neale@sinenomine.net>
7549
7550         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
7551           Bring s390 up to current level.
7552
7553 2005-12-12  Zltan Varga  <vargaz@gmail.com>
7554
7555         * generics.2.cs: Disable the newly added tests as they do not work yet.
7556         
7557         * generics.2.cs: Add valuetype tests.
7558
7559 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
7560
7561         * basic-long.cs: Add i4->u8 test.
7562
7563         * objects.cs: Add tests for JIT intrinsic.
7564
7565         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
7566         optimizations lost by a mistake.
7567
7568 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
7569
7570         * basic-long.cs: Remove a test moved to objects.cs.
7571
7572         * arrays.cs: Add more array tests.
7573
7574 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
7575
7576         * arrays.cs: Add new tests for multi-dimensional arrays.
7577
7578 2005-12-06  Raja R Harinath  <rharinath@novell.com>
7579
7580         * Makefile.am (test_sources2): Add generics.2.cs.
7581         (EXTRA_DIST): Add test_sources2.
7582
7583 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
7584
7585         Support for boxing and unboxing nullable types as well as the
7586         isinst operation on nullables, per the CLI ammendment.
7587
7588         * inssel.brg (CEE_ISINST): Special case for nullable
7589
7590         * mini.c (handle_unbox_nullable): new method
7591         (handle_box): Special case for nullable types
7592         (mono_method_to_ir): Call handle_unbox_nullable in correct
7593         places.
7594
7595         * generics.2.cs: New test suite
7596
7597         * Makefile.am: Support for regression tests with generics.
7598
7599 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
7600
7601         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
7602         allocated to registers. Fixes #76800.
7603
7604 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
7605
7606         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
7607
7608 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
7609
7610         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
7611         of platforms.
7612
7613 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
7614
7615         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
7616         objects.cs.
7617
7618         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
7619         
7620         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
7621 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
7622
7623         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
7624         single precision before storing to a single precision location.
7625
7626 2005-11-28  Raja R Harinath  <rharinath@novell.com>
7627
7628         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
7629
7630 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
7631
7632         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
7633         correct files.
7634
7635         * basic.cs: Remove test_0_byte_compares test which was moved to
7636         objects.cs a long time ago.
7637
7638 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
7639
7640         * aliasing.c: Fixed aliasing issue on 64 bit archs.
7641
7642 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
7643
7644         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
7645         handlers are called.
7646
7647         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
7648         throwing code.
7649
7650          * mini-ia64.c: Add support for the throw->branch exception 
7651         optimization.   
7652
7653         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
7654
7655 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
7656
7657         * mini.c: Enabled "fastpath" deadce :-)
7658         
7659 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
7660
7661         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
7662         alias analysis pass to support it.
7663         * mini.h: Likewise.
7664         * ssa.c: Likewise.
7665         * liveness.c: Likewise (liveness computation can use aliasing
7666         information to be more accurate).
7667         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
7668         moreover made so that "--compile-all" uses the given optimization
7669         flags and not the default ones.
7670         * aliasing.c: Alias analysis (new file).
7671         * aliasing.h: Likewise.
7672         * Makefile.am: added "aliasing.c" and "aliasing.h".
7673         
7674 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
7675
7676         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
7677         OP_L opcodes.
7678
7679 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
7680
7681         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
7682         fp >= end_of_stack exit condition, as it is not needed, and it might
7683         become true for fp eliminated frames.
7684
7685 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
7686
7687         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
7688         coded offsets.
7689
7690 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
7691
7692         * mini-arm.c: fixed alignment of doubles/longs to match
7693         the C ABI (bug #76635).
7694
7695 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
7696
7697         * aot.c: fix compilation with --enable-minimal=aot.
7698
7699 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
7700
7701         * mini-arm.c: fixed compatibility with the new
7702         floating point emulator package for compares.
7703
7704 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
7705
7706         * mini.c : reverted sig->pinvoke changes (r51396-51397).
7707
7708 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
7709
7710         * mini-exceptions.c (print_stack_frame): Output to stderr.
7711         (mono_handle_native_sigsegv): Ditto.
7712
7713 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
7714
7715         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
7716         OP_LCONV_TO_OVF_I implementation.
7717
7718         * mini-amd64.c: Add support for the throw->branch exception 
7719         optimization.
7720
7721         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
7722         when the catch clause catches a more general exception, i.e. Object.
7723
7724 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
7725
7726         * cpu-ia64.md: Remove unused opcodes.
7727
7728         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
7729         specific defines for architectures defining USE_SIGACTION.
7730
7731         * mini-ia64.c: Fix some warnings.
7732
7733         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
7734         version seemed to skip a frame.
7735
7736 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
7737
7738         * mini.c: Clean up the usage of sig->pinvoke flag. Now
7739         only calls which are made to native code use this flag.
7740
7741 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
7742
7743         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
7744         varargs methods as well.
7745         
7746         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
7747         which have save_lmf set. Reorganize methods prologs a bit.
7748
7749         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
7750         debugger to the proper place.
7751
7752 2005-10-29  Martin Baulig  <martin@ximian.com>
7753
7754         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
7755         when running inside the debugger until the debugger has support
7756         for it.
7757
7758 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
7759
7760         * mini.h: Fix a warning.
7761
7762 2005-10-24  Miguel de Icaza  <miguel@novell.com>
7763
7764         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
7765         we expose publicly, this returns the string.
7766
7767 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
7768
7769         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
7770         with fp elimination.
7771
7772 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
7773
7774         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
7775         native stacktrace using the glibc 'backtrace' function if available.
7776
7777 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
7778
7779         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
7780
7781         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
7782         handle SIGSEGVs received while in native code.
7783
7784         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
7785         code, call mono_handle_native_sigsegv which will abort the runtime
7786         after printing some diagnostics, instead of converting it into a
7787         confusing NullReferenceException.
7788
7789 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
7790
7791         * cpu-pentium.md: Remove unused opcodes.
7792
7793 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
7794
7795         * mini-amd64.h (MonoLMF): Add rsp field.
7796
7797         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
7798         the lmf too.
7799
7800 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
7801
7802         * mini-codegen.c (get_register_spilling): Fix some warnings.
7803
7804 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
7805
7806         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
7807         elimination during exception handling. Enable fp elimination by
7808         default.
7809
7810         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
7811         elimination.
7812
7813 2005-10-16  Martin Baulig  <martin@ximian.com>
7814
7815         * mini-exceptions.c
7816         (mono_debugger_run_finally): New public method for the debugger.
7817
7818 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
7819
7820         * debug-mini.c (mono_debug_init_method): Fix warning.
7821
7822         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
7823         the 'exname' parameter const to fix some warnings.
7824
7825 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
7826
7827         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
7828         introduced by the previous patch.
7829
7830 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
7831
7832         * basic-float.cs: Add test for precision of float arithmetic.
7833
7834         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
7835         when loading/storing single values from/to memory.
7836
7837         * mini.c (mono_jit_compile_method_with_opt): Create the function
7838         pointers in the correct domain.
7839
7840 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
7841
7842         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
7843         introduced by previous patch.
7844         
7845         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
7846         when out_filter_idx is NULL.
7847
7848         * mini-exceptions.c: Don't run filter clauses twice during exception
7849         handling. Fixes #75755.
7850
7851 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
7852
7853         * aot.c: Add support for ldflda wrappers.
7854
7855         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
7856         #75902.
7857
7858 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
7859
7860         * mini.c, mini.h: do not consider exception handlers blocks when
7861         setting up interface variables.
7862
7863 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
7864
7865         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
7866
7867 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
7868
7869         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
7870         causes a regression.
7871
7872         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
7873
7874 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
7875
7876         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
7877         of the OP_P definitions.
7878
7879         * TODO: Add a proposal for dealing with the CEE/OP mess.
7880
7881         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
7882         optimizations from the x86 port.
7883
7884         * cpu-amd64.md: Ditto.
7885
7886         * basic.cs basic-long.cs: Add tests.
7887
7888 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
7889
7890         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
7891         Patrik Torstensson's implementation of my exception-handling
7892         optimization idea, when the exception object is not used
7893         (bug #62150).
7894
7895 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
7896
7897         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
7898         of the mul_imm optimizations from the old jit.
7899
7900 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
7901
7902         * mini.c, liveness.c: patch by Patrik Torstensson and
7903         Zoltan Varga to improve performance in methods with
7904         exception clauses.
7905
7906 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
7907
7908         * driver.c: Remove 'Globalization' entry from --version.
7909
7910 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
7911
7912         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
7913         there is a profiler interested in JIT events.
7914
7915         * aot.c: Load profile files produced by the AOT profiling module, and
7916         reorder methods based on the profiling info. Add a 'method_order' table
7917         to the AOT file to make mono_aot_find_jit_info work with the reordered
7918         methods.
7919
7920         * mini.h: Bump AOT file version info.
7921
7922 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
7923
7924         * mini-arm.h: work around what looks like a gcc bug when optimizations
7925         are enabled.
7926
7927 2005-09-28  Raja R Harinath  <rharinath@novell.com>
7928
7929         * Makefile.am (AM_CFLAGS): Don't use += to append inside
7930         conditionals.  Use ...
7931         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
7932
7933 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
7934
7935         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
7936         to determine the amount of memory to copy when passing valuetypes.
7937
7938         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
7939         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
7940
7941 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
7942
7943         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
7944         information about aot.
7945
7946 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
7947
7948         * *.c: Replace the use of {Enter,Leave}CriticalSection with
7949         macros. This will allow a deadlock debugger to easily be plugged
7950         in.
7951
7952 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
7953
7954         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
7955
7956 2005-09-27  Raja R Harinath  <rharinath@novell.com>
7957
7958         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
7959         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
7960         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
7961         ($(arch_built)) [CROSS_COMPILING]: Error out.
7962
7963 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
7964
7965         * aot.c: Add support for the no_special_static flag for classes.
7966
7967 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
7968
7969         * Reapply reverted patches.
7970
7971         * *: Revert r50174 as well.
7972
7973         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
7974
7975 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
7976
7977         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
7978
7979 2005-09-23  Miguel de Icaza  <miguel@novell.com>
7980
7981         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
7982         part of the SIG_HANDLER_SIGNATURE.  
7983
7984 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
7985
7986         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
7987         statistics.
7988
7989         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
7990         introduced by previous patch.
7991
7992 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
7993
7994         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
7995         saved registers too.
7996
7997         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
7998         upon the information returned by get_call_info ().
7999         
8000         * mini-x86.c (add_float): Fix stack size calculation.
8001         (mono_arch_call_opcode): Rewrite this so it works based up the
8002         information returned by get_call_info ().
8003         (mono_arch_get_this_vret_args): Ditto.
8004
8005 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
8006
8007         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
8008         in cinfo to determine the registers which need to be used.
8009
8010 2005-09-20  Miguel de Icaza  <miguel@novell.com>
8011
8012         * driver.c (mono_main): Add --server and --desktop flags. 
8013
8014 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
8015
8016         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
8017         registers as global registers.
8018
8019         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
8020         longer needed with the new register allocator.
8021
8022         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
8023
8024         * cpu-ia64.md: Remove unused opcodes.
8025         
8026         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
8027         
8028 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
8029
8030         * cpu-amd64.md: Remove unused opcodes.
8031
8032         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
8033         needed with the new register allocator.
8034
8035         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
8036         reg-reg moves.
8037
8038 2005-09-16  Raja R Harinath  <rharinath@novell.com>
8039
8040         * Makefile.am (check-local): Don't invoke semdel-wrapper.
8041
8042 2005-09-16  Martin Baulig  <martin@ximian.com>
8043
8044         * exceptions-amd64.c
8045         (throw_exception): Don't call mono_debugger_throw_exception() if
8046         we're a rethrow - see the FIXME in the code.
8047
8048 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
8049
8050         * mini.c (mono_init_exceptions): This only works on some architectures.
8051         
8052 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
8053
8054         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
8055         on ia64.
8056
8057         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
8058
8059         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
8060         now in mini-exceptions.c.
8061
8062 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
8063
8064         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
8065         now in mini-exceptions.c.
8066
8067 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
8068
8069         * exceptions-x86.c: Applied patch from Patrik Torstensson 
8070         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
8071
8072         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
8073         code into mini-exceptions.c. Add some assertions to it.
8074
8075 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
8076
8077         * aot.c (emit_section_change): Applied patch from "The Software Team" 
8078         (<software@solmersa.com>). Fix as errors on windows.
8079
8080 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
8081
8082         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
8083         method info into the LMF.
8084
8085 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8086         
8087         * mini-ia64.c: Add proper unwind info for method epilogs.
8088
8089         * exceptions-ia64.c: Add some code to help debugging.
8090         
8091         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
8092
8093         * mini-exceptions.c: Fix warning.
8094
8095 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
8096
8097         * mini.c: Really fix build.
8098
8099         * mini-x86.c mini-amd64.c: Fix build.
8100
8101 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8102
8103         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
8104
8105         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
8106         some Interlocked methods as intrinsics.
8107
8108         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
8109         for Thread methods as well.
8110
8111         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
8112
8113         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
8114
8115         * mini-ia64.c mini-x86.c mini-amd64.c 
8116         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
8117         OP_MEMORY_BARRIER.
8118         
8119         * mini.c (mono_init_exceptions): Fix build breakage.
8120
8121 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
8122
8123         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
8124         of instructions. Use the new ia64_unw_op macros for emitting unwind
8125         info.
8126
8127         * mini.c (mono_init_exceptions): Initialize exception handling
8128         related trampolines at startup.
8129
8130 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
8131
8132         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
8133
8134 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
8135
8136         * mini.c: Handle type loading errors gracefully during compilation and
8137         throw the appropriate exception.
8138
8139 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
8140
8141         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
8142         for the mono binary.
8143
8144 2005-09-09  Martin Baulig  <martin@ximian.com>
8145
8146         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
8147         the release.
8148
8149 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
8150
8151         * mini-arm.h: use emulation for conv.r.un for the release.
8152
8153 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
8154
8155         * mini-arm.c, objects.cs: more fixes and tests for them.
8156
8157 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
8158
8159         * mini-arm.c: align structures to at least 4 bytes to be able
8160         to keep our current optimized memcpy.
8161
8162 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
8163
8164         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
8165
8166 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8167
8168         * mini.c: ignore SIGPIPE.
8169
8170 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
8171
8172         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
8173
8174         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
8175
8176 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
8177
8178         * mini.h: Add prototype for mono_allocate_stack_slots_full.
8179
8180 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
8181
8182         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
8183         exception handling support.
8184         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
8185         patch by Brian Koropoff <briank@marakicorp.com>).
8186
8187 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
8188
8189         * mini.c: revert another 'optimization' which breaks when
8190         items on the eval stack need to be saved at a basic block end
8191         (bug #75940).
8192
8193 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
8194
8195         * jit-icalls.c: for arrays, ensure we always provide
8196         lower bounds.
8197
8198 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
8199
8200         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
8201         
8202         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
8203
8204 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
8205
8206         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
8207         arguments in their original register.
8208
8209 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
8210
8211         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
8212         memset/memcpy.
8213
8214         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
8215         when ssapre is enabled.
8216
8217         * inssel-long.brg: Fix bug in previous patch.
8218
8219         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
8220         multiplication by a constant.
8221
8222 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
8223
8224         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
8225         icc.
8226
8227         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
8228         saving registers.
8229
8230 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
8231
8232         * inssel-arm.brg: apply changes tested by Brian Koropoff
8233         <briank@marakicorp.com>.
8234
8235 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
8236
8237         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
8238         
8239 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
8240
8241         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
8242         to the same register if dreg is just a base register.
8243         (print_ins): Improve printing of membase opcodes.
8244
8245         * inssel-x86.brg: Add optimized ldind(reg) rules.
8246
8247         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
8248
8249 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
8250
8251         * mini.c: when running under valgrind, set the stack bottom for
8252         the GC at the actual approximate stack for the app (fixes running
8253         mono with valgrind).
8254
8255 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
8256
8257         * mini.c: do no break at the first valuetype to init found
8258         (fixes bug #75791).
8259
8260 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
8261
8262         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
8263
8264 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
8265
8266         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
8267
8268 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
8269
8270         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
8271
8272 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8273
8274         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
8275
8276         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
8277         code.
8278
8279         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
8280         code.
8281
8282         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
8283         methods.
8284
8285 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
8286
8287         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
8288
8289 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8290
8291         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
8292         in the tail recursion optimization.
8293
8294         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
8295         debug info into the assembly file.
8296
8297         * iltests.il: Add test for filter regions.
8298
8299         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
8300         initial stack of filter regions. Fixes #75755.
8301
8302 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
8303
8304         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
8305         stack requirements.
8306
8307 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8308
8309         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
8310         the check for an already compiled method on non-ia64 platforms.
8311         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
8312         proper domain.
8313
8314         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
8315
8316         * inssel-x86.brg: Add some optimized call rules.
8317
8318 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
8319
8320         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
8321         method here.
8322
8323         * mini.h mini-trampolines.c: Pass the trampoline argument to 
8324         mono_arch_patch_delegate_trampoline.
8325
8326         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
8327
8328         * mini-trampolines.c: Fix build.
8329
8330         * mini-amd64.h: Add delegate trampolines.
8331
8332         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
8333
8334         * inssel-amd64.brg: Add optimized call rules.
8335         
8336         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
8337
8338         * inssel-ia64.brg: Add optimized ldind(reg) rules.
8339
8340 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
8341
8342         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
8343         change.
8344
8345         * mini-ia64.c: Remove LMF fixmes.
8346
8347         * mini-ia64.h: Remove most fields from LMF.
8348
8349         * inssel-ia64.brg (stmt): Fix unaligned access errors.
8350
8351         * mini-trampolines.c: Add support for IA64 function descriptors.
8352
8353         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
8354         for IA64 function descriptors.
8355
8356 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
8357
8358         * tramp-arm.c: patch the vtable for virtual calls. Added
8359         support code to register/unregister the LMF.
8360         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
8361         more LMF work.
8362
8363 2005-08-19  Dick Porter  <dick@ximian.com>
8364
8365         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
8366         bit value if needed.
8367
8368 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
8369
8370         * mini.c (mini_get_method): Move handling of wrapper data here.
8371
8372         * mini.c (mono_method_to_ir): Add support for dynamic methods.
8373
8374         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
8375         virtual.
8376
8377         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
8378         bblock->code does not remain empty.
8379
8380 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
8381
8382         * arrays.cs: Add regression test for #75832.
8383
8384         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
8385         rules. Fixes #75832.
8386
8387         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
8388         instruction scheduling.
8389
8390 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
8391
8392         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
8393
8394 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
8395
8396         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
8397
8398         * mini-codegen.c: Fix VC build.
8399
8400         * cpu-pentium.md: Increase length of atomic_exhange_i4.
8401
8402 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8403
8404         * mini.h: fix signature for mono_register_opcode_emulation.
8405
8406 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
8407
8408         * mini.c: Get rid of most of the helper_sig_... constants using
8409         mono_create_icall_signature ().
8410
8411 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
8412
8413         * jit-icalls.c (helper_ldstr): New helper function.
8414
8415         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
8416
8417         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
8418         throw, load the string using a helper call instead of creating a string object.
8419
8420         * aot.c: Update after LDSTR changes.
8421
8422         * mini.h: Bump AOT file version.
8423         
8424         * aot.c: Save class size info into the AOT file. Print more statistics during
8425         compilation.
8426
8427         * mini.h: Bump AOT file version.
8428
8429         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8430         ordering of disasm cases. Fixes #74957.
8431
8432 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
8433
8434         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
8435         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
8436         the generic code needed for the ARM port.
8437
8438 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
8439
8440         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
8441         inssel-arm.brg: more ARM features and fixes.
8442
8443 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
8444
8445         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
8446         ARM port work in progress.
8447
8448 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
8449
8450         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
8451
8452         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
8453
8454         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
8455
8456         * inssel.brg (mini_emit_memset): Add support for unaligned access.
8457
8458         * *-ia64.*: Ongoing IA64 work.
8459         
8460         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
8461
8462 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
8463
8464         * TODO: Remove out-of-data todo stuff.
8465
8466         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
8467         dead code.
8468
8469         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
8470
8471         * mini.h: Bump corlib version.
8472
8473 2005-07-27  Martin Baulig  <martin@ximian.com>
8474
8475         * mini-codegen.c
8476         (create_copy_ins): Added `const unsigned char *ip' argument; set
8477         `copy->cil_code' from it.
8478
8479 2005-07-27  Martin Baulig  <martin@ximian.com>
8480
8481         * mini-exceptions.c (mono_handle_exception): Don't call
8482         mono_debugger_handle_exception() for filters.
8483
8484 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
8485
8486         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
8487         as well.
8488
8489 2005-07-26  Martin Baulig  <martin@ximian.com>
8490
8491         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
8492
8493         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
8494         helper_compile_generic_method() if the method is actually virtual
8495         and non-final.
8496
8497 2005-07-26  Martin Baulig  <martin@ximian.com>
8498
8499         * mini.c
8500         (trampoline_code): Renamed to `mono_trampoline_code' and made it
8501         public; this is now accessed directly by the debugger.
8502         (mono_generic_trampoline_code): Removed.
8503
8504         * debug-mini.c
8505         (mono_debug_init_method): Also add interncalls and wrappers.
8506
8507 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
8508
8509         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
8510
8511 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
8512
8513         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
8514
8515 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
8516
8517         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
8518
8519 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
8520
8521         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
8522         getting TLS offsets on AMD64 too.
8523
8524 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
8525
8526         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
8527
8528 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
8529
8530         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
8531         inssel-arm.brg, mini-arm.h: ARM port work in progress.
8532
8533 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
8534
8535         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
8536
8537         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
8538         to mini.c.
8539
8540         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
8541         mono_sparc_is_virtual_call ().
8542         
8543         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
8544
8545         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
8546         trampoline parameters.
8547
8548         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
8549         
8550         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
8551         to mono_arch_get_vcall_slot_addr.
8552
8553         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
8554         trampoline code.
8555
8556         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
8557
8558 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
8559
8560         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
8561
8562 2005-07-19  Martin Baulig  <martin@ximian.com>
8563
8564         * exceptions-amd64.c (throw_exception): Call
8565         mono_debugger_throw_exception() here like we're doing it on i386.
8566
8567 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
8568
8569         * mini-ia64.c: Add optimized TLS access support.
8570
8571 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
8572
8573         * mini-exceptions.c: Ongoing IA64 work.
8574
8575         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
8576
8577         * mini.c: Use the default optimization set when embedding. Fixes
8578         #75194.
8579
8580 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
8581
8582         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
8583         of trampolines to a separate file.
8584
8585         * mini-trampolines.c: New file.
8586
8587         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
8588         separate file.
8589         
8590         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
8591         amd64/ia64 code.
8592
8593         * mini-codegen.c: Fix cygwin build.
8594
8595 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
8596
8597         * mini.c: Add some minor changes needed by the IA64 port.
8598
8599         * *-ia64.*: Ongoing IA64 work.
8600
8601 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
8602
8603         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
8604         trampolines into arch-independent and arch-dependent parts.
8605
8606         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
8607
8608 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
8609
8610         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
8611
8612         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
8613         the xp-regalloc-branch for amd64.
8614
8615         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
8616         xp-regalloc-branch for x86.
8617
8618 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
8619
8620         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
8621
8622 2005-07-06  Martin Baulig  <martin@ximian.com>
8623
8624         * mini.c
8625         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
8626         (mono_jit_runtime_invoke): Likewise.
8627
8628 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
8629
8630         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
8631         on x86 too.
8632         
8633         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
8634         without loading their metadata. Reorganize the file format so exception handling+
8635         debug info is kept separate from normal method info. Create MonoJitInfo 
8636         structures for methods lazily.
8637
8638         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
8639         loading metadata.
8640         (x86_class_init_trampoline): Patch AOT class init trampolines too.
8641
8642         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
8643
8644         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
8645         in AOT code.
8646
8647         * mini.h: Bump AOT file version.
8648
8649 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
8650
8651         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
8652
8653 2005-07-01  Raja R Harinath  <rharinath@novell.com>
8654
8655         * Makefile.am (check-local): Call semdel-wrapper.
8656
8657 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
8658
8659         * mini-x86.c: Revert the last change as it seems to break the build..
8660
8661 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
8662
8663         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
8664         
8665         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
8666
8667 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
8668
8669         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
8670         outside of the macro, so strange stuff doesn't happen with gcc4
8671         (NEW_AOTCONST_TOKEN): Likewise.
8672
8673 2005-06-28  Martin Baulig  <martin@ximian.com>
8674
8675         * mini.c (mini_class_is_system_array): New static method; use this
8676         instead of `klass->parent == mono_defaults.array_class' everywhere
8677         since this also works for the new generic array class.
8678
8679 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
8680
8681         * inssel.brg: Remove warnings.
8682
8683 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
8684
8685         * mini-ia64.c: Ongoing IA64 work.
8686
8687         * basic-float.cs: Add float->i1 conversion test.
8688
8689         * iltests.il: Add conv.u4 test.
8690
8691 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
8692
8693         * inssel-long.brg: Fix bug caused by last change.
8694
8695 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
8696
8697         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
8698         BSDs.  Allows the x86 JIT to work on OSX86
8699
8700 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
8701
8702         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
8703         u4->i8 conversion.
8704
8705         * mini-ia64.c: Ongoing IA64 work.
8706
8707 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
8708
8709         * mini-ia64.c: Ongoing IA64 work.
8710
8711         * driver.c: Clean up jit_code_hash as well when using --regression.
8712
8713         * inssel-long.brg: Fix long->i4/u4 conversion rules.
8714
8715         * basic-long.cs: Add tests for long->u4 conversion.
8716
8717 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
8718
8719         * mini.c: Take mono_get_domainvar out of macros. This makes sure
8720         that we do not depend on undefined C behavior: the order stuff
8721         gets evaluated within an expression. Fixes mono when compiled on
8722         GCC 4.
8723
8724 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
8725
8726         * *-ia64.*: Ongoing IA64 work.
8727
8728         * aot.c: Lower memory usage while loading AOT methods.
8729
8730         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
8731
8732         * mini.h: Bump AOT file format version.
8733
8734 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
8735
8736         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
8737
8738 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
8739
8740         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
8741         not on callee assembly). Fixed some comments.
8742
8743 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
8744
8745         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
8746         it gets proper disassembly.
8747         (emit_method_info): Remove some dead code.
8748
8749         * mini.c (mini_method_compile): Allways allocate the GOT var in
8750         mono_method_to_ir for emulating opcodes.
8751
8752 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
8753
8754         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
8755         before freeing the code memory. Fixes #74990.
8756
8757         * objects.cs: Add regression test for #74992.
8758
8759         * liveness.c: Extend live ranges of arguments to the beginning of the
8760         method. Fixes #74992.
8761
8762         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
8763         so it points into the faulting instruction.
8764
8765 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
8766
8767         * jit-icalls.c (mono_imul_ovf): Add exception handling.
8768
8769         * *-ia64.*: Ongoing IA64 work.
8770
8771         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
8772
8773 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
8774
8775         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
8776
8777         * *-ia64.*: Ongoing IA64 work.
8778
8779 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
8780
8781         * basic-long.cs: Add tests for add/sub.ovf.
8782
8783         * basic.cs: Add tests for sub.ovf.
8784
8785         * *-ia64.*: Ongoing IA64 work.
8786
8787 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
8788
8789         * *-ia64.*: Ongoing IA64 work.
8790
8791         * basic.cs: Add conv.ovf.i4.un test.
8792
8793 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
8794
8795         * mini.c: (remove_block_if_useless) Fixed bug 75061.
8796         
8797 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8798
8799         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
8800
8801 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
8802
8803         * *-ia64.*: Ongoing IA64 work.
8804
8805 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8806
8807         * trace.[ch]:
8808         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
8809
8810 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
8811
8812         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
8813
8814 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
8815
8816         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
8817
8818         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
8819         of a call is callable by a near call.
8820
8821 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
8822
8823         * mini-ia64.c: Ongoing IA64 work.
8824
8825 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
8826
8827         * genmdesc.c: Make the generated array non-static.
8828
8829         * inssel-long.brg: Fix LSHR_IMM rule.
8830
8831         * *-ia64.*: Ongoing IA64 work.
8832
8833         * *-ia64.*: Ongoing IA64 work.
8834
8835 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
8836
8837         * *-ia64.*: Ongoing IA64 work.
8838
8839         * *-ia64.*: Ongoing IA64 work.
8840         
8841         * mini-ia64.c: Ongoing IA64 work.
8842
8843         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
8844
8845 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
8846
8847         * objects.cs basic-calls.cs: Move some tests to objects.cs.
8848         
8849         * objects.cs basic-long.cs: Move some tests to objects.cs.
8850
8851 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
8852
8853         * *-ia64.*: Ongoing IA64 work.
8854
8855         * iltests.il: Add a new test.
8856
8857         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
8858         newobj. Fixes #75042.
8859
8860 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
8861
8862         * *-ia64.*: Ongoing IA64 work.
8863         
8864         * *-ia64.*: Ongoing IA64 work.
8865         
8866         * *-ia64.*: Ongoing IA64 work.
8867
8868         * basic.cs objects.cs: Move tests accessing static variables as well.
8869
8870         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
8871
8872 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
8873
8874         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
8875
8876         * driver.c: Always print failed tests.
8877
8878         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
8879         frame pointer.
8880
8881         * *ia64*: Ongoing IA64 work.
8882
8883 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
8884
8885         * basic.cs: Add tests for add.ovf. Fix warnings.
8886
8887 2005-05-18  Miguel de Icaza  <miguel@novell.com>
8888
8889         * driver.c (mono_main): Avoid crash if no argument is passed to
8890         --break;  Do not use g_error, but f_printf.   And fix all other
8891         ocurrences of the same crash.
8892
8893 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
8894
8895         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
8896         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
8897         Fixes #74742.
8898
8899 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
8900
8901         * *-ia64.*: Add beginnings of IA64 backend.
8902
8903         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
8904
8905 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
8906
8907         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
8908         Fixes #74925.
8909
8910         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
8911
8912         * mini-amd64.c: Fix a warning.
8913
8914 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
8915
8916         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
8917         in float_neg. Fixes #74897.
8918
8919         * mini-amd64.c (emit_call): Fix another near call bug.
8920
8921 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
8922
8923         * declsec.c: Keep the appdomain information in the structure. Added a 
8924         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
8925         value gets overwritten).
8926         * declsec.h: Set the default MonoArray for the the stack to 6. Added
8927         an MonoAppDomain member to MonoSecurityFrame.
8928         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
8929         used in the stack walk. Now use a MonoArray which grow (double) when
8930         it gets full.
8931
8932 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
8933
8934         * mini.c: Re-enabled runtime cleanup, since running threads should
8935         now properly stop when exiting.
8936
8937 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
8938
8939         * mini-codegen.c: New file contaning the arch-independent local
8940         register allocator. Not used by any architectures yet.
8941
8942         * mini.h linear-scan.c: Merge some changes from the 
8943         mini-xp-local-regalloc branch.
8944
8945 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
8946
8947         * mini-amd64.c (emit_call): Fix calls to native functions when the
8948         runtime is compiled as a shared library. Fixes #74756.
8949
8950         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
8951         on a literal field. Fixes #74751.
8952
8953 2005-04-25  Raja R Harinath  <rharinath@novell.com>
8954
8955         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
8956
8957 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
8958
8959         * objects.cs: Add missing null casting test.
8960
8961 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
8962
8963         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
8964         in wrapper methods. Also rename 'address' variable to 'offset'.
8965
8966 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
8967
8968         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
8969         warnings.
8970         
8971         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
8972
8973         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
8974         work on windows.
8975
8976 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
8977
8978         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
8979
8980 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
8981
8982         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
8983         just the last bytes.
8984
8985 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
8986
8987         * aot.c (mono_compile_assembly): Fix warning.
8988
8989         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
8990         by the _MSC_VER stuff.
8991
8992 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
8993
8994         * inssel-long.brg: Fix #74588.
8995
8996         * cpu-amd64.md: Fix #74591.
8997
8998         * iltests.il: Add new regression tests.
8999
9000 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
9001
9002         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
9003         valuetype.
9004
9005 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
9006
9007         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
9008
9009         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
9010         from Bill Middleton <flashdict@gmail.com>.
9011
9012 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
9013
9014         * arrays.cs: Add new regression test. Fix warnings.
9015
9016 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
9017
9018         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
9019         and leakage in CKFINITE.
9020
9021         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
9022         this to a null op since it is called on amd64 too.
9023
9024         * exceptions-amd64.c (get_throw_trampoline): Align stack.
9025
9026         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
9027         body since this is not used on amd64.
9028         
9029         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
9030
9031         * mini-amd64.c: Remove obsolete fixmes.
9032
9033         * mini.c (print_method_from_ip): Fix debugging support.
9034
9035 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9036
9037         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
9038         so that expressions that don't give much gain are not reduced.
9039         * ssapre.h: Likewise.
9040
9041 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
9042
9043         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
9044
9045         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
9046
9047         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
9048
9049 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
9050
9051         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
9052
9053         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
9054
9055 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
9056
9057         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
9058         stack touching.
9059
9060         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
9061
9062         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
9063
9064         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
9065
9066         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
9067         MONO_ARCH_USE_SIGACTION. Fixes #74252.
9068
9069         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
9070
9071         * mini-x86.c: Fix up stack overflow handling.   
9072
9073         * exceptions.cs: Add new regression test.
9074
9075 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
9076
9077         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
9078         mono_jit_thread_attach.
9079
9080         * mini.c (mono_method_to_ir): Verify called method is not abstract.
9081
9082 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9083
9084         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
9085         avoid calling constructors using callvirt.
9086
9087         * inssel.brg: Fix #74073.
9088
9089 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
9090
9091         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
9092         compilation with non-GCC compilers.
9093         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
9094         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
9095
9096 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
9097
9098         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
9099         klass->interface_offsets (will likely fix bug#74073).
9100
9101 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9102
9103         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
9104
9105 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
9106
9107         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
9108         to amd64_div_reg_size ().
9109         
9110         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
9111
9112 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
9113
9114         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
9115
9116 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9117
9118         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
9119
9120 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9121
9122         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
9123         
9124         * mini.c (mono_precompile_assembly): Load and precompile referenced
9125         assemblies as well. Fixes #74015.
9126
9127 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
9128
9129         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
9130
9131 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
9132
9133         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
9134         a lot of checks and (anyway) permissions cannot work until corlib is 
9135         loaded.
9136
9137 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
9138
9139         * mini-ppc.c: fixed ABI issue on sysv/ppc.
9140
9141 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
9142
9143         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
9144         calls (fixes bug#72824).
9145
9146 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
9147
9148         * mini.c: fix tail recursion elimination (see test in bug#73936).
9149
9150 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
9151
9152         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
9153         some fp functions in sse2 mode.
9154
9155 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
9156
9157         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
9158
9159 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
9160
9161         * mini.h mini.c: Add mono_get_jit_tls_key ().
9162
9163         * mini-x86.c: Enable fast TLS support on windows.
9164
9165 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
9166
9167         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
9168         * mini.c: Check for p/invoke method when generating code. If a
9169         p/invoke method, or it's class, isn't decorated with [Suppress
9170         UnmanagedCodeSecurity] then generate code to call System.Security.
9171         UnmanagedDemand (only if the security manager is active).
9172
9173 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
9174
9175         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
9176         last change as it seems to cause strange crashes.
9177         
9178 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9179
9180         * *.c: handle unsafe function pointers where needed.
9181
9182 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
9183
9184         * mini.c (mono_jit_free_method): Remove the fixme too.
9185
9186 2005-03-15  Miguel de Icaza  <miguel@novell.com>
9187
9188         * mini.c: As discussed, make the code actually free the delegate
9189         thunk now, to enable the debugging of delegate problems, use
9190         MONO_DEBUG=1 when running Mono. 
9191
9192         This takes also care of parts of the leaks as seen by Joe.
9193
9194 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
9195
9196         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
9197         thread_tls_offset calculation.
9198
9199 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
9200
9201         * declsec.c: Reworked linkdemand checks for icall. The previous code
9202         was using the declaration code (untrusted) and didn't work as expected
9203         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
9204         specific case.
9205
9206 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
9207
9208         * iltests.il: Add new localloc test.
9209
9210         * mini-amd64.c: Handle large stack allocations the same way as on
9211         windows if stack overflow handling is working.
9212         
9213         * mini-amd64.c: Allocate the signal stack using mmap.
9214
9215         * mini.c (sigsegv_signal_handler): Fix reading of context.
9216
9217         * mini-exceptions.c: Fix up stack overflow handling.
9218
9219         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
9220
9221         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
9222
9223         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
9224
9225         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
9226
9227         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
9228         tramp_init functions as they are no longer needed.
9229
9230 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
9231
9232         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
9233         
9234         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
9235
9236         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
9237         
9238         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
9239         support that now.
9240
9241         * mini-ops.h: Add OP_LMUL_IMM.
9242
9243         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
9244         long mul/div opcodes as intrinsic.
9245
9246         * mini-amd64.c (emit_call): Handle the case when the callee might be
9247         an AOT method.
9248
9249 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
9250
9251         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
9252         extra safe.
9253         
9254         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
9255
9256         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
9257
9258 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
9259
9260         * mini.c (mono_codegen): Don't leak here, to help people running
9261         monogrind.
9262
9263 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
9264
9265         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
9266         conversions in sse2 mode.
9267
9268         * basic-float.cs: Add regression test.
9269         
9270         * mini-amd64.c: Reenable sse2.
9271
9272 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
9273
9274         * mini-amd64.c: Disable sse2 until some regressions are fixed.
9275
9276 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
9277
9278         * driver.c: Copyright text should include 2005.
9279         
9280 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
9281
9282         * cpu-amd64.md (load_membase): Fix more max lengths.
9283
9284 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
9285
9286         * cpu-amd64.md (load_membase): Fix max length.
9287
9288         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
9289
9290         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
9291
9292         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
9293         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
9294
9295         * basic-float.cs: Add rounding regression test.
9296
9297         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
9298
9299 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
9300
9301         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
9302         structures in registers for pinvoke wrappers.
9303
9304 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
9305
9306         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
9307
9308 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
9309
9310         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
9311         wrapper to mono_jit_thread_attach.
9312
9313         * mini.c (mini_jit_thread_attach): New jit icall.
9314
9315         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
9316         native->managed wrappers.
9317
9318         * exceptions.cs: Add new regression test.
9319
9320         * mini.c (optimize_branches): Check regions in the cbranch to throw
9321         block case as well. Fixes #73242.
9322
9323 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
9324
9325         * mini.c: thread safety fixes.
9326
9327 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
9328
9329         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
9330         patching stuff, since delegates use jump trampolines so there is
9331         no caller.
9332
9333         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
9334         jump trampolines.
9335         
9336         * tramp-amd64.c: Fix build.
9337
9338         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
9339         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
9340
9341         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
9342         Rename this to mono_arch....
9343         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
9344
9345         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
9346
9347         * mini-amd64.c (emit_call): If both the caller and the callee is
9348         guaranteed to have 32 bit addresses, emit a normal call.
9349
9350         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
9351
9352         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
9353         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
9354         method_ptr inside delegates.
9355
9356 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
9357
9358         * mini.c (mono_jit_free_method): Free the method info even if the native code is
9359         invalidated. Fixes #73001.
9360
9361         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
9362
9363         * mini-x86.c: Only use stdcall for pinvokes on windows.
9364
9365 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
9366
9367         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
9368         * mini-x86.c: remove unreliable __thread var offset detection,
9369         use the correct accessors and enable by default.
9370
9371 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
9372
9373         * mini.c (mono_jit_free_method): Fix memory leak.
9374
9375 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
9376
9377         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
9378
9379 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
9380
9381         * cpu-amd64.md: Fix lengths of atomic opcodes.
9382
9383 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
9384
9385         * driver.c: try to not imply using ICU is any good.
9386
9387 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
9388
9389         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
9390         functions as inline ops.
9391
9392         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
9393         some Interlocked functions as inline ops.
9394
9395         * mini.c (move_basic_block_to_end): Fix bug in last patch.
9396
9397         * mini.h (MonoBasicBlock): Reorganize fields a bit.
9398
9399         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
9400
9401         * mini.c: Add support for OP_NOT_TAKEN.
9402
9403         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
9404         structures in registers for pinvoke wrappers.
9405
9406         * mini-amd64.c: Fix warnings.
9407
9408 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
9409
9410         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
9411
9412         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
9413
9414         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
9415         address instead of loading the address from it.
9416
9417         * mini-x86.c: Add support for returning small structs in registers
9418         on Win32. Fixes part of #70864.
9419         
9420 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
9421
9422         * trace.c (get_token): Improve error checking.
9423
9424 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
9425
9426         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
9427
9428 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
9429  
9430         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
9431         it can be reused for MonoClass.
9432         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
9433         _LINKDEMAND.
9434
9435 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
9436
9437         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
9438         instead of a MonoReflectionMethod. The method information wasn't used
9439         when displaying SecurityException details (but will be now).
9440
9441 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
9442
9443         * Makefile.am : windows build fix.
9444
9445 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
9446
9447         * iltests.il: Add new regression test.
9448
9449         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
9450         #72522.
9451
9452 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
9453  
9454         * mini.c: Moved linkdemand check into helper function check_linkdemand
9455         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
9456         LDFTN, LDVIRTFTN).
9457
9458 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
9459
9460         * declsec.c: Added statistics counter for different kinds of 
9461         LinkDemands.
9462         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
9463         (and commented) declaration.
9464         * mini.c: Added statistics counter for security Demand code 
9465         generation. Added display of security statistics.
9466
9467 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
9468
9469         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
9470         Fix compilation errors under gcc-2.95.
9471
9472 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
9473
9474         * mini.c, driver.c: Use the new jit trampoline hashtable
9475
9476 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9477
9478         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
9479
9480 2005-02-11  Martin Baulig  <martin@ximian.com>
9481
9482         * debug-mini.c (mono_debug_close_method): Free the line number array.
9483
9484 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
9485
9486         * aot.c: Break up large methods into smaller ones. Share GOT slots for
9487         icalls.
9488
9489         * mini.h: Bump AOT file format version. 
9490
9491 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
9492
9493         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
9494         APTC and P/Invoke.
9495         * declsec.h: Added macros to get/set lazyly initialized security 
9496         informations about assemblies. Added new enum for different type of
9497         possible LinkDemand violation. Added function to check LinkDemands.
9498         * mini.h: Added a field to MonoCompile to hold any security violation
9499         detected when JITting a method (so it can be thrown later).
9500         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
9501         and CEE_CALLVIRT. Added code to throw exception at the end of
9502         mini_method_compile (note: the exception is unhandled right now).
9503
9504 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
9505
9506         * mini.c, jit-icalls.c: use the managed implementation of
9507         memset for initobj and memset, to avoid managed <-> unmanaged
9508         transitions.
9509
9510 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
9511
9512         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
9513         optimization if it would need a GOT var.
9514
9515         * basic.cs: Add tests for constant propagation and switch statements.
9516
9517         * ssa.c: Fix out-of-range constant propagation and switch statements.
9518
9519 2005-02-09    <vargaz@freemail.hu>
9520
9521         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
9522
9523 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
9524
9525         * cpu-amd64.md (load_membase): Fix max length of load_membase.
9526
9527 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9528
9529         * mini.c: update to new signature of mono_class_get_allocation_ftn().
9530
9531 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
9532
9533         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
9534         arithmetic operations.
9535
9536 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
9537
9538         * mini-ppc.c: add a workaround for broken user code that
9539         DllImports vararg functions with non-vararg signatures.
9540
9541 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
9542
9543         * mini.c (mono_jit_compile_method_inner): Add detection and a 
9544         meaningfull error message for assemblies written in Managed C++.
9545
9546         * tramp-amd64.c mini-amd64.h: Add support for 
9547         create_trampoline_from_token ().
9548
9549         * aot.c mini-x86.c abcremoval.c: Applied patch from
9550         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
9551
9552 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
9553
9554         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
9555         which takes a MonoImage/token as parameter instead of a MonoMethod.
9556
9557         * aot.c: Use the new trampoline for initializing vtables.
9558
9559         * aot.c: Add support for ldfld/stfld_remote wrappers.
9560
9561         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
9562         rules for compare <MEM>, IMM.
9563
9564         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
9565
9566         * aot.c: Handle inherited finalizers correctly.
9567
9568 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
9569
9570         * inssel.brg (stmt): Add a missing _setup_... ().
9571
9572         * aot.c: Save some parts of the class state to the AOT file and use it
9573         to recompute that state when a class is initialized.
9574
9575         * mini.c: Install AOT hooks into the runtime.
9576
9577         * mini.h: Bump AOT file format version.
9578         
9579         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
9580         Fixes #72148.
9581
9582         * iltests.il: Add new test.
9583
9584 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
9585
9586         * mini.c: fix typo.
9587
9588 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
9589
9590         * mini.c: setup the statistical profiler in the thread attach
9591         callback to cope with the new single thread code.
9592
9593 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
9594
9595         * mini-ppc.c: ensure we have enough room for the profiler
9596         calls (fixed bug#72084).
9597
9598 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
9599
9600         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
9601         it.
9602
9603 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9604
9605         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
9606
9607 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9608
9609         * ssapre.c: Fixed an issue with down safety (this allows IronPython
9610         to succesfully execute parrotbench).
9611         * ssapre.h: Likewise.
9612
9613 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9614
9615         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
9616         variable for stores to method arguments (fixes a SSAPRE issue).
9617
9618 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
9619
9620         * mini.c: handle value types in dup, fixes gen-112.cs.
9621
9622 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
9623
9624         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
9625         sequence for calls in dynamic methods to avoid thunks.
9626
9627 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
9628
9629         * mini.c: correctly remove dynamic methods from the hashtable.
9630
9631 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9632
9633         * driver.c: Disabled SSAPRE until fix the bug that appears
9634         in IronPython's parrotbench.
9635
9636 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
9637
9638         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
9639
9640         * mini.c (mono_method_to_ir): Revert the previous change.
9641         
9642         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
9643         when AOT compiling.
9644
9645         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
9646         mono_jit_info_table_find () etc. when running under valgrind.
9647
9648         * inssel.brg: Fix warnings.
9649
9650         * mini-exceptions.c: Fix warnings.
9651
9652 2005-01-31  Martin Baulig  <martin@ximian.com>
9653
9654         * driver.c (compile_all_methods_thread_main): Don't try to compile
9655         generic methods or anything which has type parameters.
9656
9657 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
9658
9659         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
9660
9661         * TestDriver.cs: Add --verbose flags.
9662
9663         * graph.c ssa.c: Fix 64 bit warnings.
9664         
9665         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
9666         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
9667         Fix 64 bit warnings.
9668
9669         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
9670         variable not spotted by gcc.
9671         
9672         * mini-amd64.c inssel-amd64.brg: Applied patch from  
9673         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
9674         X86_COMPARE_MEMBASE opcodes.
9675
9676         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
9677
9678 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
9679
9680         * *: MonoMethod->signature might be NULL now. You *MUST* use
9681         mono_method_signature.
9682
9683 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
9684
9685         * driver.c (compile_all_methods_thread_main): Compile the methods
9686         without invoking cctors.
9687
9688 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
9689
9690         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
9691         * basic-calls.cs: test for the above.
9692
9693 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
9694
9695         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
9696         MonoJitInfo changes.
9697
9698 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
9699
9700         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
9701         eagerly if it contains dynamic methods.
9702         
9703         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
9704
9705         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
9706         trace, it is now computed by an icall from trace_ips.
9707         
9708         * mini-exceptions.c: Fix a warning.
9709
9710 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
9711
9712         * mini-exceptions.c: don't bother getting stack trace info if
9713         it's not going to be used.
9714
9715 2005-01-27  Raja R Harinath  <rharinath@novell.com>
9716
9717         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
9718         ssapre-mini-ops.h.
9719
9720 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
9721
9722         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
9723
9724         * aot.c: Avoid calling mono_method_get_header () if not needed.
9725
9726         * mini.h: Bump AOT file format version.
9727         
9728         * mini.c (mono_emit_native_call): Allocate a GOT var here.
9729
9730         * mini.c (mono_print_tree): Print more info for calls.
9731
9732 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
9733
9734         * declsec.h: Remove warning by adding missing include for marshal.h
9735
9736 2005-01-26  Martin Baulig  <martin@ximian.com>
9737
9738         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
9739         `ip' twice.
9740
9741 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
9742
9743         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
9744         flags.
9745
9746         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
9747
9748         * aot.c (mono_compile_assembly): Fix a warning.
9749
9750 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
9751
9752         * declsec.c: Look for security attributes on the original MonoMethod 
9753         (and not the wrapped one). This fix permissions on icalls.
9754
9755 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
9756
9757         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
9758
9759         * mini.c (mono_allocate_stack_slots): Add a fixme.
9760
9761         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
9762
9763 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
9764
9765         * inssel.brg: optimize casts of sealed types (more
9766         optimizations waiting for fixes in remoting).
9767
9768 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
9769
9770         * inssel.brg (stmt): Add another dummy rule.
9771
9772         * driver.c: Fix warnings.
9773
9774         * driver.c (mono_main): If running under valgrind, instruct glib to use
9775         the system allocation functions so valgrind can track the memory
9776         allocated by the g_... functions.
9777
9778         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
9779
9780         * mini-ops.h: Add OP_DUMMY_STORE opcode.
9781
9782         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
9783
9784         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
9785         variables in try regions.
9786
9787         * mini.c (mini_method_compile): Don't disable optimizations on large
9788         methods when AOT compiling.
9789
9790         * mini.c (mono_allocate_stack_slots): New arch independent method to 
9791         allocate stack slots. Not yet used.
9792
9793 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
9794
9795         * debug-mini.c (mono_debug_close_method): Plug some leaks.
9796
9797 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
9798
9799         * mini-ppc.c: make the branch info relative as the code
9800         buffer can be reallocated.
9801
9802 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
9803
9804         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
9805         * driver.c: Removed the AOT/security restriction. Now initialize the
9806         security manager (in metadata) if --security is used.
9807         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
9808         rather than the pointer to declarative security, when AOT is used.
9809
9810 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
9811
9812         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
9813         basic blocks, reduced intrinsic exception throwing code size.
9814
9815 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
9816
9817         * driver.c (mini_usage): Reorder the usage screen.
9818
9819 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
9820
9821         * mini.c (mono_resolve_patch_target): Fix warning.
9822
9823 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
9824
9825         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
9826         previous patch.
9827
9828         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
9829
9830         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
9831         breaks the amd64 build.
9832
9833         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
9834         register allocation. Fixes #71454.
9835
9836         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
9837
9838         * arrays.cs: Add new regression test.   
9839
9840 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9841
9842         * ssapre.c: Turned usage of snprintf to GString.
9843         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
9844         (I left it on by mistake in my previous commit).
9845
9846 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
9847
9848         * mini.c, cfold.c, basic-calls.cs: preserve side effects
9849         on cond branch optimization (fixes bug# 71515).
9850
9851 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9852
9853         * abcremoval.c: Fixed bug 71062.
9854         * abcremoval.h: Likewise.
9855
9856 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9857
9858         * mini.c: Added a new functionality to optimize_branches, the removal
9859         of useless basic blocks, and fixed some problem in the removal of
9860         critical edges; some utility functions added for both purposes.
9861         * ssapre.c: Added complex expression support, and fixed bug 70637.
9862         * ssapre.h: Likewise.
9863         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
9864         enabled in SSAPRE.
9865         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
9866         * driver.c: Re-enabled SSAPRE.
9867
9868 2005-01-19  Martin Baulig  <martin@ximian.com>
9869
9870         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
9871         the result of mono_get_method_constrained().
9872
9873 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
9874
9875         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
9876         manager.
9877
9878 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
9879
9880         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
9881         be detected.  Fixes #59296.
9882
9883 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
9884
9885         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
9886         which can happen. Fixes #71361.
9887
9888 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
9889
9890         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
9891         manager.
9892
9893 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
9894
9895         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
9896         appdomain-unload.exe to fail.
9897         
9898         * mini.c: Fix some memory leaks.
9899
9900 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
9901
9902         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
9903         Fixed bug and sped up some codepaths.
9904
9905 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
9906
9907         * mini.c: Fix some memory leaks.
9908
9909         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
9910         conversion.
9911
9912         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
9913
9914         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
9915         #71320.
9916
9917         * iltests.il: Add regression test for #71320.
9918
9919 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
9920
9921         * mini.c (mono_codegen): Fix installation of profiler hooks.
9922
9923         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
9924
9925 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
9926
9927         * mini.h, mini.c, cfold.c: optimize access to enum
9928         readonly fields, too. Eval conditional branches if possible
9929         to perform unreachable code removal in more cases.
9930
9931 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
9932
9933         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
9934
9935         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
9936         code manager.
9937
9938         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
9939         WinXP DEP. Fixes #71244.
9940
9941 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
9942
9943         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
9944
9945 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
9946
9947         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
9948
9949 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
9950
9951         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
9952         changes.
9953
9954         * mini.h: Bump AOT version.
9955
9956         * mini.h (MonoCompile): Change exvar to a hash table.
9957
9958         * mini.c: Allocate a separate exvar for each handler block.
9959
9960         * mini.c: Get rid of the computation of filter_lengths, its not needed.
9961
9962         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
9963         ex var with the pending exception and only throw if the two are equal.
9964         Fixes #68552.
9965         
9966         * exceptions.cs: Add tests for rethrow and nested catch clauses.
9967
9968         * mini-x86.c: Fix warnings.
9969
9970         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
9971         used by all the ports now.
9972
9973         * aot.c: Add write-symbols and save-temps options.
9974
9975 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
9976
9977         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
9978
9979 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
9980
9981         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
9982         operations.
9983
9984         * tramp-s390.c: Check vtable slot belongs to the domain.
9985
9986         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
9987         as per other platforms.
9988
9989         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
9990
9991 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
9992
9993         * driver.c: we don't run the Main() code in a subthread anymore.
9994
9995 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
9996
9997         * mini.c: added experimental rtc support in the statistical
9998         profiler: if the user has the permission, more accurate statistics
9999         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
10000         The MONO_RTC value must be restricted to what the linux rtc allows:
10001         power of two from 64 to 8192 Hz.
10002
10003 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
10004
10005         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
10006
10007 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
10008
10009         * mini-ppc.c: better icache flush for smp.
10010
10011 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
10012
10013         * mini-amd64.c (emit_move_return_value): Fix memory leak.
10014
10015         * mini-x86.c (get_call_info): Add the get_call_info () code from the
10016         amd64 port, not yet used.
10017
10018 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
10019
10020         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
10021         a struct type.
10022
10023 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
10024
10025         * driver.c: Added --security option to activate the security manager.
10026         Right now this will allow code generation for declarative demands and
10027         is disabled when AOT is specified.
10028         * mini.c: Add code generation for declarative security demands.
10029         * mini.h: Add mono_use_security_manager as an extern gboolean.
10030
10031 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
10032
10033         * aot.c (mono_compile_assembly): Speed up compilation a bit by
10034         emitting more dense assembly code.
10035
10036         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
10037         exception throwing stuff.
10038
10039 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
10040
10041         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
10042         dead code.
10043
10044         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
10045         left in by mistake.
10046
10047         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
10048         fixed.
10049
10050         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
10051
10052         * tramp-*.c: Only patch vtable slots if the object is in the current
10053         domain. Fixes appdomain-unload.exe.
10054
10055         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
10056         
10057         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
10058         x86 branch.
10059
10060 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10061
10062         * mini.c (reverse_branch_op): New helper function.
10063
10064         * mini.c (optimize_branches): Run the new optimization only on 
10065         platforms which support it. Also reverse all kinds of branches.
10066
10067         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
10068
10069         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
10070         a throw statement.
10071
10072         * mini.c (optimize_branches): Reverse not-equals branches if the false
10073         bblock is a throw. This happens a lot of time with argument checking in
10074         corlib.
10075
10076         * mini.c (mono_codegen): Add support for placing basic blocks after
10077         the function epilogue.
10078
10079         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
10080         function epilogue.
10081         
10082 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
10083
10084         * mini.c (setup_stat_profiler): Only set this up if the platform
10085         supports ITIMER_PROF.
10086
10087 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10088
10089         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
10090         previous patch.
10091
10092         * inssel.brg: Fix a warning.
10093
10094 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
10095
10096         * mini.c: added support for statistical profiler 
10097         (run with: --profile=default:stat).
10098
10099 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
10100
10101         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
10102
10103         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
10104
10105         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
10106         related to global registers from the amd64 port.
10107
10108 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
10109
10110         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
10111
10112         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
10113         with global registers.
10114         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
10115
10116         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
10117
10118 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
10119
10120         * debug-mini.c (encode_value): Fix off-by-one.
10121
10122         * aot.c (encode_value): Likewise.
10123
10124         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
10125
10126 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
10127
10128         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
10129         AOT.
10130
10131         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
10132         
10133         * aot.c (emit_method_info): Increase size of temp buffer.
10134
10135         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
10136         the AOT case.
10137
10138 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
10139
10140         * aot.c (emit_method_info): Fix build.
10141         
10142         * aot.c: Further rework of the AOT file format to reduce the size of
10143         the method info data.
10144
10145         * mini.h: Bump AOT file format version.
10146
10147 2004-12-27  Martin Baulig  <martin@ximian.com>
10148
10149         * mini.c (mini_get_method): New static method; call
10150         mono_get_method_full() and mono_get_inflated_method().
10151         (mono_method_to_ir): Use mini_get_method() instead of
10152         mono_get_method_full(). 
10153
10154 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
10155
10156         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
10157
10158 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
10159
10160         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
10161
10162         * inssel-amd64.brg: Add some optimization rules.
10163
10164 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
10165
10166         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
10167         standard not GC'd stuff is fine.
10168
10169 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
10170
10171         * aot.c: Rework the AOT file format to get rid of most of the global
10172         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
10173
10174         * mini.h: Bump AOT file format version.
10175         
10176 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
10177
10178         * mini.h: Bump AOT file format version.
10179
10180         * aot.c (mono_aot_is_got_entry): New function to determine if an 
10181         address is inside a GOT.
10182
10183         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
10184
10185         * cpu-pentium.md: Increase the maximum size of some instructions which
10186         might involve a got access.
10187         
10188         * mini.c (get_method_from_ip): Another debug helper function.
10189
10190         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
10191         when got var accesses are created during the decompose phase.
10192
10193         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
10194
10195         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
10196         argument mini_compile_method and to MonoCompile, and use this to
10197         determine whenever a given method is compiled for AOT. This allows the
10198         other methods compiled during AOT compilation to be free of AOT stuff,
10199         so the backends does not need to add special support for them by
10200         creating a fake GOT etc.
10201
10202         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
10203         longer needed.
10204
10205 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
10206
10207         * mini.c (mono_method_to_ir): It turns out that some of the
10208         x-appdomain wrappers are lax with types, so just ignore this for
10209         all wrappers.
10210
10211         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
10212         at the vtable->klass. If it is non-shared code we can just use the
10213         vtable.
10214
10215 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
10216
10217         * mini-ppc.c: access MonoDomain from tls, too.
10218
10219 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
10220
10221         * declsec.c: Removed unused variable (and related warning ;-)
10222
10223 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
10224
10225         * iltests.il: New test for LDELEMA on an array of ref types.
10226
10227         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
10228         all ldelema's on reftypes.
10229         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
10230         it was the wrong place to put it.
10231
10232         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
10233         register to pop to make this cleaner, at the request of Paolo.
10234
10235 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
10236
10237         * mini-ops.h (OP_GETHASHCODE): New op.
10238
10239         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
10240
10241         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
10242         operation.
10243
10244         For a microbenchmark, this reduces the cost of Hashtable.get_Item
10245         by 25%.
10246         
10247         * mini-x86.c (mono_arch_output_basic_block): Rather than
10248
10249         add ebp, 4
10250
10251         Emit
10252
10253         pop edx
10254
10255         The first is 3 bytes while the second is 1. This saves 36 kb on
10256         mscorlib, quite a big saving. When bootstraping mcs, I was able to
10257         see a small boost because of icache locality.
10258
10259         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
10260
10261 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
10262
10263         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
10264         started code sharing with the generic code.
10265
10266 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
10267
10268         * mini-ppc.c, cpu-g4.md: added code for direct access to
10269         tls data slots.
10270
10271 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
10272
10273         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
10274          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
10275         to OP_TLS_GET.
10276
10277 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
10278
10279         * declsec.c|h: Added functions to cache the declarative stack modifiers
10280         in MonoJitInfo and to create a security frame from a MonoJitInfo 
10281         structure.
10282         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
10283         created. Register internal calls for System.Security.SecurityFrame::
10284         _GetSecurityFrame and _GetSecurityStack.
10285         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
10286         the definitions for the new stack walk/callback mechanism.
10287         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
10288         first security frame for LinkDemands and InheritanceDemands) and
10289         GetSecurityStack for Demands. Both use the new mono_walk_stack code
10290         from lupus.
10291         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
10292         walk initialization (lupus).
10293
10294 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
10295
10296         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
10297         idiom.
10298         (handle_loaded_temps): Do not create a temporary variable for
10299         things that we know are temps. They will never be modified.
10300         (mono_spill_call): Set MONO_INST_IS_TEMP
10301         (mono_emulate_opcode): ditto
10302         (emit_tree): ditto
10303         (mono_method_to_ir.CEE_DUP): ditto
10304
10305 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
10306
10307         * mini.c (type_to_eval_stack_type): Make this handle the void type
10308         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
10309         (emit_tree): use ip_in_bb to special case some common idioms
10310         Update all callers to pass in the IP.
10311         (mono_method_to_ir): Make CEE_CALL* do the above as well.
10312
10313         This gives us a nice 2% speedup in mcs bootstrap.
10314
10315         * mini-x86.c (peephole_pass): Peephole pass to make
10316         mov  [foo], eax
10317         push [foo]
10318
10319         into
10320
10321         mov [foo], eax
10322         push eax
10323
10324         * mini.c (ip_in_bb): new method.
10325         (mono_method_to_ir): use this method rather than doing the hash
10326         lookup ourselves.
10327
10328         * linear-scan.c (mono_linear_scan): When expiring actives, you
10329         don't need to keep around variables that expire on this
10330         instruction. This makes it so that:
10331              a = b + 1
10332         will turn into:
10333              store (ebx add (ebx, 1))
10334         which will become
10335              add ebx, 1
10336
10337 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
10338
10339         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
10340         combination to avoid doing two copies. Fix up problems with previous
10341         patch.
10342
10343         * mini.c: Fix 64 bit warnings.
10344
10345         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
10346
10347 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
10348
10349         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
10350         changes from the x86 code.
10351
10352         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
10353
10354 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
10355
10356         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
10357         throwing code to reduce its size, unify the AOT and non-aot code and 
10358         get rid of relocations in the AOT case.
10359
10360         * mini-x86.h mini.c exceptions-x86.c 
10361         (mono_arch_get_throw_corlib_exception): New arch specific function to 
10362         raise corlib exceptions which doesn't require relocations in the 
10363         caller.
10364
10365         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
10366
10367 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
10368
10369         * mini.c (mono_emit_method_call): Only allocate the got var when it is
10370         needed.
10371
10372         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
10373         in the AOT case.
10374
10375 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10376
10377         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
10378         with add function when used from Inc/dec atomic 
10379         functions. Re-enabled optimization on x86.
10380         * mini-ops.h: renamed atomic_add functions to
10381         allow _add to match the Interlocked::Add and
10382         _add_next to match Interlocked::Inc/Dec.
10383
10384 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
10385
10386         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
10387         linking of BBs to the end BB, and enabled SSAPRE also with
10388         consprop and copyprop (which was prevented by that bug).
10389
10390 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10391
10392         * mini-x86.c: disabling the Interlocked optimizing code. 
10393
10394 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
10395
10396         * aot.c (load_aot_module): Move reading of got_addr after the AOT
10397         file version check.
10398         
10399 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10400
10401         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
10402         interlocked optimization due lack of support on x86, rewrote 
10403         exchange to take into account that base may be in eax.
10404         
10405         xsp works again; activated Interlocked optimizing code.
10406         
10407 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
10408
10409         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
10410
10411 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
10412
10413         * mini-ops.h: Add new opcodes.
10414
10415         * mini.h: Add new patch types. Add got_var to MonoCompile.
10416
10417         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
10418         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
10419         make it work with all kinds of patchable code.
10420
10421         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
10422         address of the GOT, and referencing entries in the GOT.
10423
10424         * mini.c: Add code to load the GOT address if needed by an opcode.
10425
10426         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
10427         independent AOT code on the x86 using an elf-style Global Offset Table.
10428
10429 2004-12-14  Raja R Harinath  <rharinath@novell.com>
10430
10431         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
10432
10433 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10434
10435         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
10436         when running xsp.
10437
10438 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
10439
10440         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
10441         of Interlocked:Increment/Decrement/Add as inline ops.
10442         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
10443
10444 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
10445
10446         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
10447         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
10448
10449 2004-12-12  Duncan Mak  <duncan@ximian.com>
10450
10451         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
10452         again. `patch_info->table_size' is no longer valid after Zoltan's
10453         commit #37636.
10454
10455 2004-12-12  Martin Baulig  <martin@ximian.com>
10456
10457         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
10458         if we are the "real" method, ie. not an inlined method inside it.
10459
10460 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
10461
10462         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
10463         before we look in the special fields table. This fixes
10464         ../tests/thread-static-init.cs.
10465
10466 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10467
10468         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
10469         for Array get_Rank and get_Length. Fixes bug #70465.
10470
10471 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
10472
10473         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
10474         separate structure to reduce the size of MonoJumpInfo.
10475
10476 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
10477
10478         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
10479
10480 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
10481
10482         * mini.c (mini_get_inst_for_method): Changed to allow ports
10483         to return a MonoInst instead of opcode 
10484         (renamed mini_get_opcode_for_method to better reflect the new functionality)
10485         
10486         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
10487         Allow ports to return a created MonoInst instead of op-code, will enable
10488         new optimizations.
10489         (renamed mini_get_opcode_for_method to better reflected the functionality)
10490
10491 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
10492
10493         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
10494
10495 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
10496
10497         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
10498         Fixes #69985.
10499
10500 2004-12-08  Martin Baulig  <martin@ximian.com>
10501
10502         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
10503         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
10504
10505 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
10506
10507         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
10508         correctly.
10509
10510         * exceptions.cs: Disable some tests which depend on properties of x86 fp
10511         arithmetic.
10512
10513 2004-12-08  Raja R Harinath  <rharinath@novell.com>
10514
10515         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
10516
10517 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
10518
10519         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
10520         bug introduced by the previous patch.
10521
10522 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
10523
10524         * mini-ppc.c, objectc.cs: handle large structs passed by value
10525         (fixes bug #69972).
10526
10527 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
10528
10529         * mini-ppc.c: OP_ARGLIST implementation from
10530         Geoff Norton  <gnorton@customerdna.com>.
10531
10532 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
10533
10534         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
10535         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
10536
10537 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
10538
10539         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
10540
10541 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10542
10543         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
10544         support.
10545
10546 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
10547
10548         * mini-sparc.c: Zero out localled-ed memory.
10549
10550         * iltests.il: Add tests for zeroing out localloc-ed memory.
10551
10552 2004-12-04  Martin Baulig  <martin@ximian.com>
10553
10554         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
10555         mono_method_get_signature_full().       
10556
10557 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
10558
10559         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
10560         and some utility functions (always for SSAPRE), integrated SSAPRE.
10561         * mini.h: Likewise.
10562         * driver.c: Added ssapre option.
10563         * ssa.c: Small fix on OP_ARG handling.
10564         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
10565         * Makefile.am: Likewise.
10566
10567 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
10568
10569         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
10570         now in the xp code.
10571
10572         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
10573         icall.
10574
10575 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10576
10577         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
10578         
10579         * cpu-s390.md : Increase instruction length of oparglist.
10580
10581         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
10582
10583 2004-11-30  Martin Baulig  <martin@ximian.com>
10584
10585         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
10586         virtual generic methods.  We call a special helper_compile_generic_method()
10587         icall to retrieve the method from the vtable, inflate and compile
10588         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
10589
10590         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
10591
10592 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
10593
10594         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
10595
10596 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
10597
10598         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
10599         Fixes #69929.
10600
10601 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
10602
10603         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
10604         platforms with PIC aot.
10605
10606 2004-11-28  Martin Baulig  <martin@ximian.com>
10607
10608         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
10609         Fixes gen-112.cs.
10610
10611 2004-11-28  Martin Baulig  <martin@ximian.com>
10612
10613         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
10614         the result of mono_type_get_underlying_type() to check whether
10615         we're byref.
10616
10617 2004-11-26  Martin Baulig  <martin@ximian.com>
10618
10619         * mini.c
10620         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
10621         in the g_assert().
10622
10623 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
10624
10625         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
10626         the same way as the other arguments so they won't get clobbered.
10627
10628         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
10629         calls through R11 since it is clobbered by the trampoline code.
10630
10631 2004-11-26  Raja R Harinath  <rharinath@novell.com>
10632
10633         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
10634         pick up in-tree mscorlib.dll.
10635
10636 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
10637
10638         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
10639
10640         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
10641         runtime data/code are now stored in a table similar to the GOT in ELF. 
10642         This allows the code itself to be position independent.
10643
10644         * aot.c: Fix loading of referenced assemblies after the lazy assembly
10645         loading changes.
10646
10647         * aot.c: Attach ELF type (object/function) directives to all global
10648         symbols.
10649
10650         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
10651
10652         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
10653
10654         * mini-amd64.h: Turn on PIC AOT code.
10655
10656         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
10657         returning the offset within an OP_AOTCONST instruction where the GOT
10658         offset needs to be added.
10659
10660         * mini.h: Bump AOT file format version.
10661
10662 2004-11-25  Martin Baulig  <martin@ximian.com>
10663
10664         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
10665         uninflated generic methods.
10666
10667 2004-11-25  Martin Baulig  <martin@ximian.com>
10668
10669         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
10670
10671 2004-11-24  Martin Baulig  <martin@ximian.com>
10672
10673         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
10674         original klass (this only applies for generic instances).
10675
10676 2004-11-24  Martin Baulig  <martin@ximian.com>
10677
10678         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
10679         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
10680         that array).
10681
10682 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
10683
10684         * mini.c (mono_method_to_ir): Disable inlining for methods containing
10685         localloc. Fixes #69678.
10686
10687         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
10688         
10689 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
10690
10691         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
10692         used SSE registers on pinvoke calls. Fixes #69774.
10693
10694 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
10695
10696         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
10697         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
10698
10699 2004-11-23  Raja R Harinath  <rharinath@novell.com>
10700
10701         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
10702         Refer directly to the mcs/ tree.
10703
10704 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10705
10706         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
10707         Check if a trampoline for a synchronized method is required. 
10708
10709 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
10710
10711         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
10712         with localloc if needed. Throe arithmetric exception in
10713         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
10714         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
10715
10716 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
10717
10718         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
10719         types before switching on type.  Fixes #69622.
10720
10721 2004-11-19  Raja R Harinath  <rharinath@novell.com>
10722
10723         * Makefile.am (check-local): New.  Integrate into 'make check'.
10724         (MCS,RUNTIME): Define using in-tree mono and mcs.
10725         (ILASM): New.
10726         (%.exe): Use $(ILASM).
10727
10728 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
10729
10730         * mini-ppc.c: adjust initial prolog size (bug #69691).
10731
10732 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
10733
10734         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
10735         #69664.
10736
10737 2004-11-17  Raja R Harinath  <rharinath@novell.com>
10738
10739         * Makefile.am (clean-local): Rename from 'clean'.
10740
10741 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10742
10743         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
10744         to mono_arch_is_int_overflow. 
10745         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
10746         SIGFPE events.
10747
10748 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
10749
10750         * declsec.c|h: New files to support declarative security attributes.
10751         Added function to check if a method has (applicable) security.
10752         * mini.c|h: Add check for declarative security attributes in
10753         mono_method_check_inlining.
10754         * Makefile.am: Added declsec.c and declsec.h to the build.
10755
10756 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
10757
10758         * mini.c, mini.h: update to keep dynamic code info per-domain.
10759
10760 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
10761
10762         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
10763         (mini_init): Get rid of it from here too.
10764
10765 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
10766
10767         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
10768         implemented OP_RETHROW (patch by Geoff Norton
10769         <gnorton@customerdna.com>).
10770
10771 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
10772
10773         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
10774         between appdomains.  Fixes appdomain-unload on PPC.
10775
10776 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
10777
10778         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10779         mini-exceptions.c: handle the new wrapper types.
10780         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
10781         token value as a MonoClass* when compiling a wrapper.
10782         mono_jit_create_remoting_trampoline now takes an additional
10783         MonoRemotingTarget parameter.
10784         
10785 2004-11-10  Martin Baulig  <martin@localhost>
10786
10787         * mini.c (mono_method_to_ir): Use `generic_container->context'
10788         rather than creating a new one.
10789
10790 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10791
10792         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
10793
10794         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
10795
10796 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
10797
10798         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
10799         the experimental aot cache stuff.
10800
10801 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
10802
10803         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10804         mini-exceptions.c: update to exception clause structure changes.
10805
10806 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
10807
10808         * exceptions-x86.c (throw_exception): Fix warnings.
10809
10810         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
10811         for OP_RETHROW.
10812
10813 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
10814
10815         * exceptions-sparc.c (get_throw_exception): Really fix this.
10816
10817 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
10818
10819         * tramp-*.c: we no longer support icalls without wrappers, so
10820         a bit of code can be removed here
10821
10822 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
10823
10824         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
10825         patch.
10826
10827         * cpu-sparc.md: Add op_rethrow.
10828
10829         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
10830
10831         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
10832
10833         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
10834         * mini-ops.h: Add OP_RETHROW.
10835
10836         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
10837
10838         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
10839
10840 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
10841         
10842         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
10843         Makes the output much easier to read
10844
10845 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
10846
10847         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
10848         prevents another huge leak when compiling with ssa. Secondly, the
10849         performance of doing this rather than freeing the lists is much
10850         better. GList does a lock every time you allocate a list link,
10851         so that it can use a memory pool. So, it is better to just use
10852         a memory pool of our own.
10853         
10854         * ssa.c, linear-scan.c: replace g_list_remove_link with
10855         g_list_delete.  The remove one does not free the GList, so we were
10856         leaking memory. On -O=all --compile-all with corlib, this cut down
10857         3 MB of allocations.
10858
10859 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
10860
10861         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
10862
10863         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
10864
10865         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
10866         into a new function mono_create_jit_trampoline ().
10867
10868 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
10869
10870         * trace.c (get_spec): Allow tracing of classes without a namespace.
10871
10872 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
10873
10874         * mini.c: Fix pointer overwrite in mini_method_compile.
10875
10876 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
10877
10878         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
10879         The darwin ABI needs some special handling for 1 and 2 byte structs
10880         Lets use lbz/lhz instead of lwz everywhere.
10881         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
10882         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
10883         Use stb/sth for the former, and put the latter always on stack instead of in
10884         argument registers.
10885
10886 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
10887
10888         * trace.c (is_filenamechar): Add '_'.
10889
10890 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
10891
10892         * mini-s390.c: Fix prolog length to allow for large trace requirements.
10893
10894         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
10895
10896 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
10897
10898         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
10899         depends on libmonogc. Fixes #68805.
10900
10901 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
10902
10903         * mini.c (mono_jit_free_method): Provide extra information for
10904         this error.  Currently this leaks, but will be turned into a
10905         developer option in the future.
10906
10907 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
10908
10909         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
10910
10911 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
10912
10913         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
10914         boundary. Fixes reading of PATCH_INFO_R4 and R8.
10915         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
10916
10917 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
10918
10919         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
10920         trampolines for AOT code.
10921
10922 2004-10-22    <vargaz@freemail.hu>
10923
10924         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
10925         constructed types. Fixes #68136.
10926
10927 2004-10-21  Martin Baulig  <martin@ximian.com>
10928
10929         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
10930         if it returns true, unwind the stack to the call instruction.
10931
10932 2004-10-21    <vargaz@freemail.hu>
10933
10934         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
10935
10936         * mini.h: Bump AOT version number.
10937
10938         * objects.cs: Add another test for unbox trampolines.
10939
10940         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
10941         valuetype methods.
10942
10943 2004-10-20    <vargaz@freemail.hu>
10944
10945         * driver.c: Add SHARED to the set of optimizations tested.
10946
10947         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
10948
10949         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
10950         used by CEE_NEWARR.
10951
10952         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
10953
10954 2004-10-20  Martin Baulig  <martin@ximian.com>
10955
10956         * mini-exceptions.c (mono_handle_exception): Call
10957         mono_debugger_handle_exception() to tell the debugger about
10958         catch/finally clauses.
10959
10960 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
10961
10962         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
10963
10964         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
10965         #68447.
10966
10967 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
10968
10969         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
10970         methods as their native size, fixed bug #57543, #57545.
10971         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
10972         This saves a temporary register and mullw call down into 1 (minor perf
10973         increase for cases like sum = sum * 5;  This use to translate into:
10974             li r11,5
10975             mullw r28,r28,r11
10976         It now translates to
10977             mulli r28,r28,5
10978
10979 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
10980
10981         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
10982         #68388.
10983
10984 2004-10-11  Martin Baulig  <martin@ximian.com>
10985
10986         * mini.c (mono_method_to_ir): If we're a generic method, get the
10987         MonoGenericContainer from our MonoMethodNormal and create a
10988         MonoGenericContext from it.
10989
10990 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
10991
10992         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
10993
10994         * basic-long.cs: Add test for checked i8->i2 cast.
10995
10996 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10997
10998         * inssel-ppc.brg: added a couple of speedup rules.
10999
11000 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
11001
11002         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
11003         to speed up rebuilds.
11004
11005 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11006
11007         * mini-s390.c: Minor fix to OP_OR_IMM.
11008
11009 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
11010
11011         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
11012         better. Fixes appdomain-unload.exe on sparc.
11013
11014 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
11015
11016         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
11017         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
11018         see bug 67324.
11019
11020 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
11021
11022         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
11023
11024 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
11025
11026         * mini.c: Always generate a field read/write wrapper for members
11027         of the class MarshalByRefObject since the actual instance could
11028         be a CBO.
11029
11030 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
11031
11032         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
11033
11034 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
11035
11036         * driver.c mini.h trace.c: Move the setting of the main assembly into
11037         a separate function called mono_trace_set_assembly () and call it after
11038         actually loading the main assembly. Fixes #66872.
11039
11040 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
11041
11042         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
11043         using the code manager.
11044
11045 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
11046
11047         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
11048
11049 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
11050
11051         * cpu-amd64.md: Fix bug in previous patch.
11052         
11053         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
11054         #66650.
11055
11056 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
11057
11058         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11059         mini-exceptions.c: updates for changed stack walk interface.
11060
11061 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11062
11063         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
11064
11065 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
11066
11067         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
11068
11069 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
11070
11071         * driver.c (mini_regression_list): Do not call mono_assembly_close 
11072         since assemblies can't be unloaded.
11073         
11074 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
11075
11076         * cpu-amd64.md: Fix more instruction lengths.
11077
11078         * cpu-amd64.md: Fix lengths of some instructions.
11079
11080 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
11081
11082         * inssel.brg: Make the array ldelema check aot friendly.
11083
11084 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
11085
11086         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
11087
11088         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
11089
11090 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
11091
11092         * mini-x86.c: Fix build.
11093
11094         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
11095         mono_type_get_underlying_type () helper function to simplify code.
11096         
11097 2004-09-09  Martin Baulig  <martin@ximian.com>
11098
11099         * mini-amd64.c: Don't access `type->data.klass' directly, call
11100         mono_class_from_mono_type() instead since the type may be a
11101         generic instance.
11102
11103 2004-09-09  Martin Baulig  <martin@ximian.com>
11104
11105         * mini-amd64.c (get_call_info): Fix support for generic instances.
11106         (add_valuetype): Use mono_class_from_mono_type() to get the class
11107         since we can be a generic instance.
11108
11109 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
11110
11111         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
11112
11113 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
11114
11115         * liveness.c: reset spill costs on each scan: bug 62107
11116
11117 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
11118
11119         * exceptions-sparc.c (mono_arch_find_jit_info): remove
11120         unnecessary line that doesn't compile
11121
11122 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
11123
11124         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
11125         trampolines, make them call an error function so people can fix their
11126         code.
11127
11128 2004-09-06  Martin Baulig  <martin@ximian.com>
11129
11130         * mini.c (mono_method_to_ir): When initializing locals, handle a
11131         generic instances like a valuetype if it's a valuetype and like a
11132         class if it's a class.
11133
11134 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
11135
11136         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
11137         stack. Fixes #64674.
11138
11139         * exceptions.cs: Add test for unwinding of call arguments.
11140
11141 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
11142
11143         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
11144         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
11145         set the carry/borrow flag). The sparc and s390 implementations
11146         can now use optimized versions (and simplify the code). ppc bugfixes.
11147
11148 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
11149
11150         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
11151
11152 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
11153
11154         * inssel-amd64.brg: Remove leftover 32 bit rule.
11155
11156         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
11157
11158 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
11159
11160         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
11161         mono_arch_find_jit_info functions into a new function. Fix a memory
11162         leak.
11163
11164         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
11165         refactored code.
11166         
11167 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
11168
11169         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
11170         as well.
11171         
11172         * exceptions.cs: Add array size tests.
11173
11174         * mini.c: Allocate a separate icall wrapper for each arity of 
11175         mono_array_new_va. Fixes #59509.
11176
11177         * exceptions.cs: Add testcase for 64578.
11178
11179         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
11180
11181         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
11182         
11183 2004-09-02  Martin Baulig  <martin@ximian.com>
11184
11185         * mini.c (mono_method_to_ir): When initializing the locals, call
11186         handle_initobj() on the generic instance itself, not its
11187         underlying type.
11188
11189 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
11190
11191         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
11192         MonoJitInfo for dynamic methods.
11193
11194         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
11195
11196         * mini.c: Add support for freeing JIT data for dynamic methods.
11197         
11198 2004-09-01  Martin Baulig  <martin@ximian.com>
11199
11200         * mini-x86.c (is_regsize_var): Added support for generic
11201         instances.
11202         (mono_arch_emit_prolog): Make this compile again, use
11203         `x86_push_imm_template (code)'.
11204
11205 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
11206
11207         * mini-x86.c: make all push_imm instructions that get
11208         patched always emit the long form
11209
11210 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
11211
11212         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
11213         in a per-domain hash.
11214
11215         * mini-amd64.c (merge_argument_class_from_type): Handle generic
11216         types.
11217
11218 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
11219
11220         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
11221         work.
11222         
11223         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
11224         work.
11225
11226         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
11227         Beginnings of SSE2 support.
11228
11229         * exceptions.cs: Add more tests for checked int<->uint casts.
11230
11231 2004-08-28  Martin Baulig  <martin@ximian.com>
11232
11233         * mini-x86.c (mono_arch_instrument_epilog): Added support for
11234         generic instances.
11235
11236         * mini.c
11237         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
11238         Handle generic instances recursively.
11239
11240 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
11241
11242         * iltests.il: test for conv.u8 on a constant
11243
11244 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
11245
11246         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
11247         LCONV_x4 (shrun_32 (membase)).
11248
11249 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
11250
11251         * inssel-x86.brg: c&p rules for push/setret of long
11252
11253 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
11254
11255         * inssel-x86.brg: c&p rules for compare (base, regvar) and
11256         compare (regvar, base)
11257
11258         * inssel-x86.brg: more burg love
11259
11260         * inssel.brg: more cleanup
11261
11262         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
11263
11264 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
11265
11266         * basic-long.cs, basic-calls.cs: new tests for optimization.
11267
11268 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
11269
11270         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
11271         patch.
11272
11273 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
11274
11275         * mini-amd64.c (read_tls_offset_from_method): Add another case.
11276         
11277 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
11278
11279         * inssel.brg (mini_emit_memcpy): use 
11280         NO_UNALIGNED_ACCESS to disable memcpy optimization
11281
11282 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
11283
11284         * mini-amd64.c: Handle generic types in various places.
11285
11286         * mini.c (mono_method_to_ir): Handle generic types in init locals.
11287
11288 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
11289
11290         * mini.c (handle_box): Fix warning.
11291
11292         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
11293
11294         * mini-amd64.h: Enable the emit_state optimization.
11295
11296         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
11297
11298         * mini-amd64.c: Add some new 64 bit peephole opts.
11299
11300         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
11301
11302         * cpu-amd64.md: sreg1 of div instructions must be %rax.
11303
11304         * mini-amd64.c: Register allocator fixes.
11305
11306         * mini.c: Add an optimization to emit_state to avoid allocation of new
11307         registers on some platforms.
11308
11309 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
11310
11311         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
11312
11313         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
11314         allocation. Fixes #63085.
11315
11316         * basic-long.cs: Add new regression test.
11317
11318         * mini-amd64.c: Register allocator improvements.
11319
11320 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
11321
11322         * mini-amd64.c (read_tls_offset_from_method): Add another code
11323         sequence.
11324
11325         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
11326         instruction sequence for nullifying class init trampolines.
11327
11328         * objects.cs: Add new regalloc test.
11329
11330         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
11331
11332 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
11333
11334         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
11335         
11336         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
11337         arguments.
11338
11339         * driver.c: Fix profiling after TLS changes.
11340         
11341         * driver.c (mono_main): Set mono_stats.enabled if needed.
11342
11343         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
11344         CEE_BOX.
11345
11346 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
11347
11348         * mini-x86.c: use a 1 op rather than a 2 op tls access
11349         instruction -> faster.
11350
11351 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
11352
11353         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
11354         x86 backend.
11355
11356 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
11357
11358         * exceptions-sparc.c (throw_exception): fix typo
11359
11360 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
11361
11362         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
11363         set tree->dreg correctly with tls. Allow any
11364         register to be used.
11365
11366         * mini-x86.c (read_tls_offset_from_method): add new code
11367         generation pattern seen with GCC.
11368
11369
11370 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11371
11372         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
11373         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11374         exceptions-sparc.c: fix some performance issues in exception
11375         handling and setting of the stack trace for exceptions that were
11376         already thrown.
11377
11378 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
11379
11380         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
11381         x86 backend.
11382         
11383         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
11384         registers.
11385
11386 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11387
11388         This patch inlines tls access, when possible.
11389         
11390         * mini.h: new arch functions for TLS intrinsics.
11391         All platforms updated with a stub.
11392
11393         * mini.c: use the new intrinsics
11394
11395         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
11396         arch specific intrinsic for tls variables
11397
11398 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
11399
11400         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
11401         under windows.
11402
11403 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11404
11405         * mini.c: thread local allocation
11406
11407 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
11408
11409         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
11410
11411         * Makefile.am: Link against the static version of libmonogc.
11412         
11413         * Makefile.am: Link the static versions of the convenience libraries
11414         into the mono executable.
11415
11416         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
11417
11418 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
11419
11420         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
11421         on integer overflow.
11422
11423         * mini-amd64.c: Reorganize function call code.
11424
11425         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
11426
11427 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
11428
11429         * inssel-x86.brg: use xor eax,eax.
11430         
11431         * basic.cs: new tests
11432
11433 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11434
11435         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
11436         in exception throwing code.
11437         
11438 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
11439
11440         * inssel-x86.brg: use xor esi,esi.
11441
11442 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11443
11444         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
11445         can trace methods compiled during mini_init () too.
11446
11447         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
11448         CEE_CONV_U4.
11449
11450 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
11451
11452         * Makefile.am: static link on x86 (r=zoltan)
11453
11454 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11455
11456         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
11457         code since it causes some programs to fail.
11458
11459 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
11460
11461         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
11462
11463 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
11464
11465         * mini.c: ovfops_op_map - add STACK_OBJ case for
11466         CONV_I 
11467         * basic.cs: add test_0_pin_string as test
11468         case for above.
11469
11470 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
11471
11472         * Makefile.am: build C# if srcdir != builddir
11473
11474 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11475
11476         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
11477         fall-through blocks.
11478
11479 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11480
11481         * driver.c: enable loop by default again and include abcrem in -O=all.
11482
11483 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
11484
11485         * iltests.il: Add some localloc tests.
11486
11487         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
11488
11489         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
11490         Fixes #62574.
11491
11492         * inssel-amd64.brg: Add some optimizations.
11493
11494         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
11495         for gcc-3.4.
11496
11497         * Makefile.am: Statically link mono against libmono on AMD64.
11498         
11499         * mini-amd64.c inssel-amd64.brg: Optimizations.
11500
11501 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
11502
11503         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
11504
11505         * tramp-amd64.c: Patch calling code in trampolines.
11506
11507 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
11508
11509         * mini-amd64.c: pinvoke struct passing fixes.
11510
11511 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
11512
11513         * mini-sparc.c: redo change, make mono_arch_cpu_init call
11514         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
11515
11516 2004-08-05  Duncan Mak  <duncan@ximian.com>
11517
11518         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
11519         CEE_LDELEM_ANY.
11520
11521 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
11522
11523         * mini-amd64.c (emit_move_return_value): Move return value for normal
11524         calls too.
11525
11526 2004-08-05  Martin Baulig  <martin@ximian.com>
11527
11528         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
11529         `type->type'; just modify `type' itself when dealing with enums
11530         and generic instances.
11531         (check_call_signature): Make `simple_type' a `MonoType *'.
11532
11533 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
11534
11535         * mini.c: Use OP_PADD to add offsets to addresses.
11536
11537         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
11538
11539 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
11540
11541         * mini-sparc.c (mono_arch_emit_epilog): fix check
11542         for folding last op into restore instruction
11543
11544 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
11545
11546         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
11547         helper methods using the code manager.
11548         
11549         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
11550
11551         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
11552
11553 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11554         
11555         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
11556           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
11557
11558         * mini-s390.c: fix tail processing
11559
11560 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
11561
11562         * mini-ppc.c: mul.ovf.un exception name fix.
11563
11564 2004-08-03  Martin Baulig  <martin@ximian.com>
11565
11566         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
11567         instances; before jumping to `handle_enum', also modify `ptype'.
11568
11569 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
11570
11571         * cpu-sparc.md: fcall maximal length too small.
11572
11573 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
11574
11575         * mini-amd64.c mini.h: Add initial support for passing/returning 
11576         structures to/from pinvoked methods.
11577
11578 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
11579
11580         * mini-ppc.c: reg allocator fix.
11581
11582 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
11583
11584         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
11585
11586         * inssel.brg: Optimize memset on 64 bit machines.
11587
11588         * mini-amd64.c: Fix some vararg cases.
11589
11590 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11591
11592         * mini-s390.c: Corrected macro in emit_float_to_int
11593
11594         * s390-abi.cs: Tests to exercise the s390 ABI
11595
11596 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
11597
11598         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
11599         caller saved regs.
11600
11601         * basic.cs: Add a test for add.ovf.un.
11602
11603 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
11604
11605         * mini-sparc.c: add case for OP_IDIV_UN
11606
11607 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
11608
11609         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
11610         
11611         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
11612
11613 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
11614
11615         * basic.cs: regression tests.
11616
11617         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
11618         regressions.
11619
11620 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
11621
11622         * basic.cs: Add a new test.
11623
11624         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
11625         and AOT. Various fixes and optimizations.
11626
11627         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
11628
11629 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
11630
11631         * mini-ppc.c: make sure temp regs are not used for global reg
11632         allocation.
11633
11634 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
11635
11636         * cpu-sparc.md: conv_i8 fix for 64bits
11637
11638         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
11639
11640 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
11641         
11642         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
11643         add opcode for cmp BYTE PTR [eax], imm.
11644
11645         * inssel.brg: Make memcpy and memset takes bases.
11646
11647 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
11648
11649         * *-amd64.*: More AMD64 work.
11650         
11651 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
11652
11653         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
11654         add a compare-not-equal opcode.
11655         
11656 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
11657
11658         * mini.c: Use mono_init_from_assembly instead of mono_init.
11659         
11660 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
11661
11662         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
11663
11664         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
11665
11666         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
11667
11668         * inssel.brg: 64 bit fixes.
11669
11670         * mini.h (MonoCallInst): Add some AMD64 specific data.
11671
11672         * mini.h: Add some OP_P opcodes.
11673
11674 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
11675
11676         * basic.cs: tests for 61797 and 61740
11677
11678 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
11679
11680         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
11681         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
11682
11683 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
11684
11685         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
11686
11687         * *-amd64*.*: Ongoing AMD64 work.
11688
11689 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
11690
11691         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
11692
11693         * *-amd64*: Ongoing AMD64 work.
11694
11695         * mini-arch.h: Add AMD64 support.
11696
11697         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
11698
11699         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
11700
11701         * mini-ops.h: Add new opcodes.
11702
11703         * Makefile.am: Add AMD64 support.
11704
11705         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
11706         rules into the inssel-long*.brg files.
11707
11708         * *-amd64.*: Add beginnings of AMD64 backend.
11709
11710 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
11711
11712         * mini.c (print_dfn): commenting out the code that prints
11713         the cil. With -O=deadce, this makes -v -v crash.
11714         
11715         * cpu-pentium.md: make checkthis have a length of 2
11716
11717 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
11718
11719         * mini-sparc.h: fix implementations of __builtin
11720         functions for Sun compiler for V9.
11721
11722 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
11723
11724         * mini.c: use the new stelem.ref wrapper
11725         * exceptions.cs, arrays.cs: new stelem.ref tests
11726
11727 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11728
11729         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
11730         new XSP should work with these changes).
11731
11732 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
11733         
11734         * inssel-{long32,x86,}.brg: trivial optimizations.
11735         
11736 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
11737
11738         * mini.c: load value when emitting box operation in
11739         constrained calls.
11740
11741 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
11742
11743         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
11744         is one byte shorter than cmp DWORD PTR [eax], 0.
11745
11746 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
11747
11748         * inssel-ppc.brg: arguments on the stack are always
11749         relative to the stack pointer (spotted by Neale Ferguson).
11750
11751 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11752
11753         * exceptions-x86.c: delay appending the method name to the trace until
11754         after mono_jit_info_table_find is called, as this gets the real
11755         MonoMethod.
11756
11757 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
11758
11759         * aot.c: register roots
11760
11761 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
11762
11763         * aot.c : I could just use PLATFORM_WIN32 flag.
11764
11765 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
11766
11767         * aot.c : Reverting the previous fix. This time it broke linux build.
11768
11769 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
11770
11771         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
11772
11773 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
11774
11775         * mini.c (handle_stack_args): Remove some more debugging code.
11776         
11777         * mini.c (handle_stack_args): Remove debug output left in by mistake.
11778
11779         * driver.c mini.h aot.c: Allow additional options to be specified with
11780         --aot and pass them to mono_compile_assembly.
11781
11782         * aot.c: Add experimental code to AOT compile all loaded assemblies
11783         on demand and save the code into a cache in the filesystem.
11784
11785         * aot.c: Add support for more wrapper methods.
11786         
11787         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
11788         58863.
11789
11790         * cpu-*.md: Remove removed opcodes.
11791
11792         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
11793         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
11794         related icalls to marshal.c.
11795
11796 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
11797
11798         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
11799
11800         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
11801
11802         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
11803
11804 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
11805         * liveness.c: If liveness is recomputated we need to reset the information
11806         for each variable. This way, if the liveness range has been narrowed
11807         by optimizations that happened after the last computation, we can return
11808         a smaller range.
11809         
11810         For example, if you have
11811         
11812         {
11813                 int i = 0;
11814                 
11815                 // Tons of code that does not affect i
11816                 
11817                 i = foo ();
11818                 ...
11819         }
11820         
11821         i = 0 is dead code and will be removed by SSA. However, when
11822         linear scan gets to the code, i will still appear to be live
11823         throughout the entire block. This prevents good register allocation.
11824
11825 2004-07-06  Martin Baulig  <martin@ximian.com>
11826
11827         * debug-mini.c (mono_debug_init_method): Allow
11828         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
11829         (mono_debug_add_icall_wrapper): New method.
11830
11831         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
11832
11833 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
11834
11835         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
11836         optimization.
11837
11838 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
11839
11840         * aot.c (mono_aot_load_method): Fix loading of debug info.
11841
11842 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
11843
11844         * aot.c: Add logging support.
11845
11846 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
11847
11848         * mini.h: Add prototype for mono_print_method_from_ip.
11849
11850         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
11851
11852         * inssel.brg: 64 bit fixes.
11853
11854         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
11855         inssel-long32.brg.
11856
11857         * Makefile.am: Add SPARC64 support.
11858
11859 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
11860
11861         * aot.c: Fix alignment problems on 32 bit platforms.
11862
11863 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
11864
11865         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
11866         SPARC64.
11867
11868         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
11869         problems.
11870
11871         * mini.h: Bump AOT file version. Some 64 bit fixes.
11872
11873 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
11874
11875         * inssel-sparc.brg: Add new rule to avoid register moves.
11876
11877         * inssel.brg: Add ldind_to_load_membase helper function.
11878
11879 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
11880
11881         * mini.c: OffsetToStringData intrinsic.
11882         
11883 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
11884
11885         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
11886
11887         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
11888         regression tests.
11889
11890         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
11891 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11892
11893         * mini.c: reinstated mono_compile_get_interface_var()
11894         on x86, too, since the change breaks the Gtk# build there as well.
11895
11896 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11897
11898         * driver.c: remove loop from the default optimizations: it seems to
11899         interact badly with some of the other options (see bug #60613).
11900
11901 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
11902
11903         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
11904         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
11905
11906 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
11907
11908         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
11909         vararg-using methods.
11910
11911 2004-06-21  Martin Baulig  <martin@ximian.com>
11912
11913         * mini/mini-exceptions.c
11914         (mono_handle_exception): Added `gpointer original_ip' argument.
11915         After calling mono_unhandled_exception(), call
11916         mono_debugger_unhandled_exception() and if that returns true,
11917         restore the context and return.
11918
11919 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
11920
11921         * mini-ppc.c: prefer the use of relative branches so
11922         they won't need to be patched in aot code (patch from Patrick Beard).
11923
11924 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
11925
11926         * aot.c: patch from Patrick Beard to make the output assembly
11927         more correct for the MacOSX assembler. Small tweak to
11928         generate sane images on Linux/PPC, too.
11929
11930 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11931
11932         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
11933         case until bug #59509 is fixed (shows up in #60332).
11934
11935 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11936
11937         * mini.c: make sure the needed wrappers are compiled, too, with
11938         precomp.
11939
11940 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
11941
11942         * driver.c: remove NPTL reference in --version output.
11943
11944 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11945
11946         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
11947         generate valid assembly for the Mach-O assembler.
11948
11949 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
11950
11951         * driver.c: don't include abcrem in the all optimization specifier
11952         since it slows down jit compilation too much for now.
11953
11954 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
11955
11956         * mini.c: use BIGMUL only if both operands have the same signage.
11957         * iltests.il: Test for bug 60056. (errors related to signage in
11958         BIGMUL).
11959
11960         r=lupus.
11961
11962 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
11963
11964         * mini.c, aot.c: memory leak fixes.
11965
11966 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11967
11968         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
11969
11970 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
11971
11972         * Makefile.am: remove the -static hack completely, it links in
11973         statically glib as well.
11974
11975 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
11976
11977         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
11978         * exceptions.cs: make it compile with new mcs/csc.
11979
11980 2004-06-03 Massimiliano Mantione <massi@ximian.com>
11981         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
11982         and added relevant test case.
11983
11984 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
11985
11986         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
11987         regressions in gtk-sharp.
11988
11989 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
11990
11991         * exceptions.cs: New regression tests.
11992
11993         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
11994
11995 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
11996
11997         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
11998
11999 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
12000
12001         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
12002
12003         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
12004
12005 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
12006
12007         * mini.c (mono_jit_runtime_invoke): Init class in this
12008         method instead of trusting mono_jit_compile_method to
12009         do the work (because wrappers can be in object class)
12010
12011 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
12012
12013         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
12014
12015         * basic-long.cs: New regression test.
12016
12017 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
12018
12019         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
12020         and div/rem checks.
12021
12022 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
12023
12024         * Makefile.am: fix miguel's change to build mono statically against
12025         libmono (track build dependencies).
12026
12027 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12028
12029         * cfold.c: Some glib versions do not have G_MININT32.
12030
12031 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
12032
12033         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
12034         with precision of tan, atan, sin and cos, and implemented related
12035         regressions tests (fixes bug 54467, but one new problem appeared and
12036         is not fixed yet).
12037
12038 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12039
12040         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
12041
12042         * exceptions.cs: Add test for constant folding && division by zero.
12043
12044         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
12045         since driver.c is in libmono too, so the optimization was useless.
12046
12047         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
12048         variable to driver.c so the compiler can emit more efficient code to
12049         access them.
12050
12051 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12052
12053         * Makefile.am: don't distribute generated inssel.[ch] files.
12054
12055 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
12056
12057         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
12058         into the default appdomain. Fixes #58707.
12059
12060         * jit-icalls.c: Remove the broken approximation for truncl, doing
12061         no conversion is better.
12062
12063         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
12064         Fixes #58863.
12065
12066 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
12067
12068         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
12069         of the mcrxr instruction which is not available on some processors
12070         even if it's documented to be. Implement add and sub overflow correctly
12071         (still not complete for long unsigned). Speed up icalls a bit.
12072
12073 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
12074
12075         * mini.c (mono_jit_compile_method_with_opt): Make sure that
12076         we run .cctor in the current domain instead of target_domain.
12077         
12078         Fixes bug #58558, .cctor not being called in -O=shared.
12079
12080 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12081
12082         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
12083
12084 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
12085
12086         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
12087         which can be done with an imm8, do it that way.
12088         (mono_arch_output_basic_block): ditto for a jmp
12089         (mono_arch_emit_prolog): Computate maximum offset of a label.
12090
12091 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
12092
12093         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
12094         now tries to allocate prefered physical reg's for virtual
12095         regs. This reduces the number of emited spills/loads with
12096         20-30% on our core assemblies.
12097
12098 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12099
12100         * jit-icalls.c: truncl() is not needed and trunc() is
12101         the correct thing to do anyway (bug #58287).
12102
12103 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
12104
12105         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
12106         if available.
12107
12108 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
12109
12110         * driver.c: enable loop optimizations by default.
12111
12112 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
12113
12114         * mini-x86.c: fix calc of max loop size when aligning loops start.
12115
12116 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
12117
12118         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
12119         the stack.
12120
12121 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
12122
12123         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
12124         should set carry.
12125
12126         * basic-long.cs: Add tests for add/subtract of immediates with carry.
12127
12128         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
12129         
12130         * mini.c (inline_method): Allways inline some wrappers even if the cost
12131         is too large. Fixes #58785.
12132
12133         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
12134         
12135 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
12136
12137         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
12138         (crichton@gimp.org). Beginning of support for sparc/linux.
12139
12140         * mini-sparc.c: Optimize retrieval of LMF address.
12141
12142 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
12143
12144         * exceptions-ppc.c:  handle alloca in methods with clauses.
12145
12146 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
12147
12148         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
12149
12150 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
12151
12152         * mini.c: Delegate most of the abort signal work to 
12153           mono_thread_request_interruption, which also handles Stop and Suspend
12154           states.
12155
12156 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
12157
12158         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
12159         supports the save/restore lmf opcodes.
12160
12161 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
12162
12163         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
12164         by gcc-3.4 as well.
12165
12166         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
12167
12168 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
12169
12170         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
12171         methods which contain array accesses.
12172
12173         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
12174         boundaries. Fixes #58537.
12175
12176         * iltests.il: Add regression test for #58537.
12177
12178 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
12179
12180         * mini-x86.c (mono_arch_local_regalloc): Last part of
12181         fix for bug #58633 (releasing register to early).
12182
12183 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
12184
12185         * basic-long.cs: Add new regression test.
12186
12187 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
12188
12189         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
12190         register too early on the chain.
12191
12192 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
12193
12194         * mini.c (create_helper_signature): Use a helper function to reduce
12195         the code which needs to be written. Also set the calling convention of
12196         icalls on windows. Fixes #57840.
12197
12198 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
12199
12200         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
12201         exceptions-ppc.c: added helper function to get the instruction address
12202         from a signal handler context.
12203
12204 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12205
12206         * helpers.c: use g_get_tmp_dir. Invokes happyness 
12207         from gonzalo.
12208
12209 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12210
12211         * helpers.c: Add new env variable to pass args to objdump.
12212         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
12213
12214 2004-05-17  Radek Doulik  <rodo@ximian.com>
12215
12216         * Makefile.am (common_sources): added abcremoval.h so it get
12217         disted and daily mono packages on go-mono.com will build again
12218
12219 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
12220
12221         * abcremoval.c: Fixed coding style, added copyright header.
12222
12223         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
12224
12225         * mini.h: Added prototype for abc removal main function.
12226
12227         * build_relations_propagation_table.pl: Added copyright header.
12228
12229 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
12230
12231         * basic-long.cs: reg test for complex ceq_long bug.
12232
12233 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
12234
12235         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
12236         reg in long and clob case (bug #58343). Fixed/added comments.
12237
12238 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
12239
12240         * mini.c (mono_jit_runtime_invoke): Follow new convention
12241         of calling the invoke method with an function pointer.
12242
12243 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
12244
12245         * ChangeLog: Fix author of memory leak patch.
12246
12247 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
12248
12249         * Makefile.am: fix make dist as well...
12250
12251
12252 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
12253
12254         * cfold.c: Made so that conversions from pointer to int4 are no-ops
12255         on archs where pointers are 4 bytes long.
12256
12257         * Makefile.am: Added abcremoval.c source file.
12258
12259         * abcremoval.c: Added abcremoval.c.
12260
12261         * abcremoval.h: Added abcremoval.h.
12262
12263         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
12264
12265         * inssel.brg: Enabled bounds check removal.
12266
12267         * mini.c: Added support for abcrem optimization.
12268
12269         * mini.h: Added abcrem optimization label.
12270
12271         * driver.c: Added support for abcrem optimization.
12272
12273         * propagated_relations_table.def: Added propagated_relations_table.def.
12274
12275 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
12276
12277         * mini.c, cfold.c: fix style.
12278
12279 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12280
12281         * mini.c: handle issue with the low-level implementation of
12282         some long opcodes (bug #54209).
12283
12284 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
12285
12286         * basic.cs: test for my new cmov stuff.
12287
12288 2004-05-13      Patrik Torstensson
12289
12290         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
12291         opt and added peephole documentation.
12292
12293 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
12294
12295         * tramp-ppc.c: rewrote the generic trampoline code.
12296
12297 2004-05-11      Patrik Torstensson
12298
12299         * mini-x86.c: optimize long shl/shr asm code (one less branch)
12300
12301 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
12302
12303         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
12304
12305         * mini.h mini.c dominators.c: Applied patch from Derek Woo
12306         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
12307
12308         * mini.c: Add new icalls for AsAny marshalling.
12309
12310 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
12311
12312         * tramp-ppc.c, mini-ppc.c: more cleanups.
12313
12314 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12315
12316         * mini.c: no warnings.
12317
12318 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12319
12320         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
12321
12322 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
12323
12324         * mini.c: In the thread abort signal handler, if the thread is in the
12325         process of being stoped, don't throw the Abort exception, just stop the
12326         thread.
12327
12328 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
12329
12330         * tramp-ppc.c: removed old code.
12331
12332 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12333
12334         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
12335         do some simple speed optimizations on ppc.
12336
12337 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12338
12339         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
12340         and large offsets in load/store.
12341
12342 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
12343
12344         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
12345         it causes regressions.
12346
12347 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
12348
12349         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
12350         support.
12351
12352 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12353
12354         * jit-icalls.c: remove warnings.
12355         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
12356         speedups for unsafe code.
12357
12358 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
12359
12360         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
12361
12362 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
12363
12364         * basic-calls.cs: Add new regression test.
12365
12366         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
12367         more portable.
12368
12369         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
12370
12371         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
12372         is no longer used.
12373
12374 2004-05-06      Patrik Torstensson
12375
12376         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
12377         long reg allocation in any reg (not only eax:edx) and implemented 
12378         long shl/shr ops in asm instead of helpers.
12379
12380 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
12381
12382         * mini-sparc.h: Fix warnings.
12383
12384         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
12385         stack.
12386
12387         * mini-exceptions.c (mono_handle_exception): Call the filter in a
12388         separate statement for clarity.
12389
12390         * mini-sparc.c: Update status.
12391
12392 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
12393
12394         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
12395         here.
12396
12397 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12398
12399         * inssel-ppc.brg: another small pre-release workaround:
12400         we don't do overflow detection for long_sub_un.
12401
12402 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12403
12404         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
12405         (also works around a weird ppc bug: 57957).
12406
12407 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
12408
12409         * tramp-ppc.c: trampoline fixes.
12410
12411 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
12412
12413         * mini-ppc.c: fixed typos.
12414
12415 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12416
12417         * mini-ppc.c, exceptions-ppc.c: more code saves registers
12418         at the top of the stack. Fixed typos. Use a frame registers
12419         for all the methods with exception clauses.
12420
12421 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12422
12423         * exceptions-ppc.c: restore fp registers.
12424
12425 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
12426
12427         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
12428         order from the stack top (moved the stack room to save the
12429         return value for trace after the param area). Fixed corruption
12430         in restoring registers on unwind.
12431
12432 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12433
12434         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
12435
12436 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12437
12438         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
12439         and prolog/epilog for methods that use it. Allow
12440         enough param area room for varargs methods. Fix miguel's
12441         breakage in exception handling.
12442
12443 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12444
12445         * Makefile.am: run genmdesc only on current arch.
12446
12447 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12448
12449         * exceptions-x86.c:
12450         * mini-x86.h: fix the build on windows.
12451
12452 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
12453
12454         * 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.
12455
12456         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
12457
12458         * mini-exceptions.c: New file.
12459         
12460         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
12461         Move some parts of the x86 exception handling code to an 
12462         arch-independent file so it can be shared with other ports.
12463
12464 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
12465
12466         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
12467
12468 2004-04-26  David Waite  <mass@akuma.org>
12469
12470         * driver.c: remove comma from end of enumeration declaration
12471
12472 2004-04-26  Jackson Harper  <jackson@ximian.com>
12473
12474         * driver.c: parse config file before loading first assembly. This
12475         allows the user gac to be enabled/disabled. 
12476         
12477 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
12478
12479         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
12480         simpler mechanism: we do not care what is encoded initially
12481         (branch absolute or relative), we care about the code and its
12482         target.  I kept the old code for reference for now.
12483
12484         The new code tries first to determine if the jump is anywhere in
12485         the -/+32 absolute meg range, if it succeeds, it encodes using the
12486         absolute branch;  If not, it tried to find something in the
12487         relative range, if not, it uses the handle_thunk code. 
12488
12489 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
12490
12491         * exceptions-ppc.c: use the correct ip register on macosx.
12492
12493 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
12494
12495         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
12496
12497 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
12498
12499         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
12500         Raise exception on integer divide by zero by hand since the hw
12501         doesn't support it. Handle NaNs in FP compares.
12502
12503 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
12504
12505         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
12506         code reducing duplication between the platforms and enabled
12507         signal exception handling (on linux for now).
12508
12509 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
12510
12511         * exceptions-ppc.c: more macosx support.
12512
12513 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12514
12515         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
12516
12517 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
12518
12519         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
12520
12521 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
12522
12523         * iltests.il: more tests.
12524
12525 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
12526
12527         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
12528         vars as well.
12529
12530 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12531
12532         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
12533
12534 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
12535
12536         * liveness.c: Mark variables as volatile in all basic blocks reachable
12537         from exception clauses.
12538
12539 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
12540
12541         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
12542         inlining.
12543
12544 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
12545
12546         * iltests.il, basic.cs: more tests for regalloc.
12547
12548 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12549
12550         * iltests.il: Some tests for register allocation modifications
12551         I have locally.
12552
12553 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
12554
12555         * exceptions.cs: Add regression test for bug #56782.
12556
12557         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
12558         original stack trace if an exception is rethrown. Fixes #56782. Oh,
12559         the beauty of fixing the same thing in 5 different files...
12560
12561 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
12562
12563         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
12564         methods.
12565
12566 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
12567
12568         * mini.c: Add support for STRWLPARRAY marshalling convention.
12569
12570 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12571
12572         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
12573         to init the context to setup the regs pointer).
12574
12575 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12576
12577         * exceptions-ppc.c: more exceptions work.
12578
12579 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12580
12581         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
12582         not allowed.
12583
12584 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
12585
12586         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
12587         can use the memory directly.
12588
12589         * cpu-pentium.md: Update documentation from a post from Zoltan. 
12590
12591         add x86_add_membase, x86_sub_membase, x86_mul_membase
12592
12593 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
12594
12595         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
12596         GENERAL_REGS they were also hardcoded for all PPC ports.
12597
12598         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
12599
12600         Remove hard-coded limit for floating point registers, use
12601         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
12602
12603         Notice that in MacOS X calling conventions you can fit a lot more
12604         floating point values in registers, so I should update the PInvoke
12605         test to excercise the passing of floating point values on the
12606         stack (currently broken).
12607         
12608 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
12609
12610         * tramp-ppc.c (create_trampoline_code): Added
12611         JUMP_TRAMPOLINE_SIZE. 
12612         (ppc_magic_trampoline): Follow the pattern from
12613         x86_magic_trampoline: if code is set to zero, return. 
12614         (create_trampoline_code): Always pass MonoMethod to the jump
12615         trampoline, before it was passing a null.
12616         (mono_arch_create_jump_trampoline): Implement the jump stub, could
12617         share the code with mono_arch_create_jit_trampoline. 
12618
12619         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
12620         implemented.
12621         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
12622         implemented.  
12623
12624         * cpu-g4.md: Added length for jmp instruction, the worst case
12625         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
12626         for save_lmf).
12627
12628 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
12629
12630         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
12631
12632 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
12633
12634         * mini.c: Only set bblock->real_offset when adding a new bblock, and
12635         before each IL instruction.
12636
12637         * mini.c (CEE_BOX): Fix warnings.
12638
12639 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12640
12641         * mini.c: removed a few unused vars and extra whitespace.
12642
12643 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
12644
12645         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
12646         checks.
12647         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
12648         index.
12649         (OP_GETCHR): use the above
12650         (CEE_LDELEMA): use the above.
12651
12652         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
12653         version of the generic impl.
12654         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
12655         (CEE_LDELEMA): use the above.
12656
12657 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
12658
12659         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
12660         Fixes #56317.
12661
12662         * iltests.il: Added new regression test for #56317.
12663
12664 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
12665
12666         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
12667         under NetBSD. Fixes #56450.
12668
12669         * liveness.c (update_gen_kill_set): Fix previous patch.
12670
12671 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12672
12673         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
12674
12675 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
12676
12677         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
12678         ldsfld and ldsflda.
12679
12680         * inssel-sparc.brg: Add more optimizations.
12681
12682         * mini-sparc.c: Replace multiply/divide with shifts if possible.
12683
12684 2004-04-01  Martin Baulig  <martin@ximian.com>
12685
12686         * mini.c (handle_box): New static function; moved the
12687         implementation of CEE_BOX here.
12688         (mono_method_to_ir): Added `constrained_call' variable.
12689         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
12690         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
12691         mono_method_get_constrained() to get the method.
12692
12693 2004-04-01  Martin Baulig  <martin@ximian.com>
12694
12695         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
12696         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
12697         (mono_method_to_ir): We don't need these macros anymore since
12698         mono_class_get_full() already takes care of it. 
12699
12700 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12701
12702         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
12703         use @function (as doesn't accept #function here) and check the return
12704         value of system and stop if fails.
12705
12706 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12707
12708         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
12709
12710 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
12711
12712         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
12713
12714         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
12715
12716         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
12717         #56223.
12718
12719         * basic-long.cs: Add test for negation of Int64.MinValue.
12720
12721 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
12722
12723         * mini-sparc.c: Update status.
12724
12725         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
12726
12727         * exceptions-sparc.c: Fix return value in filters.
12728
12729         * inssel-sparc.brg: Fix register allocation in some rules.
12730
12731 2004-03-28  Martin Baulig  <martin@ximian.com>
12732
12733         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
12734         if neccessary.  
12735
12736 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
12737
12738         * mini-x86.c (mono_arch_patch_code): Fix warnings.
12739         
12740         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
12741         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
12742         remove unused conv_u4 opcode.
12743
12744         * mini-x86.c: Remove valgrind workaround since it slows down things
12745         even when mono is not run under valgrind.
12746
12747 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
12748
12749         * mini-sparc.c: Update status.
12750
12751         * inssel-sparc.brg: Add some optimizations.
12752
12753         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
12754         future delay slot filling. Add support for varargs, tail calls and JMP.
12755
12756         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
12757         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
12758
12759         * inssel.brg: Fix register allocation in OP_ARGLIST.
12760
12761         * inssel.brg: Fix warnings.
12762
12763 2004-03-25  Martin Baulig  <martin@ximian.com>
12764
12765         * mini.c (inflate_generic_field): Removed.
12766         (mini_get_method): Removed, use mono_get_method_full(),
12767         (mini_get_class): Removed, use mono_class_get_full().
12768         (mono_method_to_ir): Pass our generic context to
12769         mono_field_from_token().        
12770
12771 2004-03-25  Martin Baulig  <martin@ximian.com>
12772
12773         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
12774         of a `MonoMethod *'.
12775         (mini_get_method): Take a `MonoGenericContext *' instead
12776         of a `MonoMethod *'.
12777         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
12778         a new local variable called `generic_context' which holds the
12779         current `MonoGenericContext *'; use it to lookup things.
12780
12781 2004-03-24  Martin Baulig  <martin@ximian.com>
12782
12783         * mini.c (mini_get_class): New static method; if we're inside a
12784         generic instance, inflate the class if neccessary.
12785         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
12786
12787 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
12788
12789         * iltests.il: New regression test for #55976.
12790
12791         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
12792         #55976.
12793
12794 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
12795
12796         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
12797         output.
12798
12799 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
12800
12801         * liveness.c: Consider SSA stores as well as loads when making vars
12802         volatile.
12803
12804         * exceptions.cs: New regression tests for register allocation.
12805         
12806 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
12807
12808         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
12809         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
12810           domain lock only to protect puntual access to data structures.
12811           Added access lock for sighash, jit_icall_hash_name, 
12812           jit_icall_hash_addr and domain->code_mp.
12813
12814 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
12815
12816         * driver.c: Print SIGSEGV handling method.
12817
12818         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
12819
12820         * mini.c (setup_jit_tls_data): Handle case when this is called
12821         multiple times for a thread.
12822
12823         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
12824         is different from fbxx_un. Fixes #54303. Also use constants instead of
12825         magic numbers in a lot of places.
12826
12827 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
12828
12829         * exceptions.cs: Fix cctor test when --regression is used.
12830
12831 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
12832
12833         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
12834         for Linux/ppc.
12835
12836 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
12837
12838         * inssel-ppc.brg: fixed register assignments for some rules.
12839
12840 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
12841
12842         * exceptions.cs: Add test for exceptions in static constructors.
12843
12844         * mini.c (mono_jit_compile_method_with_out): Move the calling of
12845         static constructors outside the domain lock. Fixes #55720.
12846
12847 2004-03-17  Martin Baulig  <martin@ximian.com>
12848
12849         * mini.c (get_generic_field_inst): Removed, this'll never happen.
12850         (inflate_generic_field): Take the `MonoMethod *' instead of the
12851         `MonoClass *' and added support for generic method.
12852         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
12853         have a `field->parent->gen_params', only inflate the field if it's
12854         an open constructed type.
12855
12856 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
12857
12858         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
12859         exception object instead of the preconstructed ones.
12860
12861 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12862
12863         * mini.c: reverted changed to sigsegv_signal_handler commited
12864         accidentally in the previous patch.
12865
12866 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12867
12868         * mini.c:
12869         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
12870         running --aot with an old assembly.
12871
12872 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
12873
12874         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
12875         point values.
12876
12877         * mini-sparc.c: Add support for v9 branches with prediction.
12878
12879 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
12880
12881         * mini.c (mini_init): #warning is GNUC only
12882
12883         * mini-sparc.h: implement __builtin_frame_address
12884         and __builtin_return_address for Sun C compiler
12885
12886 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
12887
12888         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
12889
12890 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
12891
12892         * basic-calls.cs: Add test for unaligned byref long argument passing.
12893
12894         * mini-ops.h: Add sparcv9 compare and branch instructions.
12895
12896         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
12897         v9 instructions if we have a v9 cpu.
12898
12899         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
12900         registers for global allocation.
12901
12902         * exceptions-sparc.c: Fixes.
12903         
12904 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
12905
12906         * liveness.c (mono_analyze_liveness): Optimized version.
12907
12908         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
12909
12910         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
12911         sparc work.
12912
12913         * basic-float.cs basic-calls.cs: New regression tests.
12914
12915 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
12916
12917         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
12918         sigaltstack implementation.
12919
12920         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
12921         
12922         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
12923         stuff if SIGSEGV_ON_ALTSTACK is not defined.
12924
12925 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
12926
12927         * mini.c: Fix warnings.
12928         
12929         * mini.c (mono_resolve_patch_target): New function which contains the
12930         arch independent part of the patching process.
12931
12932         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
12933         patching code to a separate function.
12934
12935 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
12936
12937         * mini.c (add_signal_handler): ifdef out on Windows
12938
12939 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
12940
12941         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
12942         cpu-sparc.md: Add exception handling support + other fixes.
12943
12944         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
12945         typed GC detection in --version.
12946
12947         * basic.cs exceptions.cs: New regression tests.
12948
12949         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
12950         the arch specific code can store data during a compilation.
12951
12952         * mini-ops.h: Add OP_SETFRET.
12953
12954         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
12955         function, register a separate icall for each arity, so the icalls can
12956         get a wrapper.
12957         
12958         * mini.c (mono_print_tree): Print negative offsets in a more readable
12959         form.
12960         
12961         * mini.c: Make signal handling work on sparc.
12962         
12963         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
12964
12965         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
12966
12967         * jit-icalls.c: Emulate truncl by aintl on solaris.
12968
12969         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
12970
12971 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
12972
12973         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
12974
12975 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
12976
12977         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
12978         a MarshalByRef type, inline a method that performs the check, taking into
12979         account that the object can be a proxy. Also implemented tow new opcodes:
12980         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
12981         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
12982         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
12983
12984 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
12985
12986         * mini-ppc.c: if a relative branch displacement is too big
12987         but it points to and area reachable with an absolute branch, 
12988         avoid the thunks.
12989
12990 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
12991
12992         * mini.c: optimize small copies in cpblk.
12993
12994 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
12995
12996         * basic-calls.cs basic-float.cs: New regression tests.
12997
12998         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
12999         negative offsets from %fp. Implement localloc. Fix local register 
13000         allocation. Fix the case when the this argument needs to be saved to
13001         the stack. Implement some missing opcodes.
13002
13003 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
13004
13005         * mini.c (mini_method_compile): Reenable global regalloc in methods
13006         with exception handlers.
13007
13008         * linear-scan.c (mono_varlist_sort): Fix warning.
13009
13010         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
13011
13012         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
13013         regalloc costs.
13014
13015         * liveness.c: Make all variables uses in exception clauses volatile, to
13016         prevent them from being allocated to registers. Fixes #42136.
13017
13018 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
13019
13020         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
13021         causes regressions.
13022
13023         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
13024         argument to mono_arch_regalloc_cost.
13025
13026         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
13027         precisely.
13028
13029 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
13030
13031         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
13032         Make the cost of allocating a variable to a register arch dependent.
13033
13034         * basic-calls.cs: Fix compilation of tests.
13035         
13036         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
13037         helper function to cut back on the number of #ifdefs needed.
13038
13039         * mini-ppc.c: Fix compilation.
13040
13041         * basic-calls.cs: New regression tests.
13042
13043         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
13044
13045         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
13046         of l0 since that is callee saved.
13047
13048         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
13049         to virtual calls.
13050
13051         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
13052         of delay instruction.
13053
13054         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
13055
13056         * mini.h (MonoCallInst): Add 'virtual' flag.
13057
13058         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
13059
13060 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
13061
13062         * *.cs: New regression tests.
13063
13064         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
13065         work.
13066
13067         * mini.c (mono_runtime_install_handlers): Fix build.
13068
13069         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
13070         'signal_stack_size' members.
13071
13072         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
13073         alternate signal stack.
13074
13075         * exceptions-x86.c: Add stack overflow handling.
13076
13077         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
13078         functions to arch independent code.
13079
13080         * mini.c (mono_print_tree): Print more detailed info for load_membase
13081         opcodes.
13082         
13083 2004-02-23  Martin Baulig  <martin@ximian.com>
13084
13085         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
13086
13087 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
13088
13089         * mini-x86.c: fixed reg allocation for div/rem.
13090
13091 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
13092
13093         * driver.c (mono_main): Report some configuratio options on --version.
13094
13095 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
13096
13097         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
13098         low in the address space. Correctly flush memory in thunks where we
13099         output native code.
13100
13101 2004-02-20  Martin Baulig  <martin@ximian.com>
13102
13103         * mini.c (mini_get_method): New static method; inflate all generic
13104         methods and methods in open generic instances.
13105         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
13106         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
13107
13108 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
13109
13110         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
13111
13112         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
13113
13114 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
13115
13116         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
13117
13118         * mini-sparc.c (flushi mono_arch_output_basic_block): make
13119         it compile using Sun's compiler.
13120
13121 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
13122
13123         * 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.
13124
13125         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
13126
13127 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
13128
13129         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
13130         code.
13131         * mini-ppc.c: handle calls outside of the allowed range with thunks
13132         allocated using the code manager.
13133         * tramp-ppc.c: use the code manager to hold generated native code.
13134         Fixed the magic trampoline to just patch vtable entries.
13135
13136 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
13137
13138         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
13139         independent file.
13140
13141 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
13142
13143         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
13144         PPC.
13145
13146         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
13147         if we have a working __thread implementation.
13148
13149         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
13150         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
13151
13152 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
13153
13154         * mini-x86.c: Fix compilation under gcc 2.
13155         
13156 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
13157
13158         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
13159         contains a call to the wrapped function.
13160
13161         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
13162         OP_<CALL>_IMM opcodes, and use them under X86.
13163         
13164         * mini.c (mono_jit_find_compiled_method): Fix warning.
13165
13166         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
13167
13168         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
13169
13170         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
13171         functionality to mini.c.
13172
13173         * mini.c (mono_create_jump_trampoline): New function to create a jump
13174         trampoline. Return a compiled method instead of a trampoline if it
13175         exists. Add a cache for jump trampolines.
13176
13177         * mini.c (mono_jit_find_compiled_method): New function to return a
13178         compiled method if it exists.
13179
13180         * mini-x86.c: Call mono_create_jump_trampoline instead of 
13181         mono_arch_create_jit_trampoline.
13182
13183         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
13184         a jump trampoline. Fixes #52092.
13185         
13186 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
13187
13188         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
13189         which is not up-to-date. Add check_corlib_version () instead.
13190
13191         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
13192         have to call it.
13193         
13194         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
13195         since newer valgrind versions do not need it.
13196
13197         * mini.c (mono_jit_compile_method_with_opt): New helper function to
13198         compile a method with a given set of optimizations.
13199
13200         * mini.c: Compile icall wrappers on-demand instead of at startup.
13201
13202         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
13203         wrapper for an icall.
13204
13205 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
13206
13207         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
13208         #54063.
13209
13210         * iltests.il: Add test for non-empty stack before switch instruction.
13211
13212 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
13213
13214         * mini.c: Add support for new stringbuilder marshalling conventions.
13215
13216         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
13217
13218 2004-02-01  Martin Baulig  <martin@ximian.com>
13219
13220         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
13221         in `ginst->mtype_argv'.
13222
13223 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
13224
13225         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
13226         facilitate grepping.
13227
13228 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
13229
13230         * mini.c: fixed buglet in initobj generic implementation for references.
13231
13232 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
13233
13234         * Makefile.am: make the version script conditional.
13235         * jit-icalls.c: handle missing truncl().
13236
13237 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
13238
13239         * exceptions.cs: Add more tests for double->int conversion.
13240
13241         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
13242         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
13243
13244 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
13245
13246         * driver.c: make --verbose --version emit an error
13247         if the loaded corlib doesn't match the runtime version.
13248
13249 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
13250
13251         * mini-ppc.h: export ppc_patch().
13252         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
13253         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
13254         on par or better than on MacOSX.
13255
13256 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
13257
13258         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
13259         mono_lookup_pinvoke_call.
13260
13261         * mini-x86.c: Under windows, the default pinvoke calling convention is
13262         stdcall. Fixes #52834.
13263
13264         * mini.c (optimize_branches): Add an upper bound to the number of
13265         iterations to prevent infinite loops on strange loops. Fixes #53003.
13266
13267 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
13268
13269         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
13270         and ISINST. Fixes #52093.
13271
13272         * objects.cs (test_0_vector_array_cast): New tests.
13273         
13274 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
13275
13276         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
13277         checking in Array.Set ().
13278
13279         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
13280         #52590.
13281
13282         * object.cs (test_0_multi_array_cast): New regression test.
13283
13284 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
13285
13286         * exceptions-ppc.c: fix build on Linux/PPC.
13287
13288 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
13289
13290         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
13291         running under valgrind.
13292         (x86_magic_trampoline): Fix build bustage.
13293
13294         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
13295         negative values as well. This is needed for the encoding of the line number
13296         info, since sometimes the line numbers are not in increasing order.
13297
13298 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
13299
13300         * cpu-pentium.md (localloc): Increase the size of the localloc 
13301         instruction since it is a loop under Win32.
13302
13303         * debug-mini.c (record_line_number): Get rid of unneccesary memory
13304         allocation.
13305
13306 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
13307
13308         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
13309         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
13310         Max Horn (max@quendi.de). Fix file names in comments.
13311
13312 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
13313
13314         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
13315         avoid stack overflow.
13316         (replace_usage): Avoid uninitialized variable warnings.
13317
13318         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
13319         and taking the address of valuetype variables.
13320
13321 2004-01-03  Patrik Torstensson
13322
13323         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
13324         for other purposes than FP later on.
13325
13326 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
13327
13328         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
13329         of tail calls.
13330
13331 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
13332
13333         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
13334
13335 2003-12-30  Patrik Torstensson <p@rxc.se>
13336
13337         * mini-x86.h: Decreased number of availiable fp regs.
13338         Solves corner cases with FP spilling.
13339
13340 2003-12-23  Patrik Torstensson <p@rxc.se>
13341
13342         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
13343         for floating point stack tracking / spilling on x86. 
13344         Fixes bug #49012.
13345         
13346         * basic-float.cs: added float mul overflow test.
13347
13348 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
13349
13350         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
13351
13352 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13353
13354         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
13355         supports for cond branches that overflow the immediate
13356         overflow offset. mcs can compile simple programs.
13357
13358 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13359
13360         * exceptions-ppc.c: exception handling support wip:
13361         finally handlers get run on exception.
13362
13363 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
13364
13365         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
13366         profiling.
13367
13368 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
13369
13370         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
13371         initial support for stack walking and unwinding.
13372
13373 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
13374
13375         * driver.c (mono_main): Make corlib-out-of-sync message more 
13376         descriptive. Also remove verify_corlib call.
13377
13378 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
13379
13380         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
13381         not overlap with other call's arguments, too.
13382
13383 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
13384
13385         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
13386         move to arch-specific code the choice of arch-specific
13387         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
13388         * mini.c: ensure emulation calls will not interleave
13389         with other calls.
13390
13391 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
13392
13393         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
13394         the magic trampoline stack frame is dropped before executing
13395         the new method.
13396
13397 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13398
13399         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
13400         and integer to fp conversions. Added support for overflowing
13401         arguments on the stack. Reserve a couple more registers as temps.
13402         Added support for aot compilation (as output still needs to be
13403         tweaked, though).
13404
13405 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13406
13407         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
13408         Don't overwrite return register in some corner cases.
13409
13410 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
13411
13412         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
13413         static constructors when AOT compiling.
13414
13415         * driver.c (mono_main): Call mono_check_corlib_version.
13416
13417 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
13418
13419         * cpu-g4.md, basic.cs: fixed div target register.
13420
13421 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
13422
13423         * mini-ppc.c, basic.cs: shl_imm fix with test.
13424
13425 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
13426
13427         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
13428         structures by value. Misc fixes.
13429         * objects.cs: more tests.
13430
13431 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
13432
13433         * mini-ppc.c: lconv.ovf.i implemented.
13434
13435 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13436
13437         * mini.c:
13438         (mini_init): don't error out if someone already called g_thread_init.
13439
13440 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
13441
13442         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
13443         to be any type per the spec. Fix abnormal memory usage when
13444         the same object is repeatedly thrown.
13445
13446 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
13447
13448         * mini.c: check for overruns in IL code.
13449
13450 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
13451
13452         * TODO: Add/remove some todo entries.
13453
13454 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
13455
13456         * driver.c (mono_main): Call mono_verify_corlib.
13457
13458 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
13459
13460         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
13461         This has been moved to mini.c
13462         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
13463         type being casted is marshalbyref it could be a proxy, so instead of
13464         emitting the type check code, emit a call to a runtime method that will
13465         perform the check by calling CanCastTo if needed.
13466
13467 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
13468
13469         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
13470         methods with large stack frames under Win32.
13471
13472 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
13473
13474         * Makefile.am: Distribute regression tests.
13475
13476         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
13477         at the end instead of inserting each variable into the sorted list.
13478
13479         * linear-scan.c (mono_varlist_sort): New helper function.
13480         
13481 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
13482
13483         * mini.c: ensure arguments and locals are within bounds.
13484
13485 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13486
13487         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
13488         related fixes.
13489
13490 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
13491
13492         * mini.c (mono_cprop_copy_values): Fix crash.
13493
13494         * aot.c: Set verbosity back to 0.
13495         
13496 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
13497
13498         * regalloc.c: complete memory leak fix by Laurent Morichetti
13499         (l_m@pacbell.net).
13500
13501 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
13502
13503         * driver.c (main_thread_handler): Revert the previous patch.
13504
13505         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
13506         under valgrind.
13507
13508         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
13509         memory from the memory pool.
13510
13511         * driver.c (main_thread_handler): Turn on all optimizations when
13512         --aot is used.
13513
13514         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
13515         an array for better performance.
13516
13517         * regalloc.c (mono_regstate_assign): Fix memory leak.
13518
13519         * debug-mini.c (mono_debug_serialize_debug_info): New function to
13520         serialize the debug info.
13521
13522         * debug-mini.c (mono_debug_add_aot_method): New function to load the
13523         debug info from the serialized representation.
13524
13525         * aot.c: Save debug info into the generated file and load it when 
13526         loading a method.
13527
13528         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
13529
13530 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
13531
13532         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
13533         More FP-related fixes.
13534
13535 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
13536
13537         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
13538         and register allocation buglet. Hello world now runs.
13539
13540 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
13541
13542         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
13543         * tramp-ppc.c: fixed class init trampoline.
13544         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
13545
13546 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
13547
13548         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
13549         mini.c: more ppc changes/fixes.
13550
13551 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
13552
13553         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
13554         Also optimize the case when the arguments are the same in the caller 
13555         and in the callee.
13556
13557         * iltests.il: Add tests for tail calls with valuetype arguments.
13558
13559 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
13560
13561         * mini-ppc.c: fixes for struct return type.
13562
13563 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
13564
13565         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
13566         mono_spillvar_offset() to arch-specific code.
13567
13568 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
13569
13570         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
13571
13572 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
13573
13574         * exceptions-x86.c: Fix stack space leaks.
13575         
13576         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
13577         registers from the lmf if the method has save_lmf set.
13578
13579 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
13580
13581         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
13582         of icall wrappers into InvokeInDomain, since these are now per-domain.
13583
13584 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
13585
13586         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
13587         make some opcode emulation and intrinsic ops enabled/disabled 
13588         according to the architecture. More fixes.
13589
13590 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
13591
13592         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
13593
13594 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
13595
13596         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
13597         arch-specific handling for 'this' and struct return type to
13598         arch-specific code.
13599
13600 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13601
13602         * aot.c: prevent divide by zero error when reporting (it happened with
13603         Accessibility.dll).
13604
13605 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
13606
13607         * mini.h (inst_switch): Remove unused macro.
13608
13609 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13610
13611         * aot.c:
13612         (load_aot_module): free 'info->methods' and 'info' properly. No more
13613         "free(): invalid pointer blah" messages when you have an old aot
13614         compiled assembly.
13615
13616 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
13617
13618         * jit-icalls.c, mini.c: Added support for context static fields.
13619
13620 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
13621
13622         * mini.c (mono_method_blittable): Methods which set LastError are not 
13623         blittable either. Fixes #51108.
13624         
13625 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
13626
13627         * mini.c: flush icache.
13628         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
13629
13630 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
13631
13632         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
13633
13634 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
13635
13636         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
13637         safe on IA32.
13638
13639         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
13640         vararg calls.
13641
13642         * inssel.brg (CEE_MKREFANY): Fix AOT case.
13643
13644 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
13645
13646         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
13647         instruction when the result is discarded.
13648
13649         * iltests.il (test_0_div_regalloc): New regression test.
13650
13651         * arrays.cs: Fix compilation error.
13652
13653 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
13654
13655         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
13656         float rules to inssel-x86.brg: sane architectures with FP registers
13657         don't need to implement these rules.
13658
13659 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
13660
13661         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
13662
13663 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
13664
13665         * mini.h, inssel-long32.brg: fixed endianess issues in int64
13666         implementation of 32 bit systems.
13667
13668 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
13669
13670         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
13671         (Jeroen Zwartepoorte).
13672
13673 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
13674
13675         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
13676         the caller and the callee matches.
13677         
13678         * mini.c (mono_method_to_ir): Add comment.
13679
13680         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
13681         signbit is missing on some platforms.
13682
13683 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
13684
13685         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
13686
13687         * mini.c (setup_jit_tls_data): Call the new function.
13688         
13689         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
13690
13691         * mini-x86.c: Add experimental support for fast access to the lmf
13692         structure under NPTL/Linux 2.6.x.
13693
13694 2003-11-06  Martin Baulig  <martin@ximian.com>
13695
13696         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
13697         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
13698         the debugger.
13699
13700 2003-11-02  Martin Baulig  <martin@ximian.com>
13701
13702         * mini.c (inflate_generic_field): New static method.
13703         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
13704         generic instance and the field is declared in a generic type, call
13705         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
13706
13707 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
13708
13709         * mini.h mini.c (mono_method_same_domain): New function to return
13710         whenever the caller and the callee are in the same domain.
13711
13712         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
13713
13714 2003-10-30  Martin Baulig  <martin@ximian.com>
13715
13716         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
13717         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
13718         method parameters.
13719         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
13720         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
13721
13722 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
13723
13724         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
13725         propagation.
13726
13727         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
13728         object here, so it is in the correct appdomain etc.
13729
13730 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
13731
13732         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
13733         already done.
13734         (mono_method_to_ir): Avoid freeing the type created returned from
13735         mono_type_create_from_typespec, since it is put into an internal cache
13736         by the function. Fixes pointer.exe.
13737
13738         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
13739         trampolines for icalls and pinvokes as well. Fixes #33569.
13740
13741 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
13742
13743         * mini.c: Update after appdomain changes.
13744
13745         * mini.c (mono_jit_compile_method_inner): Allways compile native
13746         method wrappers in the root domain, since there can only be one
13747         instance of them, whose address is stored in method->info.
13748
13749 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
13750
13751         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
13752         environment variable. Instead detect automatically whenever running
13753         under valgrind using the magic macro RUNNING_ON_VALGRIND from
13754         valgrind.h.
13755
13756 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
13757
13758         * trace.c, trace.h: New files that implement the new trace option
13759         parsing. 
13760
13761         * driver.c: Document new --trace options.
13762
13763         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
13764         mini-x86.c: Apply:
13765
13766         -       if (mono_jit_trace_calls)
13767         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
13768
13769         * mini.h: prototypes.
13770         
13771 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
13772
13773         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
13774
13775         * mini.c inssel.brg: Implement typedefbyref opcodes.
13776
13777         * mini.c (mono_jit_compile_method): Remove unused local variable.
13778
13779         * mini.c (mono_jit_compile_method_inner): Ditto.
13780         
13781 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
13782
13783         * tramp-x86.c (x86_class_init_trampoline): Fix build.
13784         
13785         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
13786
13787 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
13788
13789         * mini.c (mono_no_aot): Remove unused global variable.
13790
13791         * mini.c: Thread safety fixes.
13792
13793 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
13794
13795         * mini.c (mono_create_class_init_trampoline): Add a lock around
13796         class_init_hash_addr.
13797
13798         * arrays.cs (test_0_newarr_emulation): Add new regression test for
13799         #30073.
13800
13801         * mini.c: Decompose the NEWARR instruction before decomposing its
13802         arguments. Fixes #30073.
13803
13804 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
13805
13806         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
13807         convention.
13808
13809 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
13810
13811         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
13812
13813         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
13814
13815         * driver.c: Add support for compiling icall wrappers to --compile.
13816
13817 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
13818
13819         * inssel.brg: The empty value in class->interface_offsets is -1, not
13820         0. Fixes #49287.
13821
13822 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
13823
13824         * objects.cs: New test for 'is' operator on an array of interfaces.
13825
13826 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13827
13828         * tramp-ppc.c: update trampoline code to support jumps
13829         and class initialization.
13830
13831 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
13832
13833         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
13834
13835         * inssel.brg (OP_UNBOXCAST): Fix #46027.
13836
13837         * inssel.brg (OP_UNBOX): Remove unused rule.
13838
13839         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
13840         region instead of one for each method. Fixes #47813.
13841
13842 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
13843
13844         * exceptions.cs (test_0_nested_finally): New regression test for
13845         nested exception handlers.
13846
13847         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
13848
13849         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
13850
13851         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
13852         inlining.
13853
13854         * mini.c (mono_method_check_inlining): Make the inlining limit 
13855         configurable by an environment variable.
13856         
13857         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
13858
13859         * mini.h: Bump AOT file version.
13860
13861         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
13862         token, store the image along with the token, since the token might not 
13863         refer to the same image as the method containing the relocation, 
13864         because of inlining.
13865
13866 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
13867
13868         * mini.c (mono_precompile_assemblies): New function to compile
13869         all methods in all loaded assemblies.
13870
13871         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
13872
13873         * regalloc.h regalloc.c (MonoRegState): Change the type of 
13874         iassign and fassign to int*, since they can contain large negative
13875         values if the register is spilled. Also added some comments. Fixes
13876         #45817.
13877
13878         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
13879         under Win32. Fixes #42964.
13880
13881 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
13882
13883         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
13884
13885         * aot.c: Added support for AOT compiling methods which contain calls
13886         to wrappers. Currently, only remoting-invoke-with-check wrappers are
13887         handled.
13888         
13889         * driver.c (compile_all_methods): Run the compilation in a thread
13890         managed by mono. Fixes #44023.
13891
13892         * mini.c (mono_codegen): Print full method name in verbose output.
13893
13894         * mini-x86.c (mono_arch_patch_code): Fix warning.
13895         
13896         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
13897         jumps, since the method we are jumping to might be domain-specific.
13898
13899         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
13900
13901 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13902
13903         * inssel.brg: string chars are unsigned.
13904
13905 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
13906
13907         * TODO: New todo item.
13908
13909         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
13910         which calls mono_runtime_class_init and patches the call site to
13911         avoid further calls.
13912         (mono_arch_create_class_init_trampoline): New arch specific function 
13913         to create a class init trampoline.
13914         (create_trampoline_code): Generalized so it can create
13915         class init trampolines as well.
13916
13917         * mini.c (helper_sig_class_init_trampoline): New helper variable.
13918         (mono_create_class_init_trampoline): New function to create and cache
13919         class init trampolines.
13920         (mono_find_class_init_trampoline_by_addr): New function to lookup the
13921         vtable given the address of a class init trampoline. Used by the
13922         patching process.
13923         (mono_codegen): Generate a call to a trampoline instead of
13924         mono_runtime_class_init in LDSFLD[A].
13925         (mono_codegen): Add relocations for the new trampoline.
13926         
13927         * mini.h mini-x86.c aot.c: Added a new relocation type: 
13928         MONO_PATCH_INFO_CLASS_INIT.
13929
13930         * mini.h: Bump AOT version number.
13931
13932         * aot.c: Create a copy of the loaded code instead of using the original
13933         so methods which call each other will be close in memory, improving
13934         cache behaviour.
13935         
13936         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
13937         patch since it breaks the regression tests.
13938         
13939         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
13940         for the register saving instruction sequence since the 
13941         frame_state_for function in glibc 2.3.2 don't seem to detect it.
13942
13943 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
13944
13945         * TODO: Fix todo item && remove another.
13946
13947 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
13948
13949         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
13950         previous checkin.
13951
13952         * aot.c: Moved the check for MONO_LASTAOT into the initialization
13953         function of the module.
13954
13955         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
13956         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
13957         --no-aot command line option.
13958
13959 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
13960
13961         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
13962         by Bernie Solomon (bernard@ugsolutions.com).
13963
13964         * inssel.brg: Refactor the interface offset table related code into
13965         its separate functions and add support for the AOT case.
13966
13967 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
13968
13969         * aot.c (mono_aot_get_method_inner): Fix memory leak.
13970         
13971         * aot.c: Added mono_aot_verbose variable and made all debugging
13972         output depend on the value of this variable.
13973
13974         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
13975         method_label and info_label.
13976
13977         * mini.h mini-x86.c aot.c: Added a new relocation type 
13978         MONO_PATCH_INFO_IID for klass->interface_id.
13979
13980         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
13981         the MonoJitInfo structure.
13982
13983         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
13984         a non-root appdomain in shared mode.
13985
13986 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13987
13988         * aot.c: make aot loader less verbose. Remove free of unused variable.
13989
13990 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
13991
13992         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
13993
13994         * .cvsignore: Added *.dll.
13995
13996         * mini.c (mono_print_tree_nl): New function callable while debugging.
13997
13998         * mini.c (mono_print_code): Export this.
13999
14000         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
14001         patched code.
14002
14003 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
14004
14005         * mini.h (MonoCompile): Added 'jit_info' field.
14006
14007         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
14008         the cfg structure, since it is needed by the AOT compiler.
14009
14010         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14011
14012         * aot.c: A major rewrite. Changes include:
14013         - save exception tables for methods which have them.
14014         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
14015         to g_module_symbol.
14016         - reworked the file format so it is now much smaller and needs
14017         fewer relocation entries.
14018         
14019 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14020
14021         * aot.c (load_aot_module): Fix build bustage on platforms without
14022         Boehm GC.
14023
14024 2003-09-04  Martin Baulig  <martin@ximian.com>
14025
14026         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
14027
14028 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14029
14030         * TODO: Some new optimization ideas.
14031
14032         * aot.c: Move AOT module loading logic here from mono_assembly_open.
14033
14034         * aot.c: Save the optimization flags used to compile the code into
14035         the AOT module.
14036
14037         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
14038         support emitting domain specific code.
14039         
14040         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
14041         no longer domain neutral. It can be made domain neutral by compiling 
14042         with --optimize=shared.
14043
14044         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
14045         between appdomains.
14046
14047         * driver.c mini.h mini.c: New --no-aot debugging option which disables
14048         loading of AOT code.
14049
14050         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
14051         
14052         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
14053         if there is no domain neutrality information.
14054
14055 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
14056
14057         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
14058         format version into the generated library.
14059
14060         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
14061         callee method into the caller since one of them could be shared.
14062
14063         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
14064         system exceptions from AOT code now works.
14065
14066         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
14067         method if it is domain neutral and the callee is not.
14068
14069         * graph.c (cfg_emit_one_loop_level): Fix warning.
14070
14071 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
14072
14073         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
14074         last checkin.
14075
14076 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
14077
14078         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
14079         is needed  by code which is executed before mono_runtime_init ().
14080         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
14081         
14082         * mini.c (mono_thread_abort): Fix warning.
14083         (mono_jit_compile_method): Call static constructor in the AOT case too.
14084
14085         * aot.c (mono_compile_assembly): Fix warning.
14086
14087 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14088
14089         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
14090
14091 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
14092
14093         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
14094
14095         * cpu-pentium.md: Fix the length of call opcodes so they include the
14096         ESP restoring instruction. Fixes #47968.
14097
14098 2003-08-28  Martin Baulig  <martin@ximian.com>
14099
14100         * mini-x86.c (mono_arch_call_opcode): Added support for
14101         MONO_TYPE_GENERICINST.
14102
14103         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
14104
14105 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
14106
14107         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
14108         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
14109
14110         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
14111         metadata_section.
14112
14113 2003-08-26  Martin Baulig  <martin@ximian.com>
14114
14115         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
14116         when reporting an error, set this to the actual error location.
14117         (mono_method_to_ir): Report the correct error location if
14118         get_basic_blocks() returned an error.
14119
14120 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
14121
14122         * mini.c (mono_type_blittable): OBJECT is not blittable.
14123         (mono_method_blittable): Methods which have marshalling descriptors
14124         are not blittable either. Fixes #47842.
14125
14126 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
14127
14128         * driver.c mini.c: Use an environment variable instead of a global 
14129         variable. Also fix the build.
14130
14131         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
14132         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
14133         reporting this. 
14134
14135         * driver.c mini.c: Added --with-valgrind option to turn off some
14136         code which prevents mono from running under valgrind.
14137
14138         * mini.c (mono_emit_call_args): Fixed warning.
14139
14140         * mini.c (mono_emulate_opcode): Fixed warning.
14141
14142 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14143
14144         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
14145         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
14146         regalloc.c, regalloc.h: specify available registers in arch-specific
14147         code and support floats in the regallocator (patch by Laurent Morichetti 
14148         <l_m@pacbell.net>)
14149
14150 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14151
14152         * mini.c: mono_thread_current() can be called only after
14153         mono_runtime_init(): rearrange code to not call it early on.
14154
14155 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14156
14157         * mini.c: allocate jump tables in the code mempools.
14158
14159 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14160
14161         * mini.c, mini.h: make sure per-thread data allocated by the jit is
14162         freed.
14163
14164 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
14165
14166         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
14167         12 to 16.  This fixes bug #47453.
14168
14169
14170 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14171
14172         * mini-ppc.c: fixed indexed load and unsigned compares.
14173
14174 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
14175
14176         * mini.c: reenabled installation of handler for
14177           thread abort signal.
14178
14179 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14180
14181         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
14182         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
14183         until it's fixed and actually useful.
14184
14185 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14186
14187         * inssel-long32.brg: couple more opcodes implemented.
14188
14189 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
14190         
14191         * mini-sparc.c: Even more opcodes implemeted.
14192
14193 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
14194
14195         * mini-sparc.c: More opcodes implemented.
14196
14197 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
14198
14199         * mini-sparc.c: More opcodes implemented.
14200
14201 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
14202
14203         * inssel-sparc.brg: Add some needed rules.  Direct
14204         copy from PPC.
14205         * Makefile.am: Use inssel-sparc.brg
14206         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
14207         an assert happy for now.
14208
14209 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
14210
14211         * mini-sparc.c: Fixed compile errors.
14212         * exceptions-sparc.c: Same.  We now produce a mono binary 
14213         on sparc-linux.  Yea.
14214
14215 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
14216
14217         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
14218         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
14219         They compile, but do not work.
14220
14221 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14222
14223         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
14224         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
14225         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
14226         (ct@gentoo.org).
14227
14228 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14229
14230         * mini.c: more opcodes implemented and better support for generics.
14231
14232 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
14233
14234         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
14235         * mini.c, mini.h: first cut at generics support: some new instructions 
14236         added and changed the behaviour of some of the existing ones.
14237
14238 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
14239
14240         * mini.c: Removed definition of metadata_shared mutex here.
14241
14242 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
14243
14244         * mini-x86.c: make vararg calls work for instance methods.
14245
14246 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
14247
14248         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
14249         returns the arguments in a separte list, now.
14250
14251 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14252
14253         * aot.c, mini.c: updates for array type representation changes.
14254
14255 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
14256
14257         * mini.c: register function to perform jit shutdown.
14258
14259 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14260
14261         * mini.c: use a faster allocator if possible.
14262
14263 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14264
14265         * aot.c: some cleanups and portability changes.
14266
14267 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14268
14269         * mini.c: use faster allocation for CEE_BOX if possible.
14270
14271 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
14272
14273         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
14274         Moved inlined mempcy code to its own function so that is can be
14275         reused. Added an inline memset function as well (optimized initobj).
14276         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
14277
14278 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14279
14280         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
14281
14282 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14283
14284         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
14285         arch code can setup the cpu for CLR execution, if needed.
14286         We use it on x86 to set the precision of FP operations.
14287
14288 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14289
14290         * mini.c: disable some optimizations if we can guess they'll cost too
14291         much for a given method.
14292
14293 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14294
14295         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
14296         
14297 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14298         * mini.h mini.c mini-x86.c: Added instruction level coverage 
14299         info collection support.
14300
14301 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14302
14303         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
14304         is now implemented in the profiling API. Get rid of a couple of
14305         unnecessary global variables.
14306
14307 2003-06-15  Nick Drochak <ndrochak@gol.com>
14308
14309         * basic-long.cs: tests for negative values for bigmul, and unsigned.
14310         * cpu-g4.md: add op_bigmul and op_bigmul_un
14311         * cpu_pentium.md: add op_bigmul_un
14312         * inssel-long32.brg: add rule for unsigned bigmul
14313         * mini-ops.h: define OP_BIGMUL_UN
14314         * mini-x86.c: THE BUG: handle (un)signed properly
14315         * mini.c: choose unsigned opcode if needed.
14316         This set of patches fixes bug #44291
14317
14318 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
14319
14320         * mini.c (optimize_branches): improved to handle all kinds of
14321         conditional branches.
14322
14323 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14324
14325         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
14326         don't raise exceptions.
14327
14328 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14329
14330         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
14331         to arch-specific files.
14332
14333 2003-06-09  Martin Baulig  <martin@ximian.com>
14334
14335         * Makefile.am (libs): Added $(LIBGC_LIBS).
14336
14337 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
14338
14339         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
14340         and OP_ATAN (fixes bug#44293).
14341
14342 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
14343
14344         * Makefile.am, mini-x86.c: rename cpu description array to
14345         pentium_desc, since some compilers define the 'pentium' preprocessor
14346         symbol.
14347
14348 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
14349
14350         * mini.c (mini_select_instructions): add explicit branch if the
14351         following block is not the false target of a conditional branch -
14352         we need this with any optimization that reorder or remove bblocks
14353
14354         * mini.c (optimize_branches): bug fixes
14355
14356 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
14357
14358         * mini.c (mono_method_to_ir): inline static readonly fields
14359
14360         * ssa.c (fold_tree): start cfold support for long (very simple
14361         cases only)
14362
14363         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
14364
14365 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14366
14367         * inssel.brg: fixed memcpy (bug #44219).
14368
14369 2003-06-05  Dick Porter  <dick@ximian.com>
14370
14371         * driver.c: Set the glib log levels to not abort if g_message
14372         recurses.
14373
14374         g_set_prgname() has to happen before mini_init() so that the
14375         process handle gets the info.
14376         
14377 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14378
14379         * driver.c: add intrins to the default optimizations to get wider
14380         exposure.
14381
14382 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14383
14384         * mini.h: some large basic blocks will overflow a 16-bit
14385         integers for symbolic registers.
14386
14387 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
14388
14389         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
14390         (mono_arch_output_basic_block): fix bug 43499 
14391
14392 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14393
14394         * mini.c: kill duplicated definition of mono_debug_format.
14395
14396 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
14397
14398         * mini-x86.c, arrays.cs: fixed register allocation bug.
14399
14400 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
14401
14402         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
14403
14404         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
14405
14406 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14407
14408         * mini.c:
14409         (print_method_from_ip): also print source location information if
14410         available.
14411
14412 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
14413
14414         * mini.c (mono_find_block_region): bug fix in region code
14415         (mini_method_compile): enable removing unreachable code again, but
14416         only in methods without exception clauses.
14417
14418 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
14419
14420         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
14421         Implemented arglist opcode and handling of TypedReference type.
14422         Fixed x86 call convention when a structure is returned.
14423         Minimal support for calling static vararg methods.
14424
14425 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
14426
14427         * mini.c (mini_method_compile):  always remove unreachable code,
14428         because the code in them may be inconsistent  (access to dead
14429         variables for example).
14430
14431 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14432
14433         * driver.c, debug-mini.c: warning fixes.
14434
14435 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
14436
14437         * Makefile.am, jit.h, mini.h: install header for embedding mono.
14438
14439 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
14440
14441         * mini.c: thread-static fields are registered in mono_class_vtable(),
14442         so ensure the function is called before checking for them.
14443
14444 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
14445
14446         * mini.c (optimize_branches): fix for bug 43586
14447
14448         * jit-icalls.c (mono_llmult_ovf): added an additional check for
14449         overflow (fixes Bug #43639)
14450
14451 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14452
14453         * mini.c, objects.cs: allow the use of stobj for primitive types.
14454
14455 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14456
14457         * mini.c: be less strict about argument checking until we support
14458         running the verifier.
14459
14460 2003-05-27  Nick Drochak <ndrochak@gol.com>
14461
14462         * basic-long.cs: tests for (ulong)int * (ulong)int also
14463         * mini.c: use the same trick for (ulong)int * (ulong)int
14464
14465 2003-05-27  Nick Drochak <ndrochak@gol.com>
14466
14467         * basic-long.cs: add regression test for (long)int * (long)int
14468         * cpu-pentium.md: add op_bigmul specification
14469         * inssel-long32.brg: add OP_BIGMUL rule
14470         * mini-ops.h: add OP_BIGMUL
14471         * mini-x86.c: register allocator: handle case where src1 needs to be
14472         in EAX.
14473         * mini.c: substitute special BIGMUL opcode in the tree for 
14474         (long)int * (long)int
14475
14476 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
14477
14478         * jit-icalls.c: call the type ctor on field access if needed.
14479
14480 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14481
14482         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
14483         to a method (including results of ldelema, bug#43207).
14484
14485 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
14486
14487         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
14488         colors to show exception handler blocks.
14489
14490         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
14491         (fix for pinvoke7.cs).
14492
14493 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14494
14495         * mini.h, mini.c: ensure correct initialization order for types that
14496         require it. Prepare for lazy compilation of jit icall wrappers.
14497         Provide a name for opcode emulation to reduce unneeded mallocing.
14498
14499 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
14500
14501         * mini-x86.c: better register restoring code and profiling
14502         support for tail calls.
14503
14504 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14505
14506         * mini.h, driver.c: prepare for leaf methods optimization.
14507
14508 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14509
14510         * mini.c: get targets of branches before converting a method.
14511
14512 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
14513
14514         * mini.c (optimize_branches): added some experimental code (disbaled) 
14515
14516 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
14517
14518         * mini.c (optimize_branches): fix branch to branch optimization 
14519
14520         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
14521
14522         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
14523
14524         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
14525
14526         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
14527         if needed.
14528
14529 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
14530
14531         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
14532         enable use of interface variables again.
14533
14534         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
14535         I1 to registers because there is no simply way to sign extend 8bit
14536         quantities in caller saved registers on x86.
14537
14538         * inssel-float.brg: set costs of some rules to 2 so
14539         that monobure always select the arch. specific ones if supplied,
14540         regardless of the order we pass the files to monoburg.
14541
14542 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
14543
14544         * mini.c, mini-x86.c: since the magic trampoline for jumps
14545         can't patch the code directly, we do it as soon as the
14546         method gets compiled.
14547
14548 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14549
14550         * mini-x86.c, mini.h: introduce a new patching method
14551         to support CEE_JMP and tail calls.
14552         * mini.c: obey tail.call. Don't precompile methods target
14553         of CEE_JMP.
14554         * tramp-x86.c: new trampoline code to handle methods
14555         reached through a jump.
14556
14557 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
14558
14559         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
14560         bit values to registers
14561
14562 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
14563
14564         * mini.c (mono_compile_get_interface_var): share interface
14565         variables if possible.
14566
14567 2003-05-16  Martin Baulig  <martin@ximian.com>
14568
14569         * debug-mini.c (mono_init_debugger): New function to initialize
14570         the debugger.  This is not in the debugger since it needs to
14571         access some of mini's internals.
14572
14573 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
14574
14575         * mini.c (mono_method_to_ir): inlining fixes/cleanups
14576
14577 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
14578
14579         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
14580         for value type handling.
14581
14582 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
14583
14584         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
14585         (mono_method_check_inlining): enable inlining of all kinds of wrappers
14586
14587 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
14588
14589         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
14590           the constructor through a proxy.
14591
14592 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14593
14594         * jit-icalls.c, inssel.brg: fixes to array element address
14595         calculations.
14596
14597 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
14598
14599         * mini-x86.c (is_regsize_var): allocate pointer to registers
14600
14601 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14602
14603         * driver.c: fixed typo, added intrins to the set of optimizations
14604         tested with regressions.
14605
14606 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14607
14608         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
14609         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
14610         test case.
14611
14612 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
14613
14614         * inssel.brg: remove some common pop instructions without side effects
14615
14616 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14617
14618         * inssel-x86.brg: fixed thinko in int to double conversions.
14619
14620 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
14621
14622         * mini.c, jit-icalls.c: added runtime thread-static variable support.
14623
14624 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14625
14626         * inssel-long32.brg: two more missing instructions.
14627
14628 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
14629
14630         * mini.c (mono_emit_call_args): set the cil_code for all arguments
14631         if not already set.
14632
14633 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
14634
14635         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
14636         correctly.
14637
14638         * basic-float.cs: Added tests for negative zero.
14639
14640 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14641
14642         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
14643         a couple of missing operations for long casts, with test cases.
14644
14645 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14646
14647         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
14648
14649 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
14650
14651         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
14652         code size estimation.
14653
14654 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
14655
14656         * mini.c (mono_jit_create_remoting_trampoline): make it work with
14657         abstract methods (fix bug 42542)
14658
14659         * aot.c: add ability to handle array types
14660         
14661 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
14662
14663         * mini.c: Call the _specific versions of the object allocation
14664         functions if possible.
14665
14666 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
14667
14668         * driver.c: call setlocale ().
14669
14670 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14671
14672         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
14673         windows build.
14674
14675 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
14676
14677         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
14678
14679         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
14680         wrappers (fix bug 42122)
14681
14682 2003-05-04  Martin Baulig  <martin@ximian.com>
14683
14684         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
14685
14686         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
14687         s/mini_set_defaults/mono_set_defaults/g.
14688
14689 2003-05-04  Martin Baulig  <martin@ximian.com>
14690
14691         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
14692
14693 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14694
14695         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
14696         (reported by Don Roberts).
14697
14698 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
14699
14700         * mini.c: temporarily work around two bugs for this release.
14701
14702 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14703
14704         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
14705         that contains -export-dynamic and it makes using the ld script
14706         useless.
14707         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
14708
14709 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14710
14711         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
14712         specific cpu.
14713
14714 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14715
14716         * mini.c: make sure leave calls all the needed finally blocks,
14717         even when the target jumps out of multiple exception clauses.
14718
14719 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14720
14721         * ldscript, Makefile.am: add linker script to reduce the number of
14722         exported symbols (should also fix the issues with libwine defining
14723         some of the same symbols in io-layer).
14724
14725 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
14726
14727         * driver.c (mini_main): Avoid assertion when no file name is given on 
14728         the command line.
14729
14730 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
14731
14732         * driver.c: added --version/-V command line option.
14733         Added the inline optimization in the regression tests.
14734
14735 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14736
14737         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
14738         to the type in the method signature (fixes bug#42134).
14739
14740 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
14741
14742         * mini.c: when inlining, check this is not null only when needed (bug #42135).
14743
14744 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
14745
14746         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
14747
14748 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14749
14750         * driver.c: fixed bug #42100.
14751
14752 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
14753
14754         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
14755
14756 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
14757
14758         * mini.c: moved most of the code required to do inlining to its own
14759         function so it can be reused. Inline also ctors if appropriate.
14760
14761 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
14762
14763         * Makefile.am: Link with -export-dynamic so shared libs loaded by
14764         the runtime can call mono API functions.
14765
14766 2003-04-27  Martin Baulig  <martin@ximian.com>
14767
14768         * debug-mini.c (mono_debug_init_method): Added
14769         `guint32 breakpoint_id' argument; if the method has a breakpoint,
14770         send a notification to the debugger.
14771
14772         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
14773         running in the Mono Debugger, just pass the breakpoint number to
14774         mono_debug_init_method().
14775
14776         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
14777
14778 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
14779
14780         * mini.c: allow some more unsafe compares.
14781
14782 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14783
14784         * mini-x86.c, Makefile.am: make distcheck works (partially from
14785         a patch by Richard Lee <r.h.lee@attbi.com>).
14786         * regset.c, regset.h: removed, they are unused.
14787
14788 2003-04-25  Dick Porter  <dick@ximian.com>
14789
14790         * driver.c: Usage reports the name as 'mono' not 'mini'
14791         * exceptions-x86.c: Build and run on freebsd
14792
14793 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
14794
14795         * Makefile.am: install the program with the 'mono' name and
14796         the library as libmono instead of mini and libmini.
14797
14798 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14799
14800         * driver.c: provide the APIs for the embedding interface of the old jit.
14801
14802 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
14803
14804         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
14805
14806 2003-04-23  Martin Baulig  <martin@ximian.com>
14807
14808         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
14809
14810         * driver.c: Added `--debug' command line argument to enable
14811         debugging support.
14812
14813 2003-04-23  Martin Baulig  <martin@ximian.com>
14814
14815         * debug.[ch]: Removed.  The code is now in
14816         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
14817
14818         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
14819         last six months.
14820
14821 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
14822
14823         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
14824
14825 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14826
14827         * mini.c:
14828         (mini_cleanup): moved mono_runtime_cleanup call after the call to
14829         mono_domain_finalize.
14830         (mini_method_compile): use mono_method_profile* if the the option is
14831         enabled.
14832
14833 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
14834
14835         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
14836         methods with their wrapper.
14837
14838         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
14839         methods with their wrapper.
14840
14841         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
14842         their wrapper.
14843
14844         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
14845         wrapper.
14846
14847         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
14848         methods.
14849
14850 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
14851
14852         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
14853
14854 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
14855
14856         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
14857         of the mempool. This is slightly faster and uses less memory
14858
14859 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14860
14861         * mini.c: avoid O(n) allocation for variables.
14862
14863 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14864
14865         * mini.c: handle items on the stack after inlining methods.
14866
14867 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14868
14869         * mini.c: make the method->opcode optimization dependent
14870         on MONO_OPT_INSTRINS and do it lazily.
14871
14872 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14873
14874         * driver.c: print overall results at the end of regression run.
14875
14876 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
14877
14878         * inssel.brg: don't overwrite symbolic registers.
14879
14880 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
14881
14882         * inssel-x86.brg: fix conversion from long to float.
14883
14884 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
14885
14886         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
14887
14888 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
14889
14890         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
14891
14892         * driver.c: Added --print-vtable option as in the old JIT.
14893
14894 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14895
14896         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
14897
14898 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
14899
14900         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
14901
14902 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
14903
14904         * mini.c regalloc.c regalloc.h: Fix memory leak.
14905
14906 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
14907
14908         * aot.c (mono_aot_get_method): register all used strings
14909
14910 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14911
14912         * mini.c: always intern strings references with ldstr at compile time.
14913
14914 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14915
14916         * Makefile.am: add BUILT_SOURCES.
14917
14918 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
14919
14920         * driver.c: give a better error message when the assembly to execute
14921         doesn't have an entry point.
14922
14923 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
14924
14925         * Makefile.am: added hack for automake
14926
14927         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
14928         correct sematics.
14929
14930         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
14931
14932 22003-04-07  Martin Baulig  <martin@ximian.com>
14933
14934         * Makefile.am: Added Makefile.am.
14935
14936         * debugger-main.c: Removed, this is now in the debugger where it
14937         belongs.
14938
14939         * mini.pc.in: Call this package `mini' for the moment.
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953