2008-08-08 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
2
3         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
4
5         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
6         mono_marshal_get_native_wrapper () signature changes.
7
8 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
9
10         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
11         conversion bug under arm.
12
13 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
14
15         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
16
17         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
18         with overflow checking.
19
20 2008-08-05  Marek Habersack  <mhabersack@novell.com>
21
22         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
23         to the genmdesc.pl file
24
25 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
26
27         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
28         arg_array in the soft-float versions of the LOAD/STORE macros.
29
30         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
31         implementation.
32
33         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
34
35 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
36
37         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
38         a float HFA. Fixes #413621.
39
40 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
41
42         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
43         frame_size to args_size. Fixes build.
44
45 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
46
47         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
48         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
49
50         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
51         the stack are not unaligned. Fixes #413247.
52         
53 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
54
55         * mini.c: update jitted methods performance counters.
56
57 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
58
59         * mini-exceptions.c: increase the exceptions thrown performance
60         counter in mono_handle_exception ().
61
62 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
63
64         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
65         can work with netmodules.
66
67 2008-07-28  Geoff Norton  <gnorton@novell.com>
68
69         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
70         regression tests.
71
72 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
73
74         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
75         correct place.
76
77 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
78
79         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
80           The float param registers and other param registers must be the 
81           same index on Windows x64.
82
83         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
84           ArgValuetypeAddrInIReg argument case.  Setting the argument
85           op to OP_VTARG_ADDR (OP_REGOFFSET)).
86
87         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
88           variable computed above as the copy length for arguments of storage
89           type ArgValuetypeAddrInIReg.
90
91         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
92           ArgValuetypeAddrInIReg argument case.  This case will rely on
93           mono_arch_emit_outarg_vt to emit the correct code later in the process.
94
95         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
96           a 32 byte stack allocation for all calls.  We will omit the adjustment for
97           jump and tail call instructoins as they do not follow the typical call behavior.
98
99         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
100           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
101           local variable and pass the local variable by reference to the called method.
102
103         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
104           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
105           of a struct is passed in a register it must be saved with the other
106           volatile argument on the stack.
107
108         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
109           frame pointer the stack adjustment value must be saved to the unwind 
110           info structure.
111
112         Contributed under MIT/X11 license.
113
114 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
115
116         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
117         which got lost in the merge.
118
119 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
120
121         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
122         build.
123
124         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
125         
126         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
127         icalls, since they won't be patched.
128
129         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
130         different code sequence when running under valgrind to prevent some valgrind
131         errors.
132
133         * iltests.il.in: Add new regression test.
134
135         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
136         end with a throw.
137
138         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
139         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
140
141         * iltests.il.in: Add new test.
142
143         * aot-compiler.c: Fix some warnings.
144
145         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
146         Fixes #412494.
147
148 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
149
150         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
151         (mini_usage_jitdeveloper): Add a missing --wapi option.
152
153 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
154
155         * mini-codegen.c: Simplify the is_fp macros.
156         (free_up_ireg): Remove, use free_up_reg instead.
157         (free_up_reg): Fix the fp case.
158
159 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
160
161         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
162         lowered earlier.
163
164         * exceptions-x86.c: Merge some changes which seemed to have got lost
165         in the linear-ir merge.
166
167         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
168
169         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
170         long vreg volatile even if the variable was already created.
171
172         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
173         volatile variables.
174
175 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
176
177         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
178
179         * mini.c (mono_jit_compile_method_inner): Add support for 
180         MONO_EXCEPTION_BAD_IMAGE.
181
182         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
183         mini_method_get_context () returns NULL. Fixes #356531.
184
185         * mini.c (mono_method_to_ir): Ditto.
186         
187         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
188         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
189
190 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
191
192         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
193         in the LDFTN implementation.
194
195 2008-07-25  Mark Probst  <mark.probst@gmail.com>
196
197         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
198         code, patch calls to icalls, too, even if they're not in the
199         shared generic code hash.  Fixes #411962.
200
201 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
202
203         * cpu-x86.md: Increase the length of the fcall opcodes.
204
205         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
206         calls returning floats.
207
208         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
209         on NEWARR.
210         
211         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
212         missed earlier.
213
214         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
215         into the domain->method_code_hash.
216
217         * aot-compiler.c: Fix win32 build.
218
219         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
220         
221         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
222         gshared NEWARR implementation.
223
224         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
225
226         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
227         can be used outside of method_to_ir.
228
229         * mini.h (MonoCompile): Add arg_types field.
230
231         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
232         
233         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
234         the values of the local arg_array and param_types array.
235
236 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
237
238         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
239         got accesses might only get generated later when NEWOBJ is decomposed.
240         
241         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
242         looking up the native code of the target method when a delegate is called
243         for the first time.
244
245         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
246         optimization.
247
248         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
249
250         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
251         AOT work on platforms without a working dlsym implementation.
252
253         * mini.h: Bump AOT image format version.
254         
255 2008-07-24  Mark Probst  <mark.probst@gmail.com>
256
257         * mini-exceptions.c: Free a MonoType with
258         mono_metadata_free_type() instead of g_free().
259
260         * aot-runtime.c: Free a MonoType.
261
262 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
263
264         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
265         optimization.
266
267         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
268         fp stack on x86.
269
270 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
271         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
272         profiler hook.
273
274 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
275
276         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
277         NEWOBJ calls on valuetypes.
278
279         * iltests.il.in: Add new test.
280
281         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
282
283 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
284
285         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
286         is no longer needed.
287
288         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
289         non register sized integer arguments.
290         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
291         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
292         emit_memcpy2 ().
293
294         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
295         CEE_MONO_RETOBJ.
296         
297         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
298         two a binop with different sized arguments is emitted.
299
300         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
301         instruction in the ins==NULL case.
302
303 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
304
305         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
306
307         * mini-x86.c: Fix osx build.
308
309         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
310         opcodes as well.
311
312         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
313         instruction for non int sized variables.
314
315         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
316         implementation.
317
318 2008-07-23  Robert Jordan  <robertj@gmx.net>
319
320         * method-to-ir.c: Fix MSVC build.
321
322 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
323
324         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
325         a non int sized type, widen it to an int since newer versions of gcc seem to
326         generate code which needs this.
327
328         * ssa2.c abcremoval2.c: Fix warnings.
329
330         * *: Merge the Linear IR branch.
331
332         The original branch is at trunk/branches/vargaz/mini-linear-il, and
333         the ChangeLog file there describes all the changes done over the years. 
334         Further documentation can be found at www.mono-project.com/Linear_IL.
335
336 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
337
338         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
339           The float param registers and other param registers must be the 
340           same index on Windows x64.
341
342         Contributed under MIT/X11 license.
343
344 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
345
346         * mini.c: Make the previous fix GC safe.
347
348 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
349
350         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
351
352 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
353
354         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
355           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
356           ArgValuetypeAddrInIReg instead.
357
358         Contributed under MIT/X11 license.
359
360 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
361
362         * mini-codegen.c (get_register_spilling): Fix a warning.
363
364 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
365
366         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
367         for types which the initialization fails. Raises the provided exception
368         at the right stop after cleanup.
369
370 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
371
372         * aot-compiler.c: Free most of the memory allocated during compilation.
373
374         * mini.c (mini_parse_debug_options): Fix a leak.
375         
376         * mini.c (mini_method_compile): Don't add the method to the jit info tables
377         during aot compilation.
378
379 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
380
381         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
382         it has too much register pressure.
383
384 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
385
386         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
387
388 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
389
390         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
391         on x86.
392
393         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
394         on amd64 similar to the way it is done on arm.
395
396         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
397
398         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
399         consistency, normalize error messages, avoid loading aot-only modules in
400         normal mode.
401
402         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
403         for consistency.
404
405         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
406
407 2008-07-11  Martin Baulig  <martin@ximian.com>
408
409         * debug-debugger.h
410         (MonoDebuggerInfo): Add `interruption_request'.
411
412 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
413
414         * aot-compiler.c (emit_plt): Remove some dead code.
415
416         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
417
418         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
419         return the plt info offset belonging to a given plt entry.
420
421         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
422         mono_aot_get_plt_info_offset.
423         
424         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
425         similar to the amd64 code by makeing jumps through a separate jump table 
426         instead of embedding the jump addresses into the code.
427
428 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
429
430         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
431         method.
432
433 2008-07-10  Martin Baulig  <martin@ximian.com>
434
435         * mini.c (mini_method_compile): Disable generics sharing when
436         running in the debugger.
437
438 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
439
440         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
441
442         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
443         the local register allocator from running out of registers on x86 when 
444         using aot.
445
446 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
447
448         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
449         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
450         C4146.
451
452         Contributed under MIT/X11 license.
453
454 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
455
456         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
457         speed up the assembler.
458
459 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
460
461         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
462         support.
463
464         * mini.c: Move the soft float handling macros a bit earlier, add 
465         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
466         place.
467
468         * mini.h: Add prototype for mono_arch_fixup_jinfo.
469
470         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
471         read-only to help catch code allocation requests.
472         
473         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
474         and turn it off when using --aot-only or when compiling with --aot=full.
475
476         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
477         jump table for switches from the normal domain mempool, not the code
478         manager.
479
480         * mini-trampolines.c (get_unbox_trampoline): New function to return an
481         unbox trampoline which handles aot-only mode too.
482
483         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
484         an AOTed unbox trampoline.
485
486         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
487
488 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
489
490         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
491         ""
492
493         Contributed under MIT/X11 license.
494
495 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
496
497         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
498           the unwind information for the method at the end of the allocated block.
499           
500         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
501           MonoCompileArch to hold the unwind info for SEH on Winx64
502         
503         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
504           frame pointer info for the method being compiled.
505           
506         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
507           the call to mono_exception_from_token.
508           
509         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
510           storing the method prolog information in a format that the Winx64 SEH can understand.  This
511           information is stored a the end of the method block because it is all 32-bit offset based.
512
513         Contributed under MIT/X11 license.
514
515 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
516
517         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
518
519         * wapihandles.c: Fix warnings.
520
521         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
522         mode.
523
524         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
525         mono_jit_compile_method in aot-only mode since that calls the type 
526         initializer.
527         
528         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
529         get_delegate_invoke_impl in aot-only mode.
530
531         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
532
533 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
534
535         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
536
537         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
538         is on by default.
539
540         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
541
542         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
543         init trampoline from the AOT file as well.
544
545         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
546         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
547         code.
548
549         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
550         mono_init.
551
552         * exceptions-amd64.c: Add _full variants for the remaining exception code
553         creation functions as well, allow emission of relocatable code, remove
554         caching since that is now done by the caller.
555
556         * mini-exceptions.c: Add _full variants for the remaining exception code
557         creation functions as well, add aot-only support.
558
559         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
560         if we can determine a proper token for them.
561         (add_wrappers): Add a few more wrappers.
562         (emit_method_code): Remove some dead code.
563         (emit_trampolines): Emit exception code too.
564
565         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
566
567         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
568         mono_array_new_va which avoids varargs.
569
570         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
571
572         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
573         mono_arch_create_specific_trampoline () in all places.
574
575         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
576         a bit so it can be used for other things as well.
577         
578         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
579         on demand as well.
580
581         * exceptions-amd64.c: Rename the caching from the exception code creation
582         functions, it is done by the caller instead.
583         
584         * exceptions-amd64.c: Change the signature of the exception code creation 
585         functions to allow the creation of relocatable code later.
586
587         * mini-exceptions.c: Add a set of functions to query the various 
588         runtime-generated exception functions.
589
590         * mini.c mini-exceptions.c: Use the newly added functions instead of the
591         mono_arch_.. () functions.
592         
593 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
594
595         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
596
597         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
598
599         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
600         (mini_get_vtable_trampoline): Ditto.
601
602         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
603         code in the AOT case by returning the code size and a list of relocations to
604         the caller.
605
606         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
607
608 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
609
610         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
611           clean the stack.
612
613         Contributed under MIT/X11 license.
614
615 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
616
617         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
618         so the buffer size can be computed correctly. Fixes #404735.
619
620         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
621         normally as cfg->debug_info is already freed.
622
623 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
624
625         * mini-amd64.c: For calls returning vtypes in registers, don't store
626         the return address on the stack, instead allocate a separate local for
627         it. Fixes #404729.
628
629 2008-07-05  Mark Probst  <mark.probst@gmail.com>
630
631         * mini-trampolines.c, mini.h: Add an argument to
632         mono_create_jit_trampoline_in_domain() for turning off the adding
633         of the sync wrapper.
634
635         * mini.c: Use the JIT trampoline without sync instead of
636         ldftn_nosync in static RGCTX invoke wrappers so that the call can
637         be patched.
638
639 2008-07-04  Mark Probst  <mark.probst@gmail.com>
640
641         * driver.c: Turn on GSHARED optimization by default.
642
643 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
644
645         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
646         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
647
648         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
649         create a variant of the generic trampoline code callable from AOTed trampolines.
650
651         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
652         trampoline code callable from AOTed trampolines.
653
654         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
655
656 2008-07-04  Mark Probst  <mark.probst@gmail.com>
657
658         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
659         pass-through manner.
660
661         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
662         and don't fail sharing for them anymore.
663
664         * mini-exceptions.c: Handle exceptions in shared generic methods.
665
666         * generic-sharing.c: When checking the context of a generic
667         method, also check its class's context.  Don't treat wrappers as
668         sharable.
669
670         * mini-trampolines.c: Some code factored out to
671         metadata/generic-sharing.c.  Handle the MRGCTX case.
672
673         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
674         we must deal with the method being of another instantiation of the
675         class.  Add static rgctx invoke wrappers to generic methods.
676
677 2008-07-04  Mark Probst  <mark.probst@gmail.com>
678
679         * mini.c: Provide all jit infos of generic shared methods with a
680         generic jit info.
681
682         * mini-exceptions.c: Handle the new situation that a generic info
683         might be available, but not info about the this/vtable/mrgctx
684         variable.
685
686 2008-07-03  Mark Probst  <mark.probst@gmail.com>
687
688         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
689         generic methods.
690
691 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
692
693         * dominators.c (check_dominance_frontier): Fix a warning.
694
695         * mini.h: Add some missing prototypes.
696
697         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
698
699         * driver.c (mono_jit_init_version): Correct the comments since the first
700         argument should be the name of the root domain, not a filename.
701
702         * aot-runtime.c (make_writable): Error out if this is called while running
703         with --aot-only.
704         (load_aot_module): Ditto.
705
706         * aot-compiler.c: Really fix the computation of method indexes.
707
708         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
709         optimizations as this is no longer called frequently.
710
711         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
712         method and the invoke impl code and pass it to the delegate trampoline instead of
713         just the delegate class.
714
715 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
716
717         * aot-compiler.c: Fixup the computation of method indexes.
718         (add_wrappers): Create the base methods of the runtime invoke wrappers using
719         the method builder infrastructure.
720
721         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
722         has no header.
723
724         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
725         mode, load the method right away instead of creating a trampoline.
726
727         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
728
729         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
730         some checks a bit.
731
732 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
733
734         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
735         (mono_aot_load_method): Use method_index instead of method->token.
736
737         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
738         can handle icalls etc. properly.
739
740         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
741
742         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
743
744         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
745         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
746         JIT_ICALL_ADDR patch type.
747
748         * patch-info.h: Add JIT_ICALL_ADDR patch type.
749
750         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
751         request flag.
752         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
753
754         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
755
756 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
757
758         * mini.c: Use domain->jit_code_hash_lock for controlling access to
759         domain->jit_code_hash.
760
761 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
762
763         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
764
765 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
766
767         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
768         get_this_arg_from_call, let it compute it when needed.
769
770         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
771         gsctx from code only when needed.
772
773         * mini-trampolines.c (get_generic_context): Rename this to 
774         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
775         it can be called by the arch backends.
776
777         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
778
779 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
780
781         * driver.c (mono_main): Add experimental --aot-only command line option.
782
783         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
784         set.
785
786 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
787
788         * driver.c (DllMain): Remove mono_module_handle.
789
790         Contributed under MIT/X11 license.
791
792 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
793
794         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
795         for emitting methods which are not in the source assembly. Detect and report
796         failure of assembling+linking.
797         
798         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
799
800         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
801
802 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
803
804         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
805
806 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
807
808         * mini.h: Remove some obsolete prototypes.
809
810         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
811
812 2008-06-24  Mark Probst  <mark.probst@gmail.com>
813
814         * mini.c (get_object_generic_inst): Variable-sized arrays are not
815         supported by Visual Studio, so use alloca().
816
817 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
818
819         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
820         Fixes #402585.
821
822 2008-06-23  Mark Probst  <mark.probst@gmail.com>
823
824         * mini.c: Fail sharing of a generic method if it contains an open
825         catch clause (because we don't pass MRGCTXs yet).
826
827 2008-06-23  Mark Probst  <mark.probst@gmail.com>
828
829         * mini.c: When compiling a method with generic sharing, insert the
830         method instantiated with an all-Object generic context into the
831         jit info table, instead of the context of the first instantiation
832         of the method we happen to compile.
833
834 2008-06-18  Martin Baulig  <martin@ximian.com>
835
836         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
837         `major_version' and `minor_version'.
838
839 2008-06-17  Mark Probst  <mark.probst@gmail.com>
840
841         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
842         mono_method_is_generic_sharable_impl() takes an additional
843         argument specifying whether to treat type variables as reference
844         types.
845
846 2008-06-17  Mark Probst  <mark.probst@gmail.com>
847
848         * mini.h: Removed obsolete prototypes.
849
850 2008-06-17  Mark Probst  <mark.probst@gmail.com>
851
852         * mini.c: Don't fail generic sharing for initobj and sizeof - we
853         already handle them.
854
855 2008-06-17  Mark Probst  <mark.probst@gmail.com>
856
857         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
858         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
859         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
860         tramp-x86.c: Added a MonoGenericContext* argument to
861         mono_arch_get_unbox_trampoline() so that it can call other
862         functions which require it.
863
864 2008-06-17  Mark Probst  <mark.probst@gmail.com>
865
866         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
867         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
868         mono_arch_get_this_arg_from_call() takes a
869         MonoGenericSharingContext* as well.
870
871 2008-06-17  Mark Probst  <mark.probst@gmail.com>
872
873         * mini.c: Factor out code for emitting unbox into emit_unbox() and
874         implement generic sharing of unbox.
875
876 2008-06-17  Mark Probst  <mark.probst@gmail.com>
877
878         * mini.c: Don't compute the vtable to determine whether a field is
879         special static, because it might not work for open types.
880
881 2008-06-17  Mark Probst  <mark.probst@gmail.com>
882
883         * mini.c: Removed the unused token_type and token_source arguments
884         from get_runtime_generic_context_ptr().
885
886 2008-06-17  Marek Habersack  <mhabersack@novell.com>
887
888         * mini.c (ADD_BINOP): fix the build
889
890 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
891
892         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
893         a widening op.
894
895 2008-06-16  Mark Probst  <mark.probst@gmail.com>
896
897         * mini.h: Removed class relations enum that's not used anymore.
898
899 2008-06-16  Mark Probst  <mark.probst@gmail.com>
900
901         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
902
903         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
904         the lazy fetch trampoline access code.
905
906 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
907
908         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
909
910 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
911
912         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
913
914         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
915
916         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
917
918 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
919
920         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
921         intrinsics.
922
923         * mini-ops.h: Add MIN/MAX_UN opcodes.
924
925         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
926         intrinsics.
927
928         * basic-math.cs: Add more min/max tests.
929
930         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
931
932 2008-06-13  Mark Probst  <mark.probst@gmail.com>
933
934         * mini.c: Small fix in the prologue of emit_castclass.
935
936 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
937
938         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
939
940         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
941         do not work even for unsigned types. Fixes #400014.
942
943         * basic-math.cs: Add regression tests for unsigned Min/Max.
944
945 2008-06-13  Mark Probst  <mark.probst@gmail.com>
946
947         * mini.c: Added additional context_used argument to several
948         functions, which will be needed for sharing generic methods.  Use
949         GET_RGCTX macro wherever appropriate.  Declare only one
950         context_used in mono_method_to_ir().
951
952 2008-06-13  Mark Probst  <mark.probst@gmail.com>
953
954         * mini.c, generic-sharing.c: Removed generic class relations.
955
956         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
957         functions due to MRGCTX changes.
958
959 2008-06-13  Mark Probst  <mark.probst@gmail.com>
960
961         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
962         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
963         with calculated IMT.
964
965         * mini.c: Generic sharing of calls via generic interfaces.
966
967         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
968         generic method with non-constant MonoGenericContext*.  Instead,
969         the context is taken out of the method itself.
970
971 2008-06-13  Mark Probst  <mark.probst@gmail.com>
972
973         * mini.c: Generic sharing of ldvirtftn.
974
975 2008-06-13  Mark Probst  <mark.probst@gmail.com>
976
977         * mini.c: Generic sharing of ldftn.
978
979 2008-06-13  Mark Probst  <mark.probst@gmail.com>
980
981         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
982
983 2008-06-13  Mark Probst  <mark.probst@gmail.com>
984
985         * mini.c: Generic sharing of the special case of ldtoken followed
986         by a call to GetTypeFromHandle.
987
988 2008-06-13  Mark Probst  <mark.probst@gmail.com>
989
990         * mini.c: Generic sharing of box for nullable types.
991
992 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
993
994         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
995         are passed on the stack. Fixes #324807.
996
997 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
998
999         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
1000         for the ArgValuetypeAddrInIReg case.
1001
1002         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
1003         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
1004
1005         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
1006         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
1007         local variable and pass the local variable by reference to the called method.
1008           
1009         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
1010         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
1011
1012         Contributed under MIT/X11 license.
1013
1014 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
1015
1016         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
1017
1018         * debug-mini.c (mono_debug_print_vars): Release memory after printing
1019         everything.
1020
1021 2008-06-10  Martin Baulig  <martin@ximian.com>
1022
1023         * debug-mini.c
1024         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
1025
1026 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
1027
1028         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
1029         possible error when no arguments are passed.
1030
1031         Contributed under MIT/X11 license.
1032
1033 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
1034
1035         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
1036         where the file name is NULL.
1037
1038 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
1039
1040         * mini.c: Fix s390 build.
1041
1042 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
1043
1044         * trace.c (mono_trace_parse_options): Fix warnings.
1045
1046         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
1047
1048 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
1049
1050         * mini.c (remove_block_if_useless): Avoid printing the method name.
1051         
1052         * mini.c: Remove needless setting of ins->cil_code which is now done by 
1053         MONO_INST_NEW.
1054
1055         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
1056         LMF. Not yet used.
1057
1058         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
1059         translated code after it has been patched.
1060
1061 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
1062
1063         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
1064         avoid problems during code patching on SMP systems.
1065         (emit_call): Avoid adding a patch info which is already added by 
1066         emit_call_body.
1067         (mono_arch_emit_exceptions): Ditto.
1068
1069 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
1070
1071         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
1072         MONO_TYPE_ISSTRUCT already checks for it.
1073
1074 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
1075
1076         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
1077           structs with floats on Winx64 the float registers are not used.  
1078           The integer registers are always used..
1079         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
1080           only one register will be used and only if the size of the struct 
1081           is 1,2,4, or 8 bytes.
1082
1083         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
1084           to work for Winx64.
1085
1086         Contributed under MIT/X11 license.
1087
1088 2008-06-05  Martin Baulig  <martin@ximian.com>
1089
1090         * debug-debugger.c (debugger_lookup_class): Also call
1091         mono_class_setup_methods() here; we're only called from RTI.
1092
1093 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
1094
1095         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
1096         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
1097         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
1098         Post-process object files and add dtrace-generated object, if necessary.
1099
1100         Contributed under MIT/X11 license.
1101
1102 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1103
1104         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
1105         element class.
1106
1107         * mini.c: Generic sharing for unbox.any and castclass.
1108
1109 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1110
1111         * mini.c: Ignore tailcall prefix in shared generic code and when
1112         doing calls which require a vtable/rgctx argument.
1113
1114 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1115
1116         * mini.c: Don't free the JIT info.
1117
1118         * driver.c: Changes in the JIT info table testing code.
1119
1120 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
1121
1122         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
1123         interruption. Fix some warnings.
1124
1125         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
1126         interruption_checkpoint.
1127
1128 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
1129
1130         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
1131         from embedding applications.
1132
1133 2008-06-02  William Holmes  <billholmes54@gmail.com>
1134
1135         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
1136           reserving 32 bytes on the stack when making calls. 
1137
1138         Contributed under MIT/X11 license.
1139
1140 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
1141
1142         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
1143         the linear IL branch.
1144
1145         * driver.c: Print out more information for --version on arm.
1146
1147 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
1148
1149         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
1150         bb_exit instead, since out of line bblocks might not actually be emitted
1151         out-of-line.
1152         
1153         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
1154         maximum epilog size for out of line bblocks if tracing is enabled.
1155
1156         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
1157
1158 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
1159
1160         * arrays.cs: Regression tests for allocating arrays with negative sizes.
1161
1162 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
1163
1164         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
1165         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
1166         opcodes.
1167
1168 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
1169
1170         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
1171         the 'value' to store is a constant.
1172
1173         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
1174
1175         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
1176         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
1177
1178 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
1179
1180         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
1181         for accessing method->generic_container.
1182
1183 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
1184
1185         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
1186         
1187         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
1188
1189         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
1190
1191         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
1192         fails.
1193
1194 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
1195
1196         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
1197
1198         * mini.c: Handle the case when mono_class_vtable () fails.
1199
1200 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
1201         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
1202         the stat profiler.
1203
1204 2008-05-22  Mark Probst  <mark.probst@gmail.com>
1205
1206         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
1207         together with domain sharing.
1208
1209 2008-05-22  Mark Probst  <mark.probst@gmail.com>
1210
1211         * mini.c: Treat callvirts to final methods like non-virtual calls
1212         when doing generic sharing, i.e. look them up in the runtime
1213         generic context.
1214
1215 2008-05-22  Mark Probst  <mark.probst@gmail.com>
1216
1217         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
1218         with computed types (for generic sharing).
1219
1220         * mini.c: Generic sharing for mkrefany and refanyval.
1221
1222 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
1223
1224         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
1225         possible.
1226
1227         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
1228         the generic sharing code.
1229         
1230         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
1231         when needed.
1232
1233 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
1234
1235         * mini.h: Remove the declaration of mono_aot_init_vtable ().
1236
1237 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
1238
1239         * driver.c: updated copyright date
1240
1241 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
1242
1243         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
1244         needed.
1245
1246 2008-05-19  Martin Baulig  <martin@ximian.com>
1247
1248         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
1249         pointing to the new `_mono_debug_using_mono_debugger' variable.
1250
1251         * driver.c
1252         (mono_main): Check mono_debug_using_mono_debugger() rather than
1253         the `MONO_INSIDE_MDB' environment variable to check whether we're
1254         inside the debugger.
1255
1256 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
1257
1258         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
1259         argument.
1260
1261 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
1262
1263         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
1264
1265         * mini.c: Added mini_assembly_can_skip_verification. This
1266         function checks if the assembly requested to skip verification. 
1267         Fixes part of #387274.
1268
1269 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
1270
1271         * mini.c (mini_get_method): Disable the check for open generic classes when
1272         using generic sharing.
1273
1274         * generics.cs: Add a test #387034.
1275
1276         * mini.c (mini_get_method): Check whenever the method class is an open generic
1277         type, and return NULL in that case, causing a verification error. Fixes
1278         #384123.
1279
1280 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
1281
1282         * driver.c (mono_main): Revert r102623. The right
1283         thing to do is to enable the verifier under verifiable
1284         unless a --security flag was passed.
1285
1286         We need this non-trivial behavior for --verify-all otherwise
1287         mcs-compileall won't be able to use it. As it needs everything to
1288         be verified under validil.
1289
1290 2008-05-06  Martin Baulig  <martin@ximian.com>
1291
1292         Fix #383749.
1293
1294         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
1295         (mono_debugger_thread_cleanup): Likewise.
1296         (mono_debugger_extended_notification): Likewise.
1297
1298 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
1299
1300         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
1301         against both inflated and non-inflated methods. We need to check against the
1302         generic definition for cases where the instantiated method is not visible.
1303         We need to check against the inflated types for cases where the instantiation
1304         changes any super type. This fixes #382986.
1305
1306         Note that this doesn't need to be applied to other parts of mono_method_to_ir
1307         that check for visibiliy as generic params only appears as the type subject
1308         of tokens on call opcodes. Field manipulation and ldftn must always
1309         target an exact type.
1310
1311 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
1312
1313         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
1314         if no related --security flag is passed.
1315
1316 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
1317
1318         * mini-arch.h: Prepare support for ppc64.
1319
1320         Contributed under MIT/X11 license.
1321
1322 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
1323
1324         * aot-runtime.c: Prepare support for ppc64.
1325
1326         Contributed under MIT/X11 license.
1327
1328 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
1329
1330         * mini-ops.h: Prepare support for ppc64.
1331
1332         Contributed under MIT/X11 license.
1333
1334 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
1335
1336         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
1337
1338         Contributed under MIT/X11 license.
1339
1340 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
1341
1342         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
1343         assemblies, since aot_name is not a full path, causing us to load MS.NET 
1344         assemblies on windows.
1345
1346 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
1347
1348         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
1349         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
1350         * main.c: Use UTF-8 encoded command line instead of Windows default code
1351         page on Windows to support Unicode.
1352         * driver.c (DllMain): New function for mixed-mode assembly support.
1353         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
1354         export __stdcall functions without decoration.
1355
1356         Contributed under MIT/X11 license.
1357
1358 2008-04-28  Mark Probst  <mark.probst@gmail.com>
1359
1360         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
1361         saving it very early.
1362
1363 2008-04-28  Mark Probst  <mark.probst@gmail.com>
1364
1365         * mini.h, mini.c: Lots of code for accessing the old RGCTX
1366         deleted.  The only way to access the new RGCTX is via the
1367         trampline.
1368
1369         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
1370         vtable instead of the RGCTX to static methods.
1371
1372         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
1373         accessing the new RGCTX.
1374
1375         * generic-sharing.c: There is no separation between self, type
1376         arguments and other types in the RGCTX anymore.
1377
1378 2008-04-25  Jonathan Chambers <joncham@gmail.com>
1379
1380         * mini-amd64.c (add_general): Remove previous stack adjustment.
1381         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
1382         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
1383         for 32 bytes of stack space reserved for all calls.
1384         
1385         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
1386         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
1387         adjustment.
1388         
1389         Code contributed under MIT/X11 license.
1390
1391 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
1392
1393         * mini.c (mini_method_verify): Only verify non-inflated methods, check
1394         against the root definition, peeling out method and type instantiations.
1395         Cache verify success results, code that fails verification is still
1396         checked multiple times.
1397
1398 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
1399
1400         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
1401
1402 2008-04-23  Jonathan Chambers <joncham@gmail.com>
1403
1404         * mini-amd64.c (add_general): Always increment stack on Win64.
1405         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
1406         on Win64.
1407         
1408         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
1409         stack based argument handling on Win64.
1410         
1411         Code contributed under MIT/X11 license.
1412
1413 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
1414
1415         * Makefile.am (version.h): Add support for git-svn.
1416
1417 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
1418
1419         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
1420         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
1421         avoiding allocations and libc functions which might deadlock.
1422         
1423         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
1424         'no-gdb-backtrace' option is set.
1425
1426         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
1427
1428         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
1429
1430 2008-04-21  Martin Baulig  <martin@ximian.com>
1431
1432         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
1433         and `get_lmf_addr'; `notification_address' is no longer a pointer.
1434
1435 2008-04-21  Martin Baulig  <martin@ximian.com>
1436
1437         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
1438         `thread_vtable', `event_handler_ptr' and `event_handler'.
1439
1440 2008-04-21  Martin Baulig  <martin@ximian.com>
1441
1442         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
1443         allows delayed initialization of the `executable_code_buffer' when
1444         attaching.
1445
1446 2008-04-21  Martin Baulig  <martin@ximian.com>
1447
1448         * mini.h (mono_debugger_create_notification_function): Removed.
1449         * tramp-*.c (mono_debugger_create_notification_function): Removed.
1450
1451         * mdb-debug-info64.s
1452         (MONO_DEBUGGER__notification_function): Added this in the .text section.
1453
1454         * mdb-debug-info32.s
1455         (MONO_DEBUGGER__notification_function): Added this in the .text section.
1456
1457         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
1458         currently only works on x86 and x86_64, so don't create it on ppc.
1459
1460 2008-04-21  Martin Baulig  <martin@ximian.com>
1461
1462         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
1463
1464         * mini.c
1465         (mini_method_compile): In the fp elimination check, check
1466         `debug_options.mdb_optimizations' in addition to
1467         mono_debug_using_mono_debugger().       
1468
1469         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
1470         disable some JIT optimizations which are only disabled when
1471         running inside the debugger.
1472         Added `--help-debug' option to describe the debugging options.
1473         (parse_debug_options): New static function to parse the `--debug'
1474         options, so we can easily add more stuff in future.
1475
1476 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
1477
1478         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
1479         the method has no body.
1480
1481 2008-04-19  Jonathan Chambers <joncham@gmail.com>
1482
1483         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
1484         assembly is not allowed in MSVC 64-bit compiler. 
1485         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
1486         as we get floating point exceptions everywhere.
1487         
1488         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
1489         correctly align arguments for call to throw_exception.
1490         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
1491         
1492         Code contributed under MIT/X11 license.
1493
1494 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
1495
1496         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
1497
1498 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
1499
1500         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
1501
1502         * mini-amd64.c (NEW_INS): Set cil_code.
1503
1504         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
1505         from mini-amd64.c so all debugger related logic is in one place.
1506
1507         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
1508         later won't have a random ip assigned to them.
1509
1510 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
1511
1512         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
1513         the arch specific function initializes code_size.
1514         (mono_create_delegate_trampoline): Ditto.
1515
1516         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
1517         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
1518         platforms.
1519
1520         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
1521         running under the debugger.
1522
1523         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
1524         debugger.
1525
1526         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
1527         debugger. Also move the disabling of optimizations here from driver.c.
1528         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
1529         debugger.
1530
1531         * mini.h (MonoCompile): Add a few new flags.
1532
1533 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
1534
1535         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
1536         so the cil_code field of created MonoInst's is properly set.
1537         (mini_select_instructions): Ditto.
1538
1539         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
1540         (MONO_INST_NEW_CALL): Ditto.
1541
1542         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
1543         in many places so the ins->cil_code field is properly initialized.
1544
1545         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
1546         place.
1547
1548 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
1549
1550         * mini.c (mini_method_compile): Print a different message when compiling a 
1551         shared method.
1552         
1553         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
1554         > 1.
1555
1556 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
1557
1558         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
1559         SSE2 instructions.
1560
1561         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
1562         
1563 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
1564
1565         * mini.c (handle_stack_args): Make this return void since its return value was
1566         never used. Also set cfg->unverifiable for invalid IL instead of calling
1567         G_BREAKPOINT ().
1568
1569 2008-04-10  Mark Probst  <mark.probst@gmail.com>
1570
1571         * mini.c: Make sure "this" is live in catch clauses with type
1572         variables in shared generic code.
1573
1574 2008-04-08  Mark Probst  <mark.probst@gmail.com>
1575
1576         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
1577         generic_class_is_reference_type() to ensure the proper behaviour
1578         when sharing generic code and the type in question is a type
1579         argument.
1580
1581 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
1582
1583         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
1584         race conditions when printing thread dumps. Fixes #377738.
1585
1586 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
1587         
1588         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
1589         shows up when both MonoInst arguments can cause aliasig.
1590         There is likely no way in the current JIT to trigger this problem, but
1591         it showed up in the development of generics sharing, when in a new
1592         opcode both args of an OP_GROUP can be aliases (addresses of a local).
1593         When the generics sharing code will be committed, its tests will be
1594         valid also for this bug.
1595
1596 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
1597
1598         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
1599         PATCH_INFO_METHOD.
1600
1601         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
1602         NULL.
1603
1604 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
1605
1606         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
1607         use a more detailed exception message for InvalidCastException.
1608
1609         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
1610
1611         * driver.c (mono_main): Add --debug=casts option to turn on better 
1612         InvalidCastException message details.
1613
1614         * mini.c (mini_get_debug_options): New helper function to return the address of
1615         the debug_options variable.
1616
1617         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
1618         the jit_tls TLS variable.
1619
1620         * mini.c (mono_jit_tls): New TLS variable.
1621
1622         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
1623         option is used.
1624
1625 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
1626
1627         * mini.h: Removed verifer related stuff. This code was moved to verify.c
1628
1629         * mini.c: Removed verifer related stuff, code moved to verify.c.
1630
1631         * driver.c: Using code from verify.c instead of mini.c.
1632
1633 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
1634
1635         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
1636         longer valid.
1637
1638 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
1639
1640         * mini.c (check_for_method_verify): Enabling verification of
1641         corlib if mono_verify_all is set. Bugs in the verifier preventing that
1642         have been fixed.
1643
1644 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
1645
1646         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
1647         caller saved registers as well.
1648         
1649         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
1650         saved registers as well.
1651
1652 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
1653
1654         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
1655
1656         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
1657         code.
1658
1659 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
1660
1661         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
1662         to get_call_info.
1663         (get_call_info): Take a gsctx argument instead of 'cfg'.
1664
1665 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
1666
1667         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
1668         mono_verify_all is set.
1669
1670         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
1671
1672         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
1673
1674 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
1675
1676         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
1677         an exception.
1678
1679         * driver.c mini.c mini.h: Add a --verify-all development option to test the
1680         verifier and the code generated by the compiler.
1681
1682 2008-03-25  Mark Probst  <mark.probst@gmail.com>
1683
1684         * mini.c: Generic sharing of the non-nullable case of the box
1685         instruction.
1686
1687 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
1688
1689         * inssel.brg: Fix the build.
1690
1691         * iltests.il.in: Add a test for lconv.ovf.u8.un.
1692
1693 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
1694
1695         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
1696         Array:Address. Fixes #372410.
1697
1698         * iltests.il.in: New tests for readonly prefix.
1699
1700 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
1701
1702         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
1703         mini-trampolines.c.
1704
1705         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
1706         mini-exceptions.c.
1707
1708         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
1709         
1710         * mini.c (mono_decompose_op_imm): New helper function.
1711
1712         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
1713         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
1714         return value.
1715
1716         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
1717         mono_arch_output_basic_block. Fix warnings.
1718
1719         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
1720         for now.
1721
1722 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
1723
1724         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
1725         since the extra frame is now detected automatically inside the loop.
1726
1727         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
1728         opts which are now in mono_peephole_ins ().
1729         
1730         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
1731
1732         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
1733         frames and skip duplicate managed-to-native frames. Fixes #367665.
1734
1735         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
1736         opts which are now in mono_peephole_ins ().
1737         (mono_arch_peephole_pass_2): Ditto.
1738
1739         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
1740
1741         * mini-codegen.c (mono_peephole_ins): New helper function containing the
1742         arch independent peephole optimizations.
1743
1744         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
1745         opts which are now in mono_peephole_ins ().
1746
1747         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
1748         
1749         * mini-s390.c (mono_arch_output_basic_block): Fix build.
1750
1751         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
1752         pattern.
1753
1754         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
1755         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
1756         opcode. 
1757
1758 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
1759
1760         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
1761         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
1762         return value.
1763
1764         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
1765         mono_arch_output_basic_block. Fix warnings.
1766
1767 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
1768
1769         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
1770         conv.ovf.u.un.
1771
1772 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
1773
1774         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
1775         conv.ovf.u.un.
1776
1777         * iltests.il: Add new tests.
1778
1779 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
1780
1781         * mini.c: Removed Windows version macros.
1782
1783 2008-03-20  Mark Probst  <mark.probst@gmail.com>
1784
1785         * generic-sharing.c: Put reflection types in the extensible part
1786         of the runtime generic context.
1787
1788         * mini.c: Generic sharing of the GetTypeHandle special case of the
1789         ldtoken instruction.
1790
1791 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
1792
1793         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
1794
1795         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
1796         
1797         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
1798         consistency with the other version on the linear IR branch.
1799
1800         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
1801
1802         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
1803
1804         * iltests.il.in: Add new tests.
1805
1806 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
1807
1808         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
1809
1810         * iltests.il.in: Add new tests.
1811
1812 2008-03-19  Mark Probst  <mark.probst@gmail.com>
1813
1814         * mini.c: Two variables with the same name were declared in
1815         nesting contexts and one wasn't initialized.  Fixed.
1816
1817 2008-03-19  Mark Probst  <mark.probst@gmail.com>
1818
1819         * mini.c: Generic sharing of the initobj instruction.
1820
1821 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
1822
1823         * mini.c: make the test to optimize ldtoken from typeof() more
1824         precise.
1825
1826 2008-03-18  Mark Probst  <mark.probst@gmail.com>
1827
1828         * mini.c: Generic sharing of the initobj instruction for reference
1829         types.
1830
1831 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
1832
1833         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
1834         the mono_breakpoint_clean_code() code to perform bound checks.
1835
1836 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
1837
1838         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
1839         mono_arch_patch_callsite() to include the start of the managed method
1840         to be able to perform bound checks.
1841
1842 2008-03-17  Mark Probst  <mark.probst@gmail.com>
1843
1844         * mini.c: Generic sharing for the isinst instruction.
1845
1846 2008-03-17  Mark Probst  <mark.probst@gmail.com>
1847
1848         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
1849         inssel-long32-mips.brg: Added opcodes for doing indirect calls
1850         with the runtime generic context argument.
1851
1852         * mini.c: Share calls to several types of unsharable methods by
1853         putting the address of the method code in the runtime generic
1854         context and doing an indirect call.
1855
1856         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
1857         to switches.
1858
1859 2008-03-16  Mark Probst  <mark.probst@gmail.com>
1860
1861         * generic-sharing.c: Change due to a change in the runtime genric
1862         context API.
1863
1864 2008-03-15  Martin Baulig  <martin@ximian.com>
1865
1866         * tramp-x86.c
1867         (mono_arch_nullify_class_init_trampoline): Add call to
1868         mono_breakpoint_clean_code() to make things work when running
1869         inside the debugger.
1870
1871         * tramp-amd64.c
1872         (mono_arch_nullify_class_init_trampoline): Add call to
1873         mono_breakpoint_clean_code() to make things work when running
1874         inside the debugger.
1875
1876 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
1877
1878         * inssel-long.brg (reg): Fix 64 bit build.
1879
1880 2008-03-14  Mark Probst  <mark.probst@gmail.com>
1881
1882         * mini.c, mini.h: Share static generic code by passing it an
1883         implicit argument pointing to the runtime generic context.
1884
1885         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
1886         inssel-long32-mips.brg: New opcodes for calling shared static,
1887         which need to be passed the runtime generic context.
1888
1889         * mini-amd64.c, mini-x86.c: Save the runtime generic context
1890         argument on the stack in the prologue if needed.  New function for
1891         finding the runtime generic context argument from the registers
1892         saved by the trampoline.
1893
1894         * mini-amd64.h, mini-x86.h: Specify which register to use for the
1895         runtime generic context argument.
1896
1897         * tramp-amd64.c: Also restore the register used for the runtime
1898         generic context argument.
1899
1900         * mini-trampoline.c: Resolve shared static calls by consulting the
1901         runtime generic context via the new argument.
1902
1903         * generic-sharing.c: Add an argument to sharability-checking
1904         functions that specifies whether type variables should be treated
1905         as sharable type arguments.
1906
1907         * inssel-x86.brg: Removed a superfluous, buggy rule.
1908
1909         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
1910         to switches.
1911
1912 2008-03-14  Martin Baulig  <martin@ximian.com>
1913
1914         * debug-debugger.c (main_thread_handler): Call
1915         mono_runtime_run_main() without sending any notifications.
1916
1917         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
1918
1919 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
1920
1921         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
1922
1923 2008-03-14  Mark Probst  <mark.probst@gmail.com>
1924
1925         * tramp-x86.c: Fixed register restore offsets in the trampoline
1926         code for ECX and EDX.
1927
1928 2008-03-12  Geoff Norton  <gnorton@novell.com>
1929
1930         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
1931         different ucontext_t implementations.
1932         * exceptions-arm.c: Use the above defines to get exceptions working on 
1933         iPhone (based on a patch by Luke Howard lukeh@padl.com)
1934         * mini-arm.c: Implement iPhone icache support (based on a patch by
1935         Luke Howard lukeh@padl.com)
1936
1937 2008-03-12  Mark Probst  <mark.probst@gmail.com>
1938
1939         * mini.c: Enable generic sharing of calls to non-static
1940         non-interface non-generic non-value-type methods.
1941
1942         * mini-trampolines.c: Resolve calls from shared generic code.
1943
1944 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
1945
1946         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
1947
1948         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
1949
1950 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
1951
1952         * mini.c: some fixes for the AOT compiler.
1953
1954 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
1955
1956         * cpu-amd64.md: Add clob:1 to some float opcodes.
1957
1958 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
1959
1960         * mini.h: Added MiniVerifierMode enumeration.
1961
1962         * mini.c: Added mini_verifier_set_mode to control
1963         the usage of the new verifier.
1964
1965         * mini.c (mono_method): Integrated the new verifier.
1966
1967         * driver.c: Extended --security option with validil and
1968         verifiable options to activate the new verifier.
1969
1970 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
1971
1972         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
1973         optimization to ctors taking 0 or 2 arguments too.
1974
1975         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
1976         a bit.
1977
1978         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
1979
1980         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
1981
1982 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
1983
1984         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
1985         non-aot case as well.
1986
1987         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
1988
1989         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
1990         changes.
1991
1992         * aot-compiler.c (encode_patch): Ditto.
1993
1994         * mini.h (G_MININT32): Fix the definition of this.
1995
1996 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
1997
1998         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
1999
2000         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
2001
2002 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
2003
2004         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
2005         methods returning vtypes in registers.
2006         (mono_arch_allocate_vars): Ditto.
2007
2008         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
2009
2010         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
2011
2012         * generics.cs: Add a test from the linear IR branch.
2013
2014         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
2015
2016         * mini.c (inline_method): Cache failed inline attempts.
2017
2018 2008-03-04  Mark Probst  <mark.probst@gmail.com>
2019
2020         * mini.c: For shared methods of generic classes put the location
2021         of "this" into the MonoGenericJitInfo.
2022
2023         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
2024         register out of a MonoContext by register number.  Add the generic
2025         sharing context as an argument to mono_arch_find_this_argument().
2026
2027         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
2028         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
2029         for new arch function.
2030
2031         * mini-exception.c: Handle open exception clauses in shared
2032         generic code.
2033
2034         * mini-trampolines.c: Supply additional argument to
2035         mono_arch_find_this_argument().
2036
2037 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
2038
2039         * Makefile.am (regtests): Run the bench.exe tests last.
2040
2041 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
2042
2043         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
2044         a bit.
2045
2046 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
2047
2048         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
2049         with MS.
2050
2051         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
2052         
2053         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
2054
2055         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
2056         whose class has no cctor.
2057
2058         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
2059
2060 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
2061
2062         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
2063         unverified.
2064
2065 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
2066
2067         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
2068         to be in sync with the code on the linear IR branch.
2069
2070         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
2071
2072         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
2073
2074 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
2075
2076         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
2077
2078         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
2079
2080         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
2081
2082         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
2083
2084         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
2085         
2086         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
2087         body.
2088
2089 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
2090
2091         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
2092         OP_LOADR4_MEMBASE emission.
2093
2094         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
2095         (mono_spillvar_offset_float): Ditto.
2096
2097         * mini-mips.c (mono_arch_emit_prolog): Ditto.
2098
2099         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
2100         emission.
2101
2102         * basic-long.cs: Add regression tests for them.
2103
2104         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
2105         use.
2106         (mono_arch_allocate_vars): Fix representation of single-precision float
2107         argument.
2108         (mono_arch_output_basic_block): Ditto.
2109
2110         * inssel-mips.brg: Ditto, remove duplicate items.
2111
2112         * mini-mips.c (emit_load_volatile_arguments): New function to handle
2113         arguments of tail calls as on other platforms.
2114         (mono_arch_output_basic_block): Handle tail calls.
2115
2116         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
2117         register.
2118
2119         * objects.cs (test_5_pass_static_struct): Add test for it.
2120
2121         Contributed under MIT/X11 license.
2122
2123 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
2124
2125         * Makefile.am: Use gmcs for compiling the regression tests.
2126
2127         * *.2.cs *.2.il: Rename to *.cs and *.il.
2128
2129 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
2130
2131         * regalloc.h: Make the vassign array smaller.
2132
2133         * mini.c (mini_method_compile): Remove an unused field in cfg.
2134
2135         * mini-codegen.c: Add a bunch of micro optimizations.
2136
2137 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
2138
2139         * regalloc.h: Remove some unused fields.
2140
2141 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
2142
2143         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
2144
2145         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
2146
2147 2008-02-22  Mark Probst  <mark.probst@gmail.com>
2148
2149         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
2150
2151         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
2152         trampoline: Fetch an entry from the runtime generic context.  If
2153         it's NULL, jump to the actual trampoline to fill the runtime
2154         generic context.  Otherwise, return it.
2155
2156         * mini.c: Call the lazy fetch trampoline to get entries out of the
2157         runtime generic context.
2158
2159         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
2160         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
2161         tramp-sparc.c: Stubs for the lazy fetch trampoline.
2162
2163 2008-02-21  Mark Probst  <mark.probst@gmail.com>
2164
2165         * mini.c: Fetch data out of the extensible part of the runtime
2166         generic context instead of calling a helper function.
2167
2168         * generic-sharing.c: Some functions moved into
2169         metadata/generic-sharing.c.  Helper function for fetching other
2170         types now checks and asserts against extensible rgctx (just for
2171         debugging purposes - the helper function isn't called anymore
2172         unless for debugging).
2173
2174 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
2175
2176         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
2177         for tail calls up to the point that the tests in iltests.exe run. Also add a
2178         dummy CKFINITE implementation.
2179         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
2180         needed for trampoline LMF frames.
2181
2182         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
2183         trampoline LMF frames.
2184
2185 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
2186
2187         * mini.c (inline_method): clean any pending loader error when inlining fail.
2188         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
2189
2190 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
2191
2192         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
2193
2194         * aot-runtime.c (decode_patch_info): Ditto.
2195
2196         * mini.c (mono_resolve_patch_target): Ditto.
2197         
2198         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
2199         icall wrappers.
2200
2201         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
2202         
2203         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
2204         if it references an icall address.
2205
2206 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
2207
2208         * cpu-s390x.md: Remove some more unused opcodes.
2209         
2210         * cpu-s390x.md: Remove some unused opcodes.
2211
2212         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
2213         mono_op_imm_to_op ().
2214
2215         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
2216         instead of a switch statement.
2217         
2218         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
2219         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
2220
2221         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
2222         
2223         * mini-codegen.c: Remove unused mono_regstate2_... functions.
2224
2225         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
2226         -1.
2227
2228 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
2229
2230         * driver.c (mono_main): Improve error reporting when an assembly cannot be
2231         opened. Fixes #362607.
2232
2233         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
2234
2235         * iltests.il.in: Add a test for static methods in interfaces.
2236
2237 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
2238
2239         * genmdesc.c (build_table): Fix a crash on older glib versions.
2240
2241         * cpu-sparc.md: Remove some unused opcodes.
2242         
2243         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
2244         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
2245
2246         * cpu-amd64.md: Remove some unused opcodes.
2247
2248         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
2249         like the other opcodes.
2250
2251 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
2252
2253         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
2254
2255         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
2256
2257         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
2258         variables 'cfg' instead of 'm' for consistency.
2259
2260         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
2261
2262         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
2263         argument holding the vtype return address, to avoid the ambigious use of
2264         cfg->ret for this purpose.
2265
2266         * mini.c (NEW_RETLOADA): Use vret_addr if set.
2267
2268         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
2269         
2270         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
2271         new mono_print_ins () function which only takes one argument.
2272
2273 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
2274
2275         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
2276         macro arguments.
2277
2278 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
2279
2280         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
2281
2282         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
2283
2284         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
2285         opcodes and other small changes.
2286
2287         * mini-ops.h: Add some new opcodes from the linear IR branch.
2288
2289         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
2290
2291         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
2292         opcodes, use the REG_MEMBASE opcodes instead.
2293         
2294         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
2295         opcodes, use the REG_MEMBASE opcodes instead.
2296         
2297         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
2298         linear IR branch.
2299
2300         * mini.c (mono_op_imm_to_op): New helper function.
2301
2302         * mini-ops.h: Add some opcodes from linear IR branch.
2303
2304 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
2305
2306         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
2307         <tsv@solvo.ru>.
2308
2309 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
2310
2311         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
2312         OP_ICONV_TO_R4/R8.
2313
2314         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
2315
2316 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
2317
2318         * aot-compiler.c (emit_method_code): Add an assert.
2319
2320         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
2321         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
2322         methods.
2323
2324 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
2325
2326         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
2327         some load/store opcodes so they are consistent. 
2328         (mono_arch_emit_prolog): Simplify some code.
2329
2330         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
2331
2332         * objects.cs: Add tests for large argument offsets on ARM.
2333
2334         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
2335         stack offsets. Fixes #359651.
2336
2337         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
2338
2339         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
2340
2341         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
2342
2343         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
2344
2345         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
2346
2347         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
2348         rid of CEE_CONV_R_UN.
2349
2350         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
2351
2352 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
2353
2354         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
2355
2356         * mini.c (mono_normalize_opcodes): Add some more opcodes.
2357
2358         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
2359
2360         * cpu-amd64.md: Remove some unused opcodes.
2361
2362         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
2363
2364         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
2365
2366         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
2367         arch specific functions for its parts. Call the peephole pass after local
2368         regalloc so the prolog can compute a more accurate max_offset.
2369         
2370         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
2371         the corresponding OP_I/OP_L opcodes.
2372
2373         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
2374
2375         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
2376
2377 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
2378
2379         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
2380         as they are handled in mini.c.
2381
2382         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
2383         
2384         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
2385         case since it is handled in mini.c.
2386
2387         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
2388
2389         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
2390
2391         * *.c: Use the new opcodes in the IR and back end code.
2392
2393         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
2394
2395         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
2396
2397 2008-02-06  Mark Probst  <mark.probst@gmail.com>
2398
2399         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
2400         an assert because it has a race condition.
2401
2402 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
2403
2404         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
2405
2406         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
2407
2408         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
2409
2410         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
2411         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
2412
2413 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
2414
2415         * cpu-amd64.md (move): Correct the maximum size of move.
2416
2417 2008-02-05  Mark Probst  <mark.probst@gmail.com>
2418
2419         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
2420         the generic class init trampoline to return quickly if the class
2421         is already inited.
2422
2423 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
2424
2425         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
2426         issues where an 32 bit callsite cannot be patched by a 64 bit address.
2427
2428 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
2429
2430         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
2431         branch.
2432
2433 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
2434
2435         * objects.cs: Add some soft-float tests.
2436
2437         * mini.c: Fix a couple more soft-float issues.
2438
2439         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
2440
2441         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
2442         avoid a REX prefix.
2443
2444 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
2445
2446         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
2447         exception happens while compiling a virtual method.
2448
2449 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
2450
2451         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
2452         
2453         * mini-sparc.c: Fix build.
2454
2455         * mini-sparc.c (get_call_info): Add support for generic sharing.
2456
2457         * mini-exceptions.c: Add a FIXME.
2458
2459 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
2460
2461         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
2462         altstack handling code.
2463
2464         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
2465         
2466         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
2467
2468         * mini-s390.c: Add support for generic sharing.
2469
2470         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
2471         Fix CAS on s390.
2472         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
2473
2474         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
2475
2476         * mini-s390x.c: Add support for generic sharing.
2477         
2478         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
2479         Fix CAS on ia64.
2480         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
2481
2482         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
2483         can be used since it takes a 16 bit signed immediate.
2484
2485         * inssel-s390x.brg: Fix OP_SETRET.
2486
2487         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
2488
2489         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
2490
2491         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
2492
2493         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
2494
2495         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
2496         in one place.
2497
2498         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
2499         stuff.
2500
2501         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
2502         of the unused mono_arch_patch_delegate_trampoline stuff.
2503
2504 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
2505
2506         * basic-long.cs: Move the fp related tests to basic-float.cs.
2507
2508         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
2509
2510         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
2511
2512         * basic-calls.cs: Add a test for proper float argument passing.
2513
2514         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
2515         if the context corresponds to an exception received through a signal.
2516
2517         * exceptions.cs: Add a test for nullref handling at the start of a try
2518         clause.
2519
2520         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
2521
2522         * jit-icalls.c (mono_break): New JIT icall.
2523
2524         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
2525
2526         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
2527
2528 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
2529
2530         * cpu-*.md: Get rid of unused opcodes.
2531
2532         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
2533
2534         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
2535         by all platforms.
2536
2537         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
2538         define.
2539
2540         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
2541         the arch independent trampoline code in mini-trampolines.c.
2542
2543         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
2544
2545         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
2546
2547         * mini-s390.h: Remove an unused define.
2548         
2549         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
2550         the arch independent trampoline code in mini-trampolines.c.
2551
2552         * mini-arm.c (mono_arch_emit_prolog): Fix build.
2553
2554 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
2555
2556         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
2557
2558         * mini-s390.c (mono_arch_emit_prolog): Fix build.
2559
2560         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
2561
2562         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
2563
2564         * cpu-amd64.md: Use smaller sizes for int opcodes.
2565
2566         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
2567
2568         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
2569         objects.cs.
2570
2571         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
2572         debugging.
2573
2574         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
2575         instead of though a pointer to save an indirection when accessing elements of
2576         the array.
2577
2578         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
2579         some typos.
2580         (NOT_IMPLEMENTED): New helper macro.
2581         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
2582         of a bb.
2583
2584         * *.c: Use the new helper macro.
2585
2586 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
2587
2588         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
2589
2590 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
2591
2592         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
2593         stack slots.
2594
2595 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
2596
2597         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
2598         profiling is enabled.
2599         
2600         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
2601         the end.
2602         (mono_arch_emit_prolog): Add more first bblock optimizations.
2603
2604         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
2605         in order if possible.
2606         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
2607         bblock, since the arguments are still in their original registers.
2608
2609         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
2610
2611 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
2612
2613         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
2614         as well.
2615
2616         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
2617         offset 0.
2618
2619         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
2620
2621         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
2622         process async exceptions received while in unmanaged code.
2623
2624         * mini.c (mini_init): Install a callback with the runtime which will be called
2625         when a thread receives an async exception while in unmanaged code.
2626
2627         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
2628
2629         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
2630
2631 2008-01-16  Wade Berrier  <wberrier@novell.com>
2632
2633         * cpu-g4.md:
2634         * cpu-arm.md:
2635         * cpu-s390x.md:
2636         fix build
2637
2638 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
2639
2640         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
2641         compilation with sun cc.
2642
2643         * cpu-*.md: Fix the build.
2644
2645         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
2646
2647         * mini-amd64.h: Add some comments to the MonoLMF structure.
2648
2649         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
2650         
2651         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
2652         in the LMF structure if possible. This saves two instructions in the
2653         managed->native wrappers.
2654
2655         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
2656
2657 2008-01-16  Mark Probst  <mark.probst@gmail.com>
2658
2659         * generic-sharing.c: New type argument lookup code which uses the
2660         runtime generic context template.
2661
2662 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
2663
2664         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
2665
2666         * mini-arm.c (add_general): Fix arm eabi parameter passing.
2667         (mono_arch_output_basic_block): Fix localloc implementation.
2668
2669         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
2670
2671         * mini-ia64.c (peephole_pass): Fix ia64 build.
2672
2673         * mini-amd64.c (peephole_pass): Fix a warning.
2674         
2675         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
2676         at a constant offset from sp/fp.
2677
2678         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
2679         instead of obtaining it from *lmf in the managed method case.
2680
2681 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
2682
2683         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
2684
2685 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
2686
2687         * mini.h (MonoInstList): New type.
2688         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
2689         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
2690         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
2691         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
2692         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
2693         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
2694         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
2695         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
2696         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
2697         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
2698         MONO_INST_LIST_FOR_EACH_ENTRY,
2699         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
2700         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
2701         mono_inst_list_first, mono_inst_list_last,
2702         mono_inst_list_next, mono_inst_list_prev): New instruction
2703         list handling interfaces.
2704         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
2705         list head 'ins_list'.
2706         (MonoInst): Replace next pointer with list head 'node'.
2707         (MonoCallInst): Make 'out_args' a MonoInstList.
2708         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
2709         (MonoCompile): Delete reverse_inst_list and
2710         reverse_inst_list_len.
2711         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
2712         mono_arch_lowering_pass, mono_arch_local_regalloc,
2713         mono_arch_output_basic_block, mono_arch_emit_prolog):
2714         Convert to new instruction lists.
2715         (insert_after_ins): Delete.
2716         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
2717         instruction lists.
2718         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
2719         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
2720         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
2721         mono_emulate_opcode, mono_emit_load_got_addr,
2722         inline_method, mono_method_to_ir, mono_print_bb_code,
2723         print_dfn, decompose_pass, nullify_basic_block,
2724         replace_out_block_in_code, remove_block_if_useless,
2725         merge_basic_blocks, move_basic_block_to_end,
2726         try_unsigned_compare, optimize_branches, mono_print_code,
2727         mini_select_instructions, remove_critical_edges): Likewise.
2728         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
2729         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
2730         mono_arch_output_basic_block, mono_arch_emit_prolog):
2731         Likewise.
2732         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
2733         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
2734         mono_arch_output_basic_block): Likewise.
2735         (inst_list_prepend, insert_after_ins): Delete.
2736         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
2737         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
2738         instruction lists.
2739         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
2740         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
2741         mono_arch_emit_prolog): Likewise.
2742         * cfold.c (mono_constant_fold): Likewise.
2743         * liveness.c (visit_bb, mono_analyze_liveness,
2744         optimize_initlocals): Likewise.
2745         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
2746         * graph.c (mono_draw_code_cfg): Likewise.
2747         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
2748         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
2749         mono_ssa_cprop): Likewise.
2750         * abcremoval (get_relations_from_previous_bb, process_block):
2751         Likewise.
2752         * local-propagation (mono_cprop_invalidate_values,
2753         mono_local_cprop_bb): Likewise.
2754         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
2755         peephole_pass, mono_arch_output_basic_block,
2756         mono_arch_emit_prolog): Likewise.
2757         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
2758         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
2759         mono_arch_emit_prolog): Likewise.
2760         (insert_after_ins): Delete.
2761         * aliasing.c (print_code_with_aliasing_information,
2762         mono_build_aliasing_information, mono_aliasing_deadce):
2763         Convert to new instruction lists.
2764         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
2765         peephole_pass, NEW_INS, mono_arch_lowering_pass,
2766         mono_arch_local_regalloc, mono_arch_output_basic_block):
2767         Likewise.
2768         (insert_after_ins): Delete.
2769         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
2770         peephole_pass, mono_arch_output_basic_block): Convert to
2771         new instruction lists.
2772         * mini-codegen (InstList, inst_list_prepend,
2773         insert_after_ins): Delete.
2774         (insert_before_ins, get_register_force_spilling,
2775         get_register_spilling, free_up_ireg, free_up_reg,
2776         create_copy_ins, create_spilled_store, alloc_int_reg,
2777         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
2778         to new instruction lists.
2779         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
2780         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
2781         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
2782         (insert_after_ins): Delete.
2783         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
2784         mono_arch_local_regalloc, mono_arch_output_basic_block,
2785         mono_arch_call_opcode): Convert to new instruction lists.
2786         (insert_after_ins): Delete.
2787         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
2788         peephole_pass, mono_arch_output_basic_block,
2789         mono_arch_emit_prolog): Convert to new instruction lists.
2790
2791 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
2792
2793         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
2794
2795         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
2796         Fixes #353182.
2797
2798         * Makefile.am (version.h): Make this work with non-bash shells.
2799
2800 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
2801
2802         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
2803
2804 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
2805
2806         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
2807         the InitializeArray optimization.
2808
2809 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
2810
2811         * mini.c driver.c: Don't include os/gc_wrapper.h.
2812
2813 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
2814
2815         * mini.c (print_jit_stats): Print GC statistics if available.
2816
2817 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
2818
2819         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
2820
2821 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
2822
2823         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
2824
2825 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
2826
2827         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
2828         
2829         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
2830
2831         * driver.c (mono_main): Ditto.
2832
2833 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
2834
2835         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
2836
2837         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
2838         in the vtable can't be encoded.
2839         (compile_method): Ditto.
2840
2841 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
2842
2843         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
2844         defined.
2845
2846         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
2847         lmf->rbp.
2848
2849         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
2850         the top LMF entry belongs to the current method.
2851
2852         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
2853
2854 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
2855
2856         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
2857         
2858         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
2859
2860         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
2861
2862         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
2863
2864         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
2865
2866         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
2867         implementation.
2868
2869         * basic-float.cs: Add an ulong->double cast test.
2870
2871 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
2872
2873         * mini.c (mono_method_to_ir): Fix a warning.
2874
2875 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
2876
2877         * mini-ops.h: Add OP_SWITCH.
2878
2879         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
2880         CEE_SWITCH in back-end code, use OP_SWITCH instead.
2881
2882 2007-12-11  Geoff Norton  <gnorton@novell.com>
2883
2884         * mini-s390x.c: Minor change to the MAX() define to allow
2885         it to compile with other gcc versions.
2886
2887 2007-12-11  Geoff Norton  <gnorton@novell.com>
2888
2889         * cpu-s390x.md:
2890         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
2891
2892 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
2893
2894         exceptions-arm.c (mono_arch_get_restore_context): Restore
2895         the frame pointer.
2896
2897         exceptions-arm.c (throw_exception): Save the frame pointer.
2898         This is a partial fix for #323747. Only the client side is
2899         fixed.
2900
2901 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
2902
2903         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
2904         was using an unrelated variable to log the class which
2905         needed the cctor to be called. This was crashing on arm.
2906
2907 2007-12-09  Robert Jordan  <robertj@gmx.net>
2908
2909         * mini-x86.c (mono_arch_emit_epilog):
2910         Consider all kinds of 64-bit types. Fixes #323114.
2911
2912 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
2913
2914         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
2915
2916 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
2917
2918         * mini-amd64.c (peephole_pass): Add a missing instruction check.
2919
2920 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
2921
2922         * mini.c: run type ctor before allocating an object, not only
2923         when running it's constructor method (fixes at least part of bug #342507).
2924
2925 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
2926         
2927         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
2928         
2929         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
2930         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
2931         function.
2932
2933         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
2934         mono_generic_class_init_trampoline () the same as it is done with the other
2935         trampolines.
2936
2937         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
2938         aot-runtime.c aot-compiler.c: Implement AOT support.    
2939
2940 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2941
2942         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
2943         build for archs which don't have the vtable trampoline defined
2944         yet.
2945
2946 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
2947
2948         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
2949
2950         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
2951
2952         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
2953
2954         * tramp-<ARCH>.c: Use the new helper function.
2955
2956 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2957
2958         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
2959         trampoline call, which takes a vtable argument.
2960
2961         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
2962         OP_TRAMPCALL_VTABLEs like other calls.
2963
2964         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
2965         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
2966         call.  Implemented a support function which fetches the vtable
2967         from a register set.
2968
2969         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
2970         Implemented a generic class init trampoline, using the
2971         OP_TRAMPCALL_VTABLE opcode.
2972
2973         * mini.c: Implemented static field access when sharing generic
2974         code.  This implies initing the class using the new
2975         OP_TRAMPCALL_VTABLE call.
2976
2977 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2978
2979         * mini.c: Don't compile methods with sharing enabled if their
2980         classes are disabled for sharing.
2981
2982 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
2983
2984         * inssel.brg: Add a missing sign extension to the GETCHR and array access
2985         opcodes. Fixes #346563.
2986
2987         * objects.cs: Add a new test.
2988
2989         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
2990
2991         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
2992         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
2993
2994 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
2995
2996         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
2997
2998 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
2999
3000         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
3001         code stream.
3002
3003 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
3004
3005         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
3006
3007         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
3008         optimization in the AOT case.
3009         
3010 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
3011
3012         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
3013         
3014         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
3015
3016         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
3017
3018         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
3019
3020         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
3021         is created by the inlined delegate ctor.
3022
3023         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
3024
3025         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
3026
3027 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
3028
3029         * cpu-x86.md: Fix the length of ckfinite.
3030
3031 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
3032
3033         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
3034         
3035         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
3036         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
3037
3038         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
3039
3040         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
3041         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
3042
3043 2007-11-28  Martin Baulig  <martin@ximian.com>
3044
3045         * mini-x86.c
3046         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
3047         after creating the trampoline.
3048
3049 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
3050
3051         * aot-runtime.c (load_aot_module): Check runtime version if needed.
3052
3053         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
3054         the same version.
3055
3056         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
3057         instead of the calling method to help AOT.
3058
3059         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
3060
3061 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
3062
3063         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
3064         is defined.
3065
3066 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
3067
3068         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
3069         
3070         * aot-compiler.c (compile_method): Correct check for generic method definitions.
3071         (encode_method_ref): No need to handle generic method definitions specially.
3072
3073         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3074
3075         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
3076         decode_klass_info.
3077
3078         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
3079         encode_klass_info.
3080         (compile_method): Enable generic sharing.
3081
3082 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
3083
3084         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
3085         (mini_method_compile): Add preliminary support for AOTing shared generic code.
3086
3087         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
3088         generic code.
3089
3090         * mini-trampolines.c: Fix a warning.
3091
3092         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
3093         NEW_PCONST.
3094         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
3095         (generic_class_is_reference_type): Remove unused function.
3096
3097         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
3098         in the generic vtable trampoline case.
3099
3100         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
3101         
3102         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
3103         return an AOT method based on a vtable slot.
3104
3105         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
3106
3107         * mini.c (mini_get_vtable_trampoline): Export this.
3108
3109 2007-11-22  Martin Baulig  <martin@ximian.com>
3110
3111         * debug-debugger.h
3112         (MonoDebuggerInfo): Move `debugger_version' up.
3113
3114 2007-11-22  Martin Baulig  <martin@ximian.com>
3115
3116         * mini-amd64.c
3117         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
3118
3119         * mini-trampolines.c
3120         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
3121         after compiling the method.
3122
3123 2007-11-20  Martin Baulig  <martin@ximian.com>
3124
3125         * debug-mini.c
3126         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
3127         (mono_debugger_remove_breakpoint): Likewise.
3128         (mono_debugger_check_breakpoints): Likewise.
3129
3130         * debug-debugger.c: Implement the new breakpoint interface here.
3131
3132 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
3133
3134         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
3135         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
3136
3137         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
3138
3139 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
3140
3141         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
3142
3143         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
3144         mini.c.
3145
3146         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
3147         mini.c.
3148
3149         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
3150         returning a vtype in a register.
3151
3152         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
3153         here from the arch specific code.
3154
3155         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
3156         mini.c.
3157
3158         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
3159         (mono_arch_emit_prolog): Increment maximum prolog size.
3160
3161         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
3162         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
3163
3164         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
3165         MonoGenericSharingContext.
3166
3167         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
3168         MonoGenericSharingContext. Allocate memory from the cfg mempool.
3169
3170 2007-11-15  Mark Probst  <mark.probst@gmail.com>
3171
3172         * mini.c, mini.h, generic-sharing.c: Functions for producing code
3173         which extract fields out of the runtime generic context.  Full
3174         sharing of the NEWARR opcode.
3175
3176 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3177
3178         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
3179         --enable-minimal=ssa.
3180
3181 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
3182
3183         * mini-trampolines.c (mono_delegate_trampoline): Update after 
3184         mono_marshal_get_delegate_invoke () signature change.
3185
3186 2007-11-13  Mark Probst  <mark.probst@gmail.com>
3187
3188         * mini.c: Removed the shared context in favor of the generic
3189         sharing context.  Allocate the MonoJitInfo structure with room for
3190         the generic sharing context if it's needed.
3191
3192         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
3193         domain-internals.h now.
3194
3195         * mini-x86.c: Pass the generic sharing context to get_call_info ().
3196
3197         * generic-sharing.c: Several changes for working without a shared
3198         context and instead operating on open types instead.
3199
3200 2007-11-12  David S. Miller  <davem@davemloft.net>
3201
3202        * inssel-sparc.brg: Fix double instruction emit.
3203
3204 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
3205
3206         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
3207         Get/Set/Address methods.
3208         
3209         * mini.c debug-debugger.c mini-trampolines.c: Update after 
3210         mono_marshal_get_delegate_invoke signature change.
3211
3212 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
3213
3214         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
3215         This can happens with dynamic methods. Fixes the other bug in #322722.
3216
3217 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
3218
3219         * tramp-arm.c (mono_arch_patch_callsite): Support patching
3220         BX call sequence.
3221
3222         * mini-arm.c (arm_patch): Implement patching of BX call
3223         sequence. Fixes one of the bugs in #322722.
3224
3225 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
3226
3227        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
3228        under Linux.  We only need to flush every 32-byte cache line.    
3229
3230 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
3231
3232         * mini.c:
3233         move_basic_block_to_end: Add branches when needed, eventually creating
3234         a new BB.
3235         optimize_branches: added a parameter that tells if it's ok to create
3236         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
3237         and avoid calling move_basic_block_to_end when it's not ok.
3238         Fixes bug 318677.
3239
3240 2007-11-07  Mark Probst  <mark.probst@gmail.com>
3241
3242         * mini.c: Abort inlining call to InitializeArray if something
3243         looks wrong.  Let the icall handle it, which now has proper safety
3244         checks.
3245
3246 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
3247
3248         * mini.c (mono_spill_call): add support for soft-float.
3249
3250         * mini.c (mono_method_to_ir): add support for soft-float
3251         to inlined functions that return float.
3252
3253         * mini.c (mono_method_to_ir): add support for soft-float
3254         to cee_stsfld opcode on float fields.
3255
3256 2007-11-05  Geoff Norton  <gnorton@novell.com>
3257
3258         * mini-x86.h: Fix the structure access for X86 Leopard.
3259
3260
3261 2007-11-05  Martin Baulig  <martin@ximian.com>
3262
3263         * mini-trampolines.c
3264         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
3265         after compiling the method to notify the debugger.
3266
3267 2007-11-05  Martin Baulig  <martin@ximian.com>
3268
3269         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
3270
3271 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
3272
3273         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
3274         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
3275
3276 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
3277
3278         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
3279         native-to-managed wrappers.
3280         
3281 2007-11-01  Geoff Norton  <gnorton@novell.com>
3282
3283         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
3284         members.
3285
3286 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
3287
3288         * mini.c, mini-x86.c: when getting back from unmanaged code
3289         to managed via a marshaled delegate we also need to set the
3290         right domain.
3291
3292 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3293
3294         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
3295         for amd64.
3296
3297 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3298
3299         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
3300         let the debugger or other external agents to tell the JIT when
3301         a sw breakpoint has been inserted in the code that the JIT needs
3302         to be able to inspect.
3303
3304 2007-10-31  Martin Baulig  <martin@ximian.com>
3305
3306         * debug-debugger.h
3307         (MonoDebuggerInfo): Remove `runtime_class_init'.
3308
3309 2007-10-30  Martin Baulig  <martin@ximian.com>
3310
3311         * debug-mini.h
3312         (mono_debugger_thread_created): Added `MonoThread *' argument.
3313         (mono_debugger_extended_notification): New public method.
3314         (mono_debugger_trampoline_compiled): New public method.
3315
3316         * debug-mini.c
3317         (MonoDebuggerThreadInfo): Added `thread' and
3318         `extended_notifications' fields.
3319
3320         * debug-debugger.c
3321         (debugger_executable_code_buffer): New static variable.
3322
3323         * debug-debugger.h
3324         (MonoDebuggerInfo): Added `executable_code_buffer',
3325         `executable_code_buffer_size', `breakpoint_info_area',
3326         `breakpoint_table' and `breakpoint_table_size'.
3327
3328 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
3329
3330         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
3331         that IP  either is an unused value or the vtable pointer. IMT 
3332         calls use vtable + offset now. Reduced by almost half the size
3333         of IMT entries.
3334
3335 2007-10-26  Jonathan Chambers <joncham@gmail.com>
3336
3337         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
3338         defines to access param registers. Replace long usage with
3339         gsize as sizeof(long) != sizeof(void*) on Win64.
3340
3341         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
3342         on Win64. Fix intrinsic, use _AddressOfReturnAddress
3343         instead of non-existant _GetAddressOfReturnAddress.
3344
3345         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
3346         param registers. Save/restore %rdi and %rsi in MonoLMF.
3347
3348         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
3349         param registers. Modify (throw_exception) signature to take 
3350         %rdi and %rsi on Win64. 
3351
3352         Code is contributed under MIT/X11 license.
3353
3354 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3355
3356         * helpers.c: unlink debugging output files.
3357
3358 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
3359
3360         * mini.c: Move mono_create_ftnptr () to object.c.
3361
3362 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
3363
3364         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
3365         optional. This function can now be used to disassemble code generated
3366         outside the JIT such as trampolines and IMT thunks.
3367
3368         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
3369
3370         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
3371         vtable pointer from a ldr instruction.
3372
3373         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
3374         new IMT call sequence.
3375
3376         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
3377         call sequence for interface invocations.
3378
3379         * mini-arm.c (mono_arch_emit_imt_argument): added, required
3380         for imt support. This function is empty since IMT on ARM requires no
3381         special handling on the IR side.
3382
3383         * mini-arm.c (mono_arch_find_imt_method): added, required for
3384         imt support.
3385
3386         * mini-arm.c (mono_arch_find_this_argument): added, required
3387         for imt support.
3388
3389         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
3390         a ldr instruction to load a value stored in the code stream.
3391
3392         * mini-arm.c (mono_arch_build_imt_thunk):added, required
3393         for imt support.
3394
3395
3396 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
3397
3398         * mini.c (mini_init): Install the jump trampoline callback.
3399
3400 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3401
3402         * mini-trampolines.c: handle synchronized methods with the common
3403         vtable trampoline (bug #335601).
3404
3405 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
3406
3407         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
3408
3409         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
3410         64 bit platforms.
3411
3412         * mini-ia64.h mini-ia64.c: Add support for IMT.
3413
3414         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
3415         prolog. Fixes #331958.
3416
3417 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
3418
3419         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
3420
3421 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3422
3423         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
3424         trampoline.
3425
3426 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3427
3428         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
3429         trampoline.
3430
3431 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
3432
3433         * mini-x86.c, mini-x86.h: x86 support for the common vtable
3434         trampoline.
3435
3436 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
3437
3438         * mini-trampolines.c: changed the magic rampoline to understand
3439         the common vtable trampoline method: the method to invoke is
3440         determined by the vtable displacement of the call.
3441
3442 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3443
3444         * mini.c, mini.h: register the common vtable trampoline if the
3445         architecture supports it.
3446
3447 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3448
3449         * cpu-amd64.md: use the correct max length for tls_get.
3450
3451 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
3452
3453         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
3454         CEE_STELEM_ANY. Fixes #333696.
3455
3456 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
3457
3458         * exceptions-x86.c: provide more graceful handling of the case where
3459         we followed a bogus function pointer from managed code (bug #332866).
3460
3461 2007-10-11  Mark Probst  <mark.probst@gmail.com>
3462
3463         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
3464         replaces the generic_shared flag and will carry more information
3465         in the future.
3466
3467         * generic-sharing.c: Added mini_type_stack_size() which allows
3468         allows open types if given a generic sharing context.
3469         mini_get_basic_type_from_generic() takes a
3470         MonoGenericSharingContext* instead of a MonoCompile* now.
3471
3472         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
3473         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
3474         mini-sparc.c, mini-x86.c: Trivial changes required by the two
3475         changes above.  Just passing arguments through to the right
3476         places.
3477
3478 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
3479
3480         * mini-arm.c: unify the call emission to emit_code_seq().
3481
3482 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
3483
3484         * tramp-arm.c: reduced the trampoline size.
3485
3486 2007-10-10  Mark Probst  <mark.probst@gmail.com>
3487
3488         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
3489         variable handling out of arch-specific code.
3490
3491 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
3492
3493         * mini-arm.c: implemented fast delegate dispatch.
3494
3495 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
3496
3497         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
3498         that fp elimination is turned off if the space required by locals is too
3499         big. Fixes #331958.
3500
3501 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3502
3503         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
3504         ARM to the new style trampoline.
3505
3506 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
3507
3508         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
3509
3510         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
3511
3512 2007-10-09  Martin Baulig  <martin@ximian.com>
3513
3514         * debug-debugger.h
3515         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
3516         `field_info_offset_offset'.     
3517
3518 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
3519
3520         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
3521         removed more internal usage of the r11 register and made it available
3522         to the register allocator.
3523
3524 2007-10-08  Mark Probst  <mark.probst@gmail.com>
3525
3526         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
3527         when sharing generics and treat type variables as references.
3528
3529 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
3530
3531         * mini-ppc.c: started removing the internal uses of register r11
3532         to eventually allow the register allocator to manage it as an
3533         additional available register.
3534
3535 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
3536
3537         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
3538
3539 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
3540
3541         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
3542         specific trampolines as they are not performance critical as a jump
3543         target (maybe align as before only for AOT code?). This saves about
3544         200 KB of native code on x86 for monodevelop startup.
3545
3546 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
3547
3548         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
3549         monodevelop startup.
3550
3551 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
3552
3553         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
3554
3555         * mini-sparc.h mini-sparc.c: Implement IMT support.
3556
3557         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
3558         its smaller and doesn't clobber sparc_g1.
3559
3560         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
3561
3562 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
3563
3564         * mini-ppc.c: optimized the size of the IMT thunks a bit.
3565
3566 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
3567
3568         * mini-ppc.c: implemented fast delegate invocation.
3569
3570 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
3571
3572         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
3573
3574 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
3575
3576         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
3577         code to the new style trampoline in preparation for IMT support.
3578
3579 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
3580
3581         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
3582         systems already. This also reduces the specific trampiline sizes and
3583         prepares for the use of r12 as the IMT identifier register.
3584
3585 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3586
3587         * mini-mips.h: endianess fix (simplified from a patch by
3588         Thomas Kunze <thommy@tabao.de>, bug #323737).
3589
3590 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
3591
3592         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
3593         to access ucontext fields and enable netbsd support
3594         (partially from Magnus Henoch <mange@freemail.hu>).
3595
3596 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3597
3598         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
3599         use the preprocessor from the CPP env var if it is set.
3600
3601 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
3602
3603         * mini-trampolines.c: fixed an assertion and moved it earlier in the
3604         code, before interface_offset gets used.
3605
3606 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
3607
3608         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
3609         mono_class_setup_vtable () before accessing klass->vtable.
3610
3611 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
3612
3613         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
3614         hackish.
3615
3616 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3617
3618         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
3619         IMT slots (this saves hundreds of KB of memory in programs like
3620         IronPython and Monodevelop).
3621
3622 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
3623
3624         * mini.c: print the delegate counter.
3625
3626 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
3627
3628         * mini-x86.c: make it easier to enable the debugging code for IMT
3629         slots.
3630
3631 2007-09-28  Martin Baulig  <martin@ximian.com>
3632
3633         * debug-debugger.h
3634         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
3635         `mono_method_klass_offset' and `mono_method_token_offset'.
3636
3637 2007-09-20  Mark Probst  <mark.probst@gmail.com>
3638
3639         * mini.c: First generics sharing implementation.  Can only share
3640         in very simple cases.  If sharing doesn't work it falls back to
3641         dedicated compilation.
3642
3643         * mini.h: Flag in MonoCompile to specify whether generic
3644         compilation is shared.  Flags enum for marking which generic inst
3645         of a context is used.  Prototypes for helper functions.
3646
3647         * generic-sharing.c: Helper functions for generic method sharing.
3648
3649         * optflags-def.h: Optimization flag (gshared) for enabling generic
3650         method sharing added.
3651
3652         * Makefile.am: generic-sharing.c added.
3653
3654 2007-09-19 Daniel Nauck <dna@mono-project.de>
3655
3656         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
3657
3658 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
3659         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
3660         fixes bug 325507.
3661
3662 2007-09-19  Martin Baulig  <martin@ximian.com>
3663
3664         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
3665         mono_debug_cleanup() is now part of mono_cleanup().
3666
3667 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
3668
3669         * driver.c (mono_main): Fix a warning.
3670
3671 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
3672
3673         * aot-compiler.c: Optimize various parts when processing large assemblies.
3674         Fixes ##325568.
3675
3676         * mini.c (mono_patch_info_hash): Improve hash function.
3677
3678 2007-09-14  Jonathan Chambers <joncham@gmail.com>
3679
3680         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
3681         
3682         Code is contributed under MIT/X11 license.
3683
3684 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
3685
3686         * mini.c (mini_init): Fix a leak.
3687
3688         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
3689
3690 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3691
3692         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
3693
3694 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
3695
3696         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
3697
3698 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
3699
3700         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
3701         variance tests.
3702
3703         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
3704
3705         * mini.c (handle_alloc): Enable managed allocators in AOT code.
3706
3707         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
3708
3709         * aot-runtime.c (decode_patch_info): Ditto.
3710
3711 2007-09-12  Jonathan Chambers <joncham@gmail.com>
3712
3713         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
3714         static case. Cache delegates in architecture specific code, 
3715         based on number of parameters.
3716         
3717         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
3718         in architecture specific code, based on number of parameters.
3719         
3720         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
3721         caching happen in architecture specific code now.
3722         
3723         Code is contributed under MIT/X11 license.
3724
3725 2007-09-12  Jonathan Chambers <joncham@gmail.com>
3726
3727         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
3728         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
3729         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
3730
3731         Code is contributed under MIT/X11 license.
3732
3733 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
3734         * mini.c: (mono_thread_abort) Fixed bug #82416.
3735
3736 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
3737
3738         * mini.: hook the new managed GC allocation feature into the JIT.
3739
3740 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
3741
3742         * mini.c: implementation for the new runtime tls opcode.
3743
3744 2007-09-11  Martin Baulig  <martin@ximian.com>
3745
3746         * debug-debugger.h
3747         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
3748         `mono_method_inflated_offset'.
3749
3750 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
3751
3752         * driver.c mini.h mini.c: Add a new devel command line option for injecting
3753         async exceptions into a method.
3754
3755         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
3756         purpose of testing whenever the unwinder works at every instruction.
3757
3758 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
3759
3760         * mini.c: check accessibility of method used in ldftn (fixes
3761         bug #82635).
3762
3763 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
3764
3765         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
3766
3767         * inssel.brg: Fix a warning.
3768
3769 2007-09-03  Martin Baulig  <martin@ximian.com>
3770
3771         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
3772         now takes the `main_method' as argument.
3773
3774 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
3775
3776         * cpu-sparc.md (endfilter): Add missing src1:i argument.
3777
3778 2007-08-30  Jonathan Chambers <joncham@gmail.com>
3779
3780         * driver.c: include the cil-coff.h header on Windows.
3781         
3782         Code is contributed under MIT/X11 license.
3783
3784 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
3785
3786         * mini.c, driver.c: don't include the cil-coff.h header.
3787
3788 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
3789
3790         * mini.c: flag places that needs fixes fo soft-float support.
3791
3792 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
3793
3794         * mini.h, inssel-float.brg: fix soft-float constant loads on big
3795         endian systems (partially from Dean Jenkins, bug #81924).
3796
3797 2007-08-28  Mark Probst  <mark.probst@gmail.com>
3798
3799         * mini.c (check_linkdemand): Remove embedded reference object in
3800         call to LinkDemandSecurityException.
3801         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
3802         with an IntPtr instead of a reference object.
3803
3804 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
3805
3806         * mini.c (handle_initobj): Handle alignment properly.
3807
3808         * inssel.brg (mini_emit_memset): Ditto. 
3809
3810         * inssel.brg (mini_emit_memcpy): Ditto. 
3811
3812         * inssel-sparc.brg: Ditto.              
3813
3814         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
3815
3816 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
3817
3818         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
3819         exceptions raised in unmanaged code. Fixes part of #82594.
3820
3821 2007-08-24  Mark Probst  <mark.probst@gmail.com>
3822
3823         * mini.c (mono_method_to_ir), declsec.c
3824         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
3825
3826 2007-08-22  Martin Baulig  <martin@ximian.com>
3827
3828         * debug-mini.h
3829         (MonoDebuggerThreadInfo): New typedef.
3830         (mono_debugger_thread_table): New global variable.
3831         (mono_debugger_thread_created): New public function.
3832         (mono_debugger_thread_cleanup): New public function.
3833
3834         * debug-debugger.h
3835         (MonoDebuggerInfo):
3836         - removed `get_current_thread' and `lookup_assembly'.
3837         - removed `data_table'.
3838         - added `thread_table'.
3839
3840         * mini.c
3841         (mono_thread_start_cb): Call mono_debugger_thread_created().
3842         (mono_thread_attach_cb): Likewise.
3843         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
3844         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
3845         initial domain.
3846
3847         * driver.c (mono_main): Move mono_debug_init() up, before calling
3848         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
3849
3850 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3851
3852         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
3853         together when passing several arguments of type double (gives a small
3854         speedup and saves a few bytes of generated code).
3855
3856 2007-08-20  Jb Evain  <jbevain@novell.com>
3857
3858         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
3859
3860 2007-08-20  Jb Evain  <jbevain@novell.com>
3861
3862         * mini.c (mono_method_to_ir): throw MethodAccessException
3863         and FieldAccessException instead of InvalidProgramException.
3864
3865 2007-08-20  Mark Probst  <mark.probst@gmail.com>
3866
3867         * mini.c: CoreCLR security checks.
3868
3869         * mini.h: Removed MonoSecurityMode (moved to
3870         metadata/security-manager.h) and mono_security_mode global var
3871         (replaced by set/get functions in security-manager.h).
3872
3873         * driver.c: Added "core-clr-test" security mode for testing.  Used
3874         set-function for setting security mode.
3875
3876 2007-08-17  Mark Probst  <mark.probst@gmail.com>
3877
3878         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
3879         the new jit_info_table.
3880
3881         * driver.c: Test code for the new jit_info_table (enabled by the
3882         define MONO_JIT_INFO_TABLE_TEST).
3883
3884 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
3885
3886         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
3887         detection of call <REG> instruction sequence. Fixes build on freebsd.
3888
3889 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
3890
3891         * mini-exceptions.c: Fix a warning.
3892
3893 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
3894
3895         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
3896         stack overflow handling code on amd64 too.
3897
3898         * mini-exceptions.c (mono_setup_altstack): Make this use 
3899         mono_thread_get_stack_bounds ().
3900
3901         * mini-x86.h: Disable sigaltstack on solaris x86.
3902
3903 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
3904
3905         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
3906
3907 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
3908
3909         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
3910
3911 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
3912
3913         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
3914
3915         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
3916
3917 2007-08-03  Neale Ferguson <neale@sinenomine.net>
3918
3919         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
3920         due to alignment.
3921
3922 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
3923
3924         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
3925         to be emitted (bug #82281).
3926
3927 2007-08-01  Martin Baulig  <martin@ximian.com>
3928
3929         Merged the `debugger-dublin' branch.
3930
3931         * debug-debugger.h (MonoDebuggerInfo):
3932         Removed the `old_*' compatibility entries.
3933         Added `debugger_version' and `data_table'.
3934         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
3935         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
3936
3937         * debug-mini.c
3938         (MiniDebugMethodBreakpointInfo): Add `address_list'.
3939         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
3940         instead of a `gconstpointer'.
3941         (mono_debugger_insert_method_breakpoint): Return a
3942         `MonoDebugMethodAddressList *'.
3943
3944 2007-06-28  Martin Baulig  <martin@ximian.com>
3945
3946         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
3947
3948 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
3949
3950         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
3951         __builtin_frame_address () since it is broken on older gcc versions.
3952
3953 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
3954
3955         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
3956         on the stack overflow handling and made the managed stack overflows
3957         catchable in most cases using soft guard pages.
3958         * exceptions-x86.c: added code to restore the protection in the soft
3959         guard pages at the end of exception handling.
3960
3961 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
3962
3963         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
3964
3965 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3966
3967         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
3968         exception handling.
3969
3970 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3971
3972         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
3973         signal handling support until it has been ported to the new mechanism.
3974         * mini.c: fixed stack overflow detection and use the new
3975         architecture code  to handle signals on the altstack.
3976
3977 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
3978
3979         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
3980         stack overflows on the alt stack.
3981
3982 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
3983
3984         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
3985         stack overflows on the alt stack.
3986
3987 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
3988
3989         * exceptions-ppc.c: cleanup preparing for altstack support.
3990
3991 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3992
3993         * exceptions-arm.c: cleanup preparing for altstack support.
3994
3995 2007-07-27  Mark Probst  <mark.probst@gmail.com>
3996
3997         * mini.c (print_jit_stats): Output hazard pointer stats.
3998
3999 2007-07-26  Mark Probst  <mark.probst@gmail.com>
4000
4001         * driver.c, mini.c: Replaced security mode flags with a single
4002         enum variable.
4003
4004 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4005
4006         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
4007
4008 2007-07-25  Mark Probst  <mark.probst@gmail.com>
4009
4010         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
4011         (which doesn't do anything yet) for activating Core CLR
4012         (Silverlight) security.
4013
4014 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
4015
4016         * mini-codegen.c: work around a possible gcc bug on arm.
4017
4018 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4019
4020         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
4021         message for platforms that don't support AOT compilation.
4022
4023 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4024
4025         * mini.h, mini.c, driver.c: temporary smcs hack.
4026
4027 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
4028
4029         * mini-arm.h, mini-arm.c: arm EABI fixes.
4030
4031 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
4032
4033         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
4034         case.
4035
4036         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
4037         trampolines taking a method argument.
4038
4039         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
4040
4041         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
4042         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
4043
4044         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
4045         JIT compilation throws an exception. Fixes #82050.
4046
4047 2007-07-19  Mark Probst  <mark.probst@gmail.com>
4048
4049         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
4050         with the MONO_EXCEPTION_ defines.
4051
4052 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
4053
4054         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
4055         #82117.
4056         
4057         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
4058         the cause of an assertion.
4059
4060 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
4061
4062         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
4063         removed.
4064
4065 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
4066
4067         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
4068         assert. Should fix #82103.
4069
4070 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
4071
4072         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
4073         here too. Fixes #82095.
4074
4075         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
4076         addresses.
4077
4078         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
4079
4080         * mini-amd64.h: Enable IMT for amd64.
4081         
4082         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
4083
4084 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
4085
4086         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
4087
4088 2007-07-12  Mark Probst  <mark.probst@gmail.com>
4089
4090         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
4091         as soon as check_linkdemand sets an exception_type.
4092
4093 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
4094
4095         * mini-x86.c: fixed offsets for IMT call sequence.
4096         * mini-x86.h: enable IMT again.
4097
4098 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
4099
4100         * trace.c (mono_trace_enter_method): Decode MonoType too.
4101
4102         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
4103
4104         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
4105
4106         * mini-amd64.c: Add preliminary IMT implementation.
4107         
4108 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
4109
4110         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
4111         understand the new IMT-base interface invocation (thanks to
4112         Daniel Nauck for the report and the remote debugging session).
4113
4114 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4115
4116         * mini-x86.c: size and speed optimizations for the IMT bsearch.
4117
4118 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
4119
4120         * Makefile.am (aotcheck): Make this actually use the AOTed code.
4121
4122 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
4123
4124         * mini-trampolines.c: implement AOT IMT support.
4125         * mini-x86.h: enable IMT support for wider testing.
4126
4127 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
4128
4129         * inssel.brg (emit_imt_argument): Add aot support here.
4130
4131         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
4132
4133 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4134
4135         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
4136         of the IMT implementation, partially from massi, with my
4137         implementation of the bsearch sequence. Disabled by default until
4138         the AOT code is implemented.
4139
4140 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
4141
4142         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
4143
4144         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
4145
4146 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4147
4148         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
4149         arch-independent IMT JIT code from Massimiliano
4150         Mantione (massi@ximian.com) with small cleanups from me.
4151
4152 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
4153
4154         * Makefile.am: fix svn invocation to get the svn revision to be
4155         independent of the local language (build fix).
4156
4157 2007-07-09  Mark Probst  <mark.probst@gmail.com>
4158
4159         * mini.c (inline_method): Reset cfg->exception_type if the
4160         inlining is aborted.  Fixes: 82049.
4161
4162 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
4163
4164         * mini.c: remove assert from exception handling code when exception_ptr
4165         is not set.
4166
4167 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
4168
4169         * mini.c (mono_codegen): Add an assert.
4170
4171         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
4172         enter and leave code.
4173         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
4174
4175 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4176
4177         * mini-ppc.c: fixed memory corruption for localloc(0)
4178         (bug #81852).
4179
4180 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
4181         
4182         * mini.c: Fix warnings.
4183
4184 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
4185
4186         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
4187         to emit better double->int conversions.
4188
4189 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4190
4191         * mini.c: the provided Min/Max optimizations are valid for unisgned
4192         ints.
4193
4194 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
4195
4196         * 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
4197
4198 2007-06-28  Miguel de Icaza  <miguel@novell.com>
4199
4200         * mini.c (mono_running_on_valgrind): Add support for reporting the
4201         method and  its boundaries to valgrind.
4202
4203 2007-06-28  Martin Baulig  <martin@ximian.com>
4204
4205         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
4206
4207 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
4208
4209         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
4210
4211         * generic.2.cs: Add new test case.
4212
4213 2007-06-25  Martin Baulig  <martin@ximian.com>
4214
4215         Merged the `debugger-dublin' branch.
4216
4217         * debug-mini.c
4218         (mono_debugger_insert_method_breakpoint): New public method.
4219         (mono_debugger_remove_method_breakpoint): Likewise.
4220         (mono_debugger_check_breakpoints): New static method.
4221         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
4222
4223         * debug-debugger.h (MonoDebuggerInfo):
4224         Renamed (to keep backward compatibility in the vtable):
4225         `insert_breakpoint' -> `old_insert_breakpoint'.
4226         `remove_breakpoint' -> `old_remove_breakpoint'.
4227         `create_string' -> `old_create_string'.
4228         `lookup_class' -> `old_lookup_class'.
4229         `lookup_type' -> removed; changed into a dummy field.
4230         `lookup_assembly' -> `old_lookup_assembly'.
4231         Added (same functionality, but different signature):
4232         `create_string', `lookup_class', `lookup_assembly'
4233         Added new:
4234         `get_method_addr_or_bpt', `remove_method_breakpoint',
4235         `runtime_class_init'.
4236
4237         * debug-debugger.c: Merged the `debugger-dublin' branch.
4238
4239 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
4240
4241         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
4242         well.
4243         (peephole_pass): Likewise.
4244
4245 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
4246
4247         * driver.c: hopefully make setaffinity work also for ancient
4248         versions of linux.
4249
4250 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
4251
4252         * driver.c : win32 build fix.
4253
4254 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
4255
4256         * driver.c: check for the MONO_NO_SMP env var and bind to a single
4257         processor if it is set.
4258
4259 2007-06-21  Martin Baulig  <martin@ximian.com>
4260
4261         * debug-mini.h: New file.
4262
4263         * debug-mini.c
4264         (mono_debugger_insert_breakpoint_full): Moved here from
4265         ../metadata/mono-debug-debugger.c.
4266         (mono_debugger_remove_breakpoint): Likewise.
4267         (mono_debugger_breakpoint_callback): Likewise.
4268
4269 2007-06-15  Raja R Harinath  <rharinath@novell.com>
4270
4271         * jit-icalls.c (mono_helper_compile_generic_method): Update to
4272         changes in MonoGenericClass.
4273
4274 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
4275
4276         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
4277
4278 2007-06-14  Raja R Harinath  <rharinath@novell.com>
4279
4280         * jit-icalls.c (mono_helper_compile_generic_method): Update to
4281         removal of MonoGenericMethod.
4282
4283 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4284
4285         * mini-exceptions.c: hooks for the exception events profiling API.
4286
4287 2007-06-14  Randolph Chung  <tausq@debian.org>
4288
4289         * Makefile.ma: Add hppa target.
4290         * mini-arch.h: Include mini-hppa.h
4291         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
4292         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
4293         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4294
4295 2007-06-14  Randolph Chung  <tausq@debian.org>
4296
4297         * inssel.brg: Add rules for "chained" compare-branch operations so that
4298         a single compare op can affect multiple branches.  Adjust cost for
4299         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
4300         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
4301         cost for some rules so that they can more easily be overridden by
4302         per-arch rules (with fixes from lupus).
4303         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4304
4305 2007-06-13  Randolph Chung  <tausq@debian.org>
4306
4307         * mini-ops.h: Reorder branch ops so that they match the order of the
4308         corresponding CEE_* ops.  The code expects them this way.
4309         Add new ops for HPPA target.
4310         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4311
4312 2007-06-13  Randolph Chung  <tausq@debian.org>
4313
4314         * mini-exceptions.c: Handle cases where the stack grows towards
4315         larger addresses.
4316         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4317
4318 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
4319
4320         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
4321         counter.
4322         * driver.c: explain where a non-matching corlib is found.
4323
4324 2007-06-13  Mark Probst  <mark.probst@gmail.com>
4325
4326         * mini.c (print_jit_stats): Output dynamic code allocation stats.
4327
4328 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
4329
4330         * mini-exceptions.c: Generate a method profile leave event during
4331         an exception to ensure that the profiler gets notified.
4332
4333 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
4334
4335         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
4336         branch.
4337
4338         * cpu-amd64.md: Add long_and/or/xor opcodes.
4339
4340 2007-06-06  Wade Berrier  <wberrier@novell.com>
4341
4342         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
4343         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
4344         length of instruction shr_imm (expected 8, got 10)
4345
4346 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
4347
4348         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
4349
4350 2007-06-06  Mark Probst  <mark.probst@gmail.com>
4351
4352         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
4353         MonoInternalHashTable again (fixed bug in the internal hash table
4354         code).
4355
4356 2007-06-06  Mark Probst  <mark.probst@gmail.com>
4357
4358         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
4359         Have to figure out what makes it crash the SWF regression.
4360
4361 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
4362
4363         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
4364
4365 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4366
4367         * mini.c: optimize out the type check when storing null in a
4368         reference array.
4369
4370 2007-06-04  Mark Probst  <mark.probst@gmail.com>
4371
4372         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
4373         MonoInternalHashTable.
4374
4375 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
4376
4377         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
4378         signed integer methods.
4379
4380 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
4381
4382         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
4383         permanently since the current approach doesn't work.
4384
4385 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
4386
4387         * inssel.brg (stmt): Only call delegate->invoke_impl if 
4388         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
4389
4390 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
4391
4392         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
4393         the sreg2==rdx case.
4394         
4395         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
4396         account if it contains a rex prefix.
4397         (peephole_pass): Handle OP_FMOVE as well.
4398
4399 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
4400
4401         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
4402         as it causes regressions.
4403
4404 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
4405
4406         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
4407         static case as well.
4408
4409         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
4410
4411         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
4412         (mono_arch_get_this_arg_from_call): Ditto.
4413
4414         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
4415
4416         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
4417         invoke_impl field.
4418
4419         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
4420         (mono_arch_get_this_arg_from_call): Ditto.
4421
4422         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
4423         
4424         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
4425         try to create optimized invoke code and use that for further invocations. 
4426         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
4427
4428         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
4429
4430 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
4431
4432         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
4433         sealed classes or methods.
4434         *devirtualization.cs: tests for the new optimization
4435
4436 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
4437
4438         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
4439         by the update_volatile () function.
4440
4441 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
4442
4443         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
4444         require it.
4445
4446         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
4447
4448 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
4449
4450         * mini.c: Add configure checks for header files.
4451         * mini-x86.c: Add configure checks for header files.
4452         * trace.c: Add configure checks for header files.
4453         * aot-runtime.c: Add configure checks for header files.
4454         * aot-compiler.c: Add configure checks for header files.
4455         * driver.c: Add configure checks for header files.
4456         * mini-codegen.c: Add configure checks for header files.
4457         
4458         Code is contributed under MIT/X11 license.
4459
4460 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
4461
4462         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
4463         icompare_imm -128 + op_iclt. Fixes #81703.
4464
4465 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
4466
4467         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
4468
4469 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
4470
4471         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
4472         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
4473         so that all isinst checks now use "interface_bitmap".
4474
4475 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
4476
4477         * cpu-amd64.md (jmp): Fix a warning.
4478
4479         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
4480
4481         * basic.cs: Add new regression test.
4482
4483         * basic.cs: Remove test which is now in basic-long.cs.
4484
4485         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
4486
4487         * basic-long.cs: Add new test.
4488         
4489 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
4490
4491         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
4492
4493 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
4494
4495         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
4496
4497         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
4498         places.
4499         
4500         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
4501         throwing code a bit.
4502
4503         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
4504         the exception throwing code a bit.
4505
4506         * mini-x86.c (get_call_info): Allocate result from a mempool.
4507
4508 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
4509
4510         * aot-compiler.c (find_typespec_for_class): Fix the assert.
4511
4512         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
4513
4514         * mini.h (MonoCompile): Add 'token_info_hash' field.
4515
4516         * mini.c: Save token->method associations during compilation so the AOT 
4517         compiler can use it.
4518         
4519         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
4520         which reference generic classes and methods.
4521
4522 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
4523
4524         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
4525
4526         * aot-compiler.c (compile_method): Fix a typo in a comment.
4527
4528         * aot-runtime.c (decode_cached_class_info): Skip generic types.
4529
4530         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
4531         everything generic.
4532
4533         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
4534
4535 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
4536
4537         * mini.h (MonoCompile): Add 'args' field.
4538
4539         * mini.c (mono_compile_create_vars): Store variables representing the arguments
4540         into cfg->args.
4541
4542         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
4543
4544 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
4545
4546         * mini.c (mono_compile_get_interface_var): Remove this unused function.
4547
4548         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
4549
4550         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
4551         opcodes for some opcodes.
4552
4553         * mini.h *.brg *.c: Use the new opcodes.
4554
4555 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
4556
4557         * mini.h: Bumped aot revision.
4558
4559         * inssel.brg: modified code generation of type checks for interfaces
4560         to use the new "MonoClass.interface_bitmap" instead of the old
4561         "MonoClass.interface_offsets".
4562
4563 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
4564
4565         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
4566
4567 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
4568
4569         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
4570         64 bit platforms.
4571
4572 2007-04-27  Neale Ferguson <neale@sinenomine.net>
4573
4574         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
4575
4576 2007-04-27  Wade Berrier  <wberrier@novell.com>
4577
4578         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
4579         mini.h) to fix build.
4580
4581 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
4582
4583         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
4584         
4585         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
4586         causes the corlib unit tests to fail.
4587
4588 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
4589
4590         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
4591
4592         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
4593
4594         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
4595         opcodes to the comparison relations.
4596
4597         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
4598         opcodes to their types.
4599         
4600         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
4601
4602         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
4603         it in cfg->arch.cinfo.
4604
4605         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
4606
4607         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
4608         cfg->cil_offset_to_bb.
4609
4610 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
4611
4612         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
4613         created becase of initlocals.
4614
4615 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
4616
4617         * mini-alpha.c cpu-alpha.md: More alpha port work from 
4618         Sergey Tikhonov <tsv@solvo.ru>.
4619
4620 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
4621
4622         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
4623
4624 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
4625
4626         * cpu-s390.md (break): Correct the length of break instruction.
4627
4628 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4629
4630         * mini.c: fix a couple of soft-float issues and comments.
4631
4632 2007-04-15  Miguel de Icaza  <miguel@novell.com>
4633
4634         * trace.c (is_filenamechar): - is also a filename char.
4635
4636 2007-04-15  Neale Ferguson <neale@sinenomine.net>
4637
4638         * mini-s390.c: Correct checking for enum type in return value processing.
4639
4640 2007-04-14  Raja R Harinath  <rharinath@novell.com>
4641
4642         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
4643         (version.h): Makefile is in the build directory.
4644
4645 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
4646
4647         * mini-amd64.h: fix for assertion failure on Solaris/amd64
4648
4649 2007-04-11  Martin Baulig  <martin@ximian.com>
4650
4651         * mini.c (can_access_member): Fix handling of generic classes;
4652         fixes #81259.
4653
4654 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
4655
4656         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
4657
4658 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
4659
4660         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
4661
4662 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
4663
4664         * mini-codegen.c: make sure the right spill amount is
4665         used for fp or integer registers (fixes the float_sub_spill() on ppc).
4666
4667 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
4668
4669         * mini-ppc.c: fixes for the fp_branch_nan test.
4670
4671 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
4672
4673         * basic.cs: Comment out new test which still fails on ia64.
4674
4675 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4676
4677         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
4678
4679 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
4680
4681         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
4682
4683 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
4684
4685         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
4686         on 64 bit machines. Fixes part of #80738.
4687
4688         * basic.cs: Add regression test.
4689
4690 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
4691
4692         * inssel.brg basic.cs: Revert previous change to fix build.
4693
4694         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
4695         platforms.
4696         
4697         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
4698
4699         * basic.cs: Add new regression test.
4700
4701 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
4702
4703         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
4704         many arguments.
4705
4706 2007-03-16  Neale Ferguson <neale@sinenomine.net>
4707
4708         * cpu-s390x.md: Correct length of break instruction.
4709
4710 2007-03-16  Neale Ferguson <neale@sinenomine.net>
4711
4712         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
4713         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
4714
4715 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
4716
4717         * *.c: Begin WIN64 port.
4718         * mini.c:  Use correct register in profiler.
4719         * mini-amd64.c: No inline assembly on Win64.
4720         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
4721         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
4722         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
4723         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
4724         mono_arch_ip_from_context for Win64.
4725         
4726         Contributed under MIT/X11 license.
4727
4728 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
4729
4730         * exceptions-amd64.c (seh_handler): Ditto.
4731
4732         * exceptions-x86.c (seh_handler): Fix a memory leak.
4733
4734 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
4735
4736         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
4737         mini-s390x.c: fixed peephole optimizations to deal
4738         correctly with 1 and 2 byte reload avoidance.
4739
4740 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
4741
4742         * cpu-s390.md, cpu-s390x.md: update localloc length.
4743
4744 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
4745
4746         * cpu-g4.md: added missing descriptions.
4747
4748 2007-03-14  Miguel de Icaza  <miguel@novell.com>
4749
4750         *  Makefile.am: Add support so the tail tests are not executed on
4751         PowerPC as that is a known limitation of the PowerPC port.
4752
4753 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
4754
4755         * runmdesc.bat:  Move to msvc directory.
4756         
4757 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
4758
4759         * runmdesc.bat:  Run executable that was produced by the current
4760         target and sent via an argument.
4761         
4762 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
4763
4764         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
4765         #81102.
4766
4767         * generics.2.cs: Add regression test.
4768
4769 2007-03-09  Wade berrier  <wberrier@novell.com>
4770
4771         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
4772
4773 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
4774
4775         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
4776         AOT code depends on this.
4777
4778 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
4779
4780         * mini.c: more precise tracking of types in the eval stack
4781         (part of fix for bug #81044).
4782
4783 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
4784
4785         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
4786
4787         * aot-compiler.c (encode_patch): Remove an obsolete comment.
4788
4789 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
4790
4791         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
4792
4793         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
4794
4795 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
4796
4797         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
4798         a pointer on 64 bit systems. Fixes #80190.
4799
4800         * iltests.il: Add new regression test.
4801
4802 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
4803
4804         * mini.c: inline a constant for Environment.IsRunningOnWindows.
4805
4806 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
4807
4808         * trace.c: Remove an erroneous alignemnt check when tracing.
4809           Fixes --trace on OSX86.
4810
4811 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
4812
4813         * mini-$(arch).h: initialize SP in context for all the archs.
4814
4815 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
4816
4817         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
4818         regressions in the thread tests.
4819
4820 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
4821
4822         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
4823         - fixed implementation of LOCALLOC opcode
4824         - implemented non-un compare for floats
4825         - code cleanup
4826         - implementation of FDIV and CKFINITE opcodes
4827         - fixes for latest mono updates
4828         - additional arch opcodes
4829
4830 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
4831
4832         * Makefile.am: simplify and merge rules for cross-compilation.
4833
4834 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
4835
4836         * local-propagation.c: Actually *apply* the fix for bug 80591...
4837
4838 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
4839
4840         * mini-exceptions.c: backuot part of the last change
4841         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
4842
4843 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
4844         * inssel.brg: Fix bug 59286.
4845
4846
4847 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
4848
4849         * mini-exceptions.c: patch from Zoltan to correctly check for
4850         stack boundaries (using the stack register, not the frame register),
4851         fixes bugs #80724, #79717.
4852
4853 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
4854
4855         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
4856         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
4857
4858         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
4859         presence of frame pointer elimination.
4860
4861 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
4862         
4863         * mini-x86.h: NetBSD UCONTEX_REG defines.
4864
4865 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
4866
4867         * inssel-amd64.brg: Fix amd64 build.
4868
4869 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
4870
4871         * mini.h: remove extern to workaround what looks likes gcc bug 26905
4872         on amd64.
4873
4874 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
4875
4876         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
4877         ends.
4878
4879         * mini-<ARCH>.c: Use mono_is_regsize_var ().
4880
4881 2007-01-30 Mark Mason <mason@broadcom.com>
4882
4883            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
4884            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
4885            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
4886            beginning support for CEE_JMP [not quite working yet]
4887            * tramp-mips.c: LMF handling now works
4888         
4889 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
4890
4891         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
4892
4893         * mini.h (NULLIFY_INS): New macro.
4894
4895 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4896
4897         * mini.c: statistical profiler fix for windows, patch
4898         from Tor Lillqvist (tml@novell.com).
4899
4900 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
4901         * local-propagation.c: Fix bug 80591.
4902
4903 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
4904
4905         * Makefile.am: put back the --export-dynamic option as with
4906         the previous gmodule flags (thanks to Robert Jordan).
4907
4908 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
4909
4910         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
4911
4912         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
4913         simplify and speed up the local register allocator. Also rename some fields
4914         like iassign->vassign.
4915         
4916         * regalloc.c: Remove some functions which are no longer used since their
4917         inlined version is in mini-codegen.c.
4918         
4919         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
4920
4921         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
4922
4923 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
4924
4925         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
4926         narrowing. Fixes #80622.
4927
4928         * iltests.il: Add new regresssion test. 
4929
4930 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
4931
4932         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
4933         debug-debugger.c, debug-debugger.h: warning fixes.
4934         * driver.c: updated copyright year and made it fit in one line.
4935
4936 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
4937
4938         * aot-runtime.c: updated to use mono-dl instead of gmodule.
4939
4940 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
4941
4942         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
4943
4944         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
4945
4946         * iltests.il: Add new test for bug #80507.
4947
4948 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
4949
4950         * mini-arm.h: use soft-float also on vfp for now.
4951
4952 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
4953
4954         * mini.c: fix some more soft-float issues.
4955
4956 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
4957
4958         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
4959
4960 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
4961         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
4962         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
4963         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
4964
4965 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
4966
4967         * mini-arm.c: typo fix.
4968
4969 2007-01-23  Neale Ferguson <neale@sinenomine.net>
4970
4971         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
4972
4973 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
4974
4975         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
4976         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
4977
4978         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
4979
4980         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
4981
4982         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
4983         
4984         * inssel.brg: Fix a warning.
4985
4986         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
4987
4988         * abcremoval.c ssa.c ssapre.c: Update after this change.
4989         
4990         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
4991
4992         * dominators.c (df_set): Use mono_bitset_union_fast.    
4993
4994 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
4995
4996         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
4997         mini-codegen.c: reduce relocations and memory usage for the cpu
4998         description.
4999
5000 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
5001
5002         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
5003
5004         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
5005         to reduce their size.
5006
5007 2007-01-19 Mark Mason <mason@broadcom.com>
5008
5009         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
5010         * mini-mips.c: more configuration macros, support long conditional branches, additional
5011         asserts, fix epilog instrumentation.
5012         * mini-mips.h: use standard stack walk
5013         * cpu-mips.md: increase size of div, rem and conditional branches
5014         
5015 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
5016
5017         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
5018         to cpu spec data.
5019
5020 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
5021
5022         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
5023         (compile_method): Ditto.
5024
5025         * aot-runtime.c (decode_klass_info): Ditto.
5026
5027         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
5028         needed by the code generated by inssel.brg. Also fix a warning.
5029
5030 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
5031
5032         * mini.c: deal with enums that become genericinsts by
5033         being nested in a generic class (bug #79956).
5034
5035 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
5036
5037         * mini.c: match the generic definition to check for
5038         private access with generic types (bug #78431).
5039
5040 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
5041
5042         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
5043         to make life easier for people cross-compiling that insist on not
5044         using scratchbox.
5045
5046 2007-01-17 Mark Mason <mason@broadcom.com>
5047
5048         * inssel-long.brg: patch to deal with mips missing flags
5049         * inssel-long32-mips.brg: implement overflow checks
5050         * insset-mips.brg: implement overflow checks
5051         * mini-mips.h: implement conditional exception handling
5052         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
5053           Remove unused code, minor cleanups.
5054         * exceptions-mips.c: minor cleanups
5055         * mini-ops.h: add mips conditional exception ops
5056         * cpu-mips.md: add mips conditional exception ops
5057
5058         
5059 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
5060
5061         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
5062         to deal with mips missing of flags.
5063
5064 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
5065
5066         * exceptions-ppc.c: execute fault handlers.
5067
5068 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
5069
5070         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
5071
5072 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
5073
5074         * mini.c: handle also floating point values in initialize_array.
5075
5076 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
5077
5078         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
5079         array initialization and make it conditional on the intrins option.
5080
5081 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
5082
5083         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
5084         relocations and put the patch info names close to the enum definition.
5085
5086 2007-01-15 Mark Mason <mason@broadcom.com>
5087
5088         * basic.cs, exceptions.cs: break up large tests to increase debugability.
5089
5090 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5091
5092         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
5093
5094 2007-01-12  Raja R Harinath  <rharinath@novell.com>
5095
5096         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
5097
5098 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
5099
5100         * Makefile.am: distribute the mips sources.
5101
5102 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5103
5104         * mini-codegen.h: handle bug #80489 here, by excluding ecx
5105         directly.
5106
5107 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
5108
5109         * cpu-x86.md: back out for now as this triggers other regressions.
5110
5111 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
5112
5113         * cpu-x86.md: force src1 and dest regpair for long shift instructions
5114         to eax:edx, so ecx can't get allocated to them (bug #80489).
5115
5116 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
5117
5118         * mini.c, mini-exceptions.c: enabled running fault handlers
5119         (bug #80469).
5120
5121 2007-01-03  Miguel de Icaza  <miguel@novell.com>
5122
5123         * driver.c: If nothing fail, do not use the string "failed",
5124         because it makes it very annoying to view test result logs on the
5125         web. 
5126
5127 2006-12-30  Miguel de Icaza  <miguel@novell.com>
5128
5129         * debug-debugger.c (mono_debugger_main): Rename "main" to
5130         "main_method" to prevent a warning.
5131
5132         Remove a warning for unused field.
5133
5134 2006-12-28  Martin Baulig  <martin@ximian.com>
5135
5136         * debug-debugger.c
5137         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
5138
5139 2006-12-22  Martin Baulig  <martin@ximian.com>
5140
5141         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
5142         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
5143         seperate `.mdb_debug_info' section, so we can access it from the
5144         debugger even if the binary is stripped.
5145
5146         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
5147         from the `.mdb_debug_info' here to prevent the linker from
5148         removing that section.
5149
5150         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
5151         mdb-debug-info64.s.
5152
5153 2006-12-19  Robert Jordan  <robertj@gmx.net>
5154
5155         * mini-x86: enable the code to return small structures in
5156         registers for FreeBSD as well. Fixes bug #80278.
5157         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
5158
5159 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5160
5161         * mini-x86.c: align the stack when calling the profiler
5162         function instrumenting the prolog (on OSX).
5163
5164 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
5165
5166         * mini.c: emit a break opcode where Debugger.Break () is called.
5167
5168 2006-12-13  Miguel de Icaza  <miguel@novell.com>
5169
5170         * mini.c (mono_method_to_ir): Provide useful information on this
5171         assert, to prevent others from debugging like I did.
5172
5173 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
5174
5175         * mini.c: enable code which was incorrectly commented
5176         (bug #80235).
5177
5178 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
5179
5180         * mini-x86.c: enable on OSX, too, the code to return small
5181         structures in registers.
5182
5183 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
5184
5185         * mini-x86.c: remove the use of the dynamic code manager here, too.
5186
5187 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
5188
5189         * mini.h, debug-debugger.c, tramp-*.c: fixed 
5190         mono_debugger_create_notification_function() to use
5191         mono_global_codeman_reserve () instead of a dynamic code manager.
5192
5193 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
5194
5195         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
5196         ves_array_element_address() jit icall and use a generated
5197         managed method instead (which is about 4 times faster for a rank 3
5198         array access).
5199
5200 2006-11-29  Mark Mason  <mason@broadcom.com>
5201
5202         * basic-calls.cs: additional tests for passing
5203         structures as function arguments.
5204
5205 2006-11-29  Mark Mason  <mason@broadcom.com>
5206
5207         * mini-mips.h: disable custom exception handling
5208         * mini-mips.c: throw/rethrow should use jalr to call
5209         exception stubs.  Fixed bug with passing structures
5210         by value. More support for tracing floating point
5211         functions.
5212
5213 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5214
5215         * mini.c: fixed typo in the soft-float ldind.r4 handling
5216         (bug #80086).
5217
5218 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
5219
5220         * mini.c, mini.h, driver.c: added --runtime command line
5221         option to select a different runtime than the autodetected one.
5222         * jit.h: added API for embedders to initialize with a specific
5223         runtime version.
5224
5225 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
5226
5227         * mini.c: handle also boxing of r4 values (bug #80024).
5228
5229 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
5230
5231         * mini-ppc.c: force indirect calls until we reserve
5232         enough address space for all the generated code.
5233
5234 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
5235
5236         * exceptions-arm.c: workaround bugs in the libc definition
5237         of struct ucontext.
5238
5239 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
5240
5241         * inssel.brg: fixes from me and Mark Mason.
5242
5243 2006-11-23  Dick Porter  <dick@ximian.com>
5244
5245         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
5246         semaphore display now we've fixed the initial value
5247
5248 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
5249
5250         * inssel.brg: partially revert the last change to fix the build.
5251
5252 2006-11-21  Mark Mason  <mason@broadcom.com>
5253
5254         * inssel.brg: Add and use compare-and-branch macros to support
5255         architectures that do not have condition code registers (ie. MIPS).
5256         * *-mips.{c,brg,md}: Fix copyright statements
5257
5258 2006-11-20  Mark Mason  <mason@broadcom.com>
5259
5260         * Makefile.am: remove mini-codegen.c from list of MIPS sources
5261         * mini.c: Allow GET_CONTEXT to be specified by the arch port
5262         * mini.h: Added declaration for mono_print_ins()
5263         * mini-codegen.c: added ins_spec initializer for MIPS
5264         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
5265         vreg to be virtual and hreg to be non-virtual.
5266         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
5267         is not yet working/implemented correctly.
5268         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
5269         non-static, fixup calls to print_ins() from other parts in the file.
5270
5271 2006-11-20  Mark Mason  <mason@broadcom.com>
5272
5273         * basic-calls.cs: added tests for passing structures as arguments
5274         to calls.
5275
5276 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
5277
5278         * inssel-long32.brg: optimize signed division by power of two.
5279
5280 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
5281
5282         * mini-arm.c: added support for interworking with thumb code
5283         (mono must be still be built using the ARM instruction encoding).
5284
5285 2006-11-19  Miguel de Icaza  <miguel@novell.com>
5286
5287         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
5288         verifier has different rules for it.   Fixes a few verifier issues
5289         in the test suite.
5290
5291         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
5292         at the end, so people know what happened.
5293
5294 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
5295
5296         * brach-opts.c: in optimize_exception_target() make sure we
5297         are in a catch clause (fixes bug #79871).
5298
5299 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
5300
5301         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
5302         more soft-float support fixes.
5303
5304 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
5305
5306         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
5307         that are passed half on the stack and half in registers.
5308
5309 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
5310
5311         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
5312         more mips integration work from Mark E Mason 
5313         <mark.e.mason@broadcom.com>.
5314
5315 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
5316
5317         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
5318         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
5319         tramp-mips.c: added sources for the mips port, not
5320         integrated in the build yet. Contributed by
5321         Mark E Mason <mark.e.mason@broadcom.com>.
5322
5323 2006-11-14  Neale Ferguson <neale@sinenomine.net>
5324
5325         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
5326
5327 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
5328
5329         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
5330         put the soft-float rules in its own file since it seems to
5331         break s390 compilation.
5332
5333 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
5334
5335         * mini-arm.c: fixed wrnings.
5336
5337 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
5338
5339         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
5340         inssel-arm.brg: ARM support for soft-float.
5341
5342 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
5343
5344         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
5345         loads and stores of 32 bit fp values.
5346
5347 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
5348
5349         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
5350
5351         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
5352         works. Fixes #79852 and #79463.
5353
5354 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
5355
5356         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
5357         more soft-float support WIP and fixes.
5358
5359 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
5360
5361         * mini-arm.c: some VFP updates.
5362
5363 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
5364
5365         * mini-exceptions.c: 0 is a valid local var offset in some
5366         architectures, don't assert (bug #78508).
5367
5368 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
5369
5370         * exceptions-arm.c: fixed off by one error in stack walk code.
5371
5372 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
5373
5374         * mini.h, mini.c: more precise tracking of type load exceptions.
5375
5376 2006-11-03  Robert Jordan  <robertj@gmx.net>
5377
5378         * Makefile.am: [WIN32] Add monow.exe target.
5379         * driver.c: [WIN32] Don't detach the console when debugging.
5380         Fixes bug #79797.
5381         
5382 2006-10-30  Miguel de Icaza  <miguel@novell.com>
5383
5384         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
5385
5386 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
5387
5388         * aot-compiler.c (emit_method_info): Add a case missed earlier.
5389
5390         * driver.c (mini_regression): Fix --regression with AOT.
5391
5392         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
5393
5394 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
5395
5396         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
5397
5398         * mini-sparc.h: Don't use sigaction on sparc/linux.
5399
5400         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
5401
5402         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
5403
5404         * mini-exceptions.c: Add proper include files for getpid ().
5405
5406 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
5407
5408         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
5409         address instead of a MonoJitInfo* to avoid decoding the exception info for the
5410         method.
5411
5412         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
5413         name cache to reduce its size.
5414
5415         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
5416
5417 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
5418
5419         * mini-x86.c: Save/restore the current LMF structure more efficiently using
5420         the mono_lmf TLS variable.
5421
5422         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
5423         trampoline lmf frames.  
5424
5425         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
5426
5427 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
5428
5429         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
5430         the mono_lmf TLS variable.
5431
5432         * mini-exceptions.c: Access the LMF structure through accessors.
5433
5434         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
5435         variable instead of in jit_tls->lmf.
5436
5437         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
5438         
5439         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
5440         trampoline lmf frames.
5441
5442         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
5443
5444 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
5445
5446        * mini.c trace.c mini-x86.c: Revert these too.
5447         
5448        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
5449        signature change.
5450
5451 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
5452
5453         * genmdesc.c: removed now dead code.
5454
5455 2006-10-09  Robert Jordan <robertj@gmx.net>
5456
5457         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
5458
5459 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
5460
5461         * mini.h: do not leave gaps in the opcode values.
5462
5463 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
5464
5465         * jit-icalls.h: flag functions as internal here, too.
5466
5467 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
5468
5469         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
5470         functions with the internal attribute.
5471
5472 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
5473
5474         * aot-compiler.c: fclose the file descriptor in the profile read loop.
5475
5476 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
5477
5478         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
5479         for soft-float.
5480
5481 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
5482
5483         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
5484         tail calls as on other platforms.
5485
5486         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
5487
5488         * iltests.il: Add a few tailcall tests.
5489
5490 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5491
5492         * driver.c: fix loop for old compilers (bug #79521).
5493
5494 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
5495
5496         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
5497
5498         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
5499
5500         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
5501         metadata without any code.
5502
5503         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
5504         more precise debugging information using gdb.
5505
5506 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
5507
5508         * inssel-ia64.brg: Make the helper methods static.
5509
5510 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
5511
5512         * inssel-x86.brg: make the helper methods static.
5513
5514 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
5515
5516         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
5517
5518 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
5519
5520         * mini.c: updates for monoburg changes.
5521         * inssel.brg: make a few helper functions static as they should.
5522
5523 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
5524
5525         * Makefile.am: Move mini-codegen.c to common_sources.
5526
5527 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5528
5529         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
5530         instructions.
5531         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
5532         mini-ppc.h: port to use the common local register allocator.
5533
5534 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
5535
5536         * mini.h: Remove the comment too then.
5537
5538 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
5539
5540         * mini.h: put back backend.data which is to be used shortly and
5541         doesn't increase the size of MonoInst. If any 64 bit arch aligned
5542         pointers on 4 byte boundaries it'd have much bigger issues running
5543         and you can ifdef it out anyway.
5544
5545 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
5546
5547         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
5548         MonoInst size by 4 bytes on 64 bit machines.
5549
5550 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
5551
5552         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
5553         replacement with more meaningful field names. Arch maintainers, please
5554         check the assigned names are good enough for your arch.
5555
5556 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
5557
5558         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
5559         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
5560
5561 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
5562
5563         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
5564         relocations and memory requirements, put the optimization flags
5565         definitions in their own file.
5566
5567 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
5568
5569         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
5570
5571         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
5572
5573 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
5574
5575         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
5576
5577 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
5578
5579         * inssel.brg: use the correct function to get the size of an item
5580         in an array, given an element class.
5581         * aot-compiler.c: do not access class->class_size directly.
5582
5583 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
5584
5585         * mini.h, debug-mini.c: added a debugging function to print
5586         info about local variables and arguments in a jitted method.
5587
5588 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
5589
5590         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
5591
5592         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
5593
5594 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
5595
5596         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
5597         inner and outer loops when passing vtypes.
5598
5599 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
5600
5601         * mini-ppc.c: take into account the cpu errata for cache flushing
5602         which caused some random errors (bug #79381).
5603
5604 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
5605
5606         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
5607         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
5608
5609 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
5610
5611         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
5612         loaded.
5613
5614         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
5615         freebsd ports tree.
5616
5617         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
5618         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
5619
5620         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
5621         displacement.
5622
5623 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
5624
5625         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
5626
5627 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
5628
5629         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
5630         macro does not have to be changed during debugging.
5631
5632         * 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>.
5633
5634         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
5635
5636         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
5637         
5638         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
5639         MONO_ARCH_NO_EMULATE_MUL is defined.
5640
5641         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
5642
5643         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
5644
5645         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
5646
5647         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
5648         
5649 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
5650
5651         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
5652         stuff to mini-exceptions.c where it is used.
5653
5654         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
5655         setup code, the real one is in mini-exceptions.c.
5656
5657         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
5658         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
5659         some changes from the freebsd ports tree.
5660
5661         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
5662         constants.
5663         
5664         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
5665
5666 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
5667
5668         * mini.c: on Linux, check for /proc to be mounted
5669         (bug# 79351, novell bug#201204).
5670
5671 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
5672
5673         * mini.c: handle cases where pthread_attr_getstack() behaves
5674         incorrectly (bug #78096).
5675
5676 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
5677
5678         * mini-arm.c: support larger stack frames (bug #79272).
5679
5680 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
5681
5682         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
5683
5684         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
5685         tokens.
5686
5687         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
5688         mono_class_from_name () to find a class from its name.
5689
5690         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
5691
5692 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
5693
5694         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
5695
5696 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
5697
5698         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
5699
5700 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
5701
5702         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
5703         callinfo->trampoline.
5704
5705         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
5706         fixes #79271.
5707         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
5708         future.
5709
5710 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
5711
5712         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
5713
5714 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
5715
5716         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
5717         stats.method_trampolines, it is already done by the generic trampoline code.
5718
5719         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
5720         
5721 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
5722
5723         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
5724
5725         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
5726
5727         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
5728
5729         * mini.c (print_jit_stats): Print mscorlib mempool size too.
5730         
5731         * mini.c (print_jit_stats): Print new stats.
5732
5733         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
5734
5735 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
5736
5737         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
5738         Address on two dimensional arrays. Fixes #78729.
5739
5740         * mini.h (MonoCompile): Add a 'skip_visibility' field.
5741
5742         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
5743         a method.
5744
5745         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
5746
5747         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
5748         #79130.
5749         
5750         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
5751         a race condition.
5752         (mini_get_ldelema_ins): Ditto.
5753
5754 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
5755
5756         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
5757         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
5758         Fixes #79213.
5759
5760 2006-08-29 Neale Ferguson <neale@sinenomine.net>
5761
5762         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
5763         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
5764
5765         * exceptions-s390x.c: Cosmetic change.
5766
5767         * tramp-s390.c: Fix warning.
5768
5769         * cpu-s390.md: Correct length of mul_imm.
5770
5771 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
5772
5773         * aot-compiler.c: added binary writer with ELF backend
5774         implementation (only on Linux/x86 for now).
5775
5776 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
5777
5778         * Makefile.am: Don't run net 2.0 AOT tests.
5779
5780         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
5781         (mono_compile_assembly): Skip net 2.0 assemblies as well.
5782
5783         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
5784
5785 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
5786
5787         * aot-compiler.c: simplified and refactored the asm-writing code
5788         to allow different backends.
5789
5790 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
5791
5792         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5793
5794         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
5795         little. Share patches of type TYPE_FROM_HANDLE as well.
5796
5797         * mini.c (mono_patch_info_equal): New helper function.
5798         (mono_patch_info_hash): Ditto.
5799
5800         * aot-compiler.c (emit_method_code): Fix s390 build.
5801
5802         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
5803         is not handled because it is stored as a flag and not as a type ctor. Fixes
5804         #79016.
5805
5806 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
5807
5808         * aot-compiler.c: Fix computation of GOT slot statistics.
5809         
5810         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
5811         Also remove support for not PIC AOT.
5812
5813         * mini.h: Bump AOT file format version.
5814
5815         * objects.cs: Add a test for #78990.
5816
5817         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
5818         (peter.dettman@iinet.net.au). Fixes #79087.
5819
5820         * basic-long.cs: Add a test for the above.
5821
5822 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
5823
5824         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
5825         
5826         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
5827         code somewhat.
5828
5829 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
5830
5831         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
5832         exceptions.
5833
5834 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
5835
5836         * mini.c: Don't verify COM proxy invoke calls
5837         
5838
5839 2006-08-10  Dick Porter  <dick@ximian.com>
5840
5841         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
5842         which process is holding semaphores locked.
5843
5844 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
5845
5846         * mini-ia64.c mini-amd64.c: Fix #79027.
5847
5848         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
5849
5850         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
5851
5852         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
5853         implicit arguments in a vararg call. Fixes #79027.
5854
5855 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
5856
5857         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
5858         (mono_get_array_new_va_signature): Ditto.
5859
5860 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
5861
5862         * aot-runtime.c: Call init_plt lazily.
5863
5864         * inssel-long.brg: Fix unsigned long->int conversion.
5865
5866         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
5867
5868         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
5869         that most data is now in the .rss/.data section.
5870
5871 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
5872
5873         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
5874
5875         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
5876
5877         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
5878
5879         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
5880
5881         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
5882         virtual call. Fixes #79010.
5883
5884         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
5885         and use the result as the this argument in the real call.
5886
5887         * generics.2.cs: Add a new test for #79010.
5888         
5889 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
5890
5891         * mini-x86.c: Fix a warning.
5892
5893         * aot-compiler.c: Add a bunch of statistics.
5894
5895         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
5896
5897 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
5898
5899         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
5900
5901 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
5902
5903         * 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>.
5904
5905 2006-07-13  Miguel de Icaza  <miguel@novell.com>
5906
5907         * mini.c (mono_method_to_ir): Obtain the original method in the
5908         CIL stream and use this to perform validation.
5909
5910         Fixed: #78816
5911
5912 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
5913
5914         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
5915         (mono_arch_call_opcode): Ditto.
5916
5917         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
5918         #78826.
5919
5920         * mini.c (mono_patch_info_dup_mp): New helper function.
5921         
5922         * aot-compiler.c (compile_method): Fix some of the memory allocated during
5923         compilation. Fixes #78827.
5924
5925 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
5926
5927         * declsec.c: Use original security informations for
5928           MONO_WRAPPER_MANAGED_TO_MANAGED.
5929
5930 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
5931
5932         * mini.c: Allow Com Interop methods/classes and
5933         don't verify COM wrapper calls
5934         
5935
5936 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
5937
5938         * inssel-long32.brg: Fix long->i4 checked conversion.
5939
5940         * exceptions.cs: Add a test for the above.
5941
5942 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
5943
5944         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
5945
5946         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
5947         leaks.
5948
5949         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
5950         #78775.
5951
5952 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
5953
5954         * mini.c: Fix solaris/x86 exception handling.
5955
5956         * Makefile.am: Get rid of $(ICU_LIBS).
5957
5958 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
5959
5960         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
5961         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
5962         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
5963
5964         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
5965
5966         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
5967         this function causes a SIGSEGV.
5968
5969 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
5970
5971         * mini.c: Remove unused solaris/x86 includes.
5972
5973 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
5974
5975         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
5976
5977 2006-06-20  Jb Evain  <jbevain@gmail.com>
5978
5979         * cpu-g4.md: fix max length of start_handler instruction.
5980
5981 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
5982         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
5983
5984 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
5985         * ssa.c: Fixed bug 78653 for SSA based deadce.
5986         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
5987         MonoInst.flags, used in SSA based deadce.
5988         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
5989         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
5990
5991 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
5992
5993         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
5994         it can end up using non executable memory on ppc64 systems
5995         running ppc32 userspace (fix from Johannes Berg).
5996
5997 2006-06-14  Dick Porter  <dick@ximian.com>
5998
5999         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
6000         4.1.1
6001
6002 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
6003         * mini.c: Made so that inline is locally disabled if it would
6004         trigger a .cctor, because too many apps depend on this behavior
6005         (which seems to be also the one of the MS CLR).
6006
6007 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
6008
6009         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
6010         No idea why this worked before.
6011
6012         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
6013         which branch to outer exception clauses since they could skip the
6014         inner finally clauses. Fixes #78633.
6015
6016         * exceptions.cs: Add a test for the above.
6017
6018         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
6019         Fixes #78629.
6020
6021         * iltests.il: Add a test for the above.
6022
6023 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
6024
6025         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
6026         after the end of a try bblock, to prevent asserts in mini_method_compile ().
6027
6028         * iltests.il: Add a test for the above.
6029
6030 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
6031
6032         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
6033         
6034         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
6035         methods as instrinsics.
6036
6037 2006-06-09  Wade Berrier <wberrier@novell.com>
6038
6039         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
6040         (simple-cee-ops.h ssapre-mini-ops.h)
6041
6042 2006-06-09  Neale Ferguson <neale@sinenomine.net>
6043
6044         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
6045         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
6046         instruction).
6047         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
6048         * cpu-s390x.md: Fix max. length values for a couple of instructions.
6049
6050 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
6051
6052         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
6053
6054 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
6055
6056         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
6057         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
6058         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
6059         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
6060         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
6061         of opcodes, so that bug 78549 should not happen again.
6062         * ssapre.c: Updated to use the renamed files.
6063
6064 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
6065
6066         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
6067         in OP_ATOMIC_EXCHANGE_I4.
6068
6069 2006-06-07  Wade Berrier <wberrier@novell.com>
6070
6071         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
6072         in mono_debugger_create_notification_function)
6073
6074 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
6075
6076         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
6077         
6078         * mini.c (type_from_stack_type): Disable some changes which do not
6079         seem to work.
6080
6081         * driver.c: Reenable opts.
6082
6083         * mini.h (MonoStackSlot): New structure to keep track of the verification state
6084         of the evaluation stack.
6085         
6086         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
6087         evaluation stack trace at entry to the bblock.
6088
6089         * mini.c (merge_stacks): New function to perform verification of stack merges.
6090         Turned off by default.
6091
6092         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
6093         STACK_MP.
6094         
6095 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
6096
6097         * local-propagation.c: Fixed bug 78549.
6098
6099 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
6100
6101         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
6102
6103 2006-06-02  Miguel de Icaza  <miguel@novell.com>
6104
6105         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
6106         tramp-arm.c, tramp-ia64.c
6107         (mono_debugger_create_notification_function): Update signature to
6108         new signature and use new protocol for creating the notification
6109         function.  
6110
6111         Should fix the build.
6112
6113 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
6114
6115         * exceptions-ppc.c (mono_jit_walk_stack)
6116         (ves_icall_get_frame_info): Fix the build
6117
6118 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
6119
6120         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
6121
6122 2006-05-31  Raja R Harinath  <rharinath@novell.com>
6123
6124         * il2tests.2.il: New file for generics CIL tests.  Add test for
6125         #78019.
6126         * Makefile.am: Update.
6127
6128         Fix #78019
6129         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
6130         to nullable types.
6131
6132 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
6133
6134         * aliasing.c: Fixed bug 78311.
6135
6136 2006-05-29  Martin Baulig  <martin@ximian.com>
6137
6138         * mini-exceptions.c (mono_find_jit_info): When computing the
6139         native offset, check whether we're actually inside the method's
6140         code; call mono_debug_print_stack_frame() to format the frame.
6141         (ves_icall_System_Exception_get_trace): Call
6142         mono_debug_print_stack_frame() to format the stack frame.
6143         (ves_icall_get_trace): Update to the new debugging API.
6144         (mono_jit_walk_stack_from_ctx): Likewise.
6145         (ves_icall_get_frame_info): Likewise.
6146
6147         * mini.c (get_method_from_ip): Use the new debugging API.
6148         (mono_print_method_from_ip): Likewise.
6149
6150         * exceptions-ppc.c
6151         (mono_jit_walk_stack): Use the new debugging API.
6152         (ves_icall_get_frame_info): Likewise.   
6153
6154 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
6155
6156         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
6157
6158 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
6159
6160         * mini.c: Added "limitator" to inline for debugging.
6161
6162 2006-05-24  Martin Baulig  <martin@ximian.com>
6163
6164         * debug-debugger.c (mono_debugger_init): Create a private,
6165         malloc()-based code manager for the notification function and
6166         intentionally leak it on exit.  This fixes the crash-on-exit race
6167         condition.
6168
6169         * tramp-amd64.c
6170         (mono_debugger_create_notification_function): Added
6171         `MonoCodeManager *' argument.
6172
6173         * tramp-x86.c
6174         (mono_debugger_create_notification_function): Added
6175         `MonoCodeManager *' argument.
6176
6177 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
6178
6179         * aliasing.c: Fixed 64 bit issue.
6180         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
6181         default since all known bugs are fixed (one more time!).
6182
6183 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6184
6185         * mini.c: write barrier support.
6186
6187 2006-05-23  Martin Baulig  <martin@ximian.com>
6188
6189         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
6190         check at the top of the file.
6191
6192 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
6193
6194         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
6195         reverting changes without reason and without changelog entries.
6196
6197 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
6198
6199         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
6200         to a few opcodes. Fixes #78439.
6201
6202         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
6203         consistency with other archs.
6204
6205         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
6206
6207 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
6208
6209         * debug-debugger.c: fix the build.
6210
6211 2006-05-17  Martin Baulig  <martin@ximian.com>
6212
6213         * debug-debugger.c
6214         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
6215         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
6216         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
6217         (debugger_attach): Call GC_mono_debugger_add_all_threads().
6218
6219 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
6220
6221         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
6222
6223 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
6224
6225         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
6226         MONO_TYPE_GENERICINST.
6227         
6228         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
6229         MONO_TYPE_GENERICINST.
6230
6231 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
6232
6233         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
6234         #78325.
6235
6236 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
6237
6238         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
6239         mempool.
6240         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
6241
6242 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
6243
6244         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
6245         mono_trace_cleanup ().
6246
6247         * iltests.il: Fix problem with the newly added test.
6248
6249         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
6250         due to register constraints, free up the previous hreg. Fixes #78314.
6251
6252         * iltests.il: Add new test for #78314.  
6253
6254         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
6255         Interlocked.Add. Fixes #78312.
6256
6257         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
6258         
6259 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
6260
6261         * inssel.brg (mini_emit_virtual_call): Fix a warning.
6262
6263 2006-05-05  Martin Baulig  <martin@ximian.com>
6264
6265         * debug-mini.c (mono_debug_open_block): New method.
6266
6267         * mini-amd64.c
6268         (mono_arch_output_basic_block): Call mono_debug_open_block() at
6269         the beginning of each basic block.
6270
6271         * mini-x86.c
6272         (mono_arch_output_basic_block): Call mono_debug_open_block() at
6273         the beginning of each basic block.
6274
6275 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
6276
6277         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
6278         default until I understand why they break the build on amd64.
6279
6280 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
6281
6282         * mini.c (mini_cleanup): Call mono_cleanup ().
6283
6284         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
6285         errors.
6286
6287 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
6288
6289         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
6290         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
6291         default since all known bugs are fixed, and I cannot reproduce bug
6292         77944... I'm asking Matt Hargett to test again after this commit.
6293
6294 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
6295
6296         * mini-codegen.c: Fixed typo that thrashed inline.
6297
6298 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
6299
6300         * dominators.c (compute_dominators): Avoid using a worklist since
6301         it is not correct in some cases. Instead, iterate over all bblocks as
6302         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
6303
6304 2006-04-28  Miguel de Icaza  <miguel@novell.com>
6305
6306         * mini.c (mono_jit_compile_method_inner): Use
6307         mono_prepare_exception_from_error that resets the value
6308         internally.
6309
6310 2006-04-27  Miguel de Icaza  <miguel@novell.com>
6311
6312         * mini.c: Move the mini_loader_error_to_exception to metadata. 
6313         
6314 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
6315
6316         * aliasing.c: Fixed bug 78210.
6317
6318 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
6319
6320         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
6321         default until all their problems (or the ones they trigger) are fixed.
6322
6323 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
6324
6325         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
6326         
6327         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
6328         as loaded only after resolving patches since that could invoke the same method.
6329
6330         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
6331
6332         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
6333         functions.
6334
6335         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
6336         AOT loader.
6337
6338         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
6339         stack.
6340
6341         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
6342         made from AOT code through the PLT table.
6343
6344         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
6345         holding the plt offset when a call is made to the aot plt trampoline.
6346         
6347 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
6348
6349         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
6350         amd64 AOT support.
6351
6352         * Makefile.am (common_sources): Fix build breakage.
6353
6354         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
6355         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
6356         intra-assembly calls if possible.
6357         
6358         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
6359
6360         * mini-trampolines.c: Handle PLT entries.
6361
6362         * mini.c: Avoid creating a GOT var for calls.
6363
6364         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
6365         from mscorlib code.
6366
6367         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
6368         from mscorlib code.
6369
6370         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
6371         AOT code.       
6372
6373         * mini.h: Bump AOT file format version.
6374         
6375         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
6376         covers more cases.
6377
6378 2006-04-25  Martin Baulig  <martin@ximian.com>
6379
6380         * driver.c: Disable copyprop, consprop and inline when running
6381         inside the debugger.
6382
6383 2006-04-25  Martin Baulig  <martin@ximian.com>
6384
6385         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
6386         with `get_current_thread' and added `detach'.
6387         (MonoDebuggerMetadataInfo): Added `thread_size',
6388         `thread_tid_offset', `thread_stack_ptr_offset' and
6389         `thread_end_stack_offset'.
6390
6391 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
6392
6393         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
6394         aot-runtime.c.
6395
6396         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
6397         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
6398
6399         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
6400
6401         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
6402
6403         * aot.c: Add support for ADJUSTED_IID.  
6404
6405 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
6406
6407         * aot.c (emit_method_order): Don't align method_order_end.
6408
6409         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
6410         the interface ID changes.
6411
6412 2006-04-21  Dick Porter  <dick@ximian.com>
6413
6414         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
6415         cleaning up a thread.  Fixes the new part of bug 77470.
6416
6417 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
6418
6419         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
6420         to managed wrapper.
6421                      
6422 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
6423
6424         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
6425         
6426         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
6427         SIGSEGV. Fixes #78072.
6428
6429         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
6430         unregister our SIGABRT handler.
6431
6432 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
6433
6434         * mini.c: Disabled inline where it can alter the call stack in a
6435         way visible from managed code.
6436         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
6437         default.
6438
6439 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
6440
6441         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
6442         on other platforms. Fixes #78089.
6443
6444 2006-04-13  Martin Baulig  <martin@ximian.com>
6445
6446         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
6447         determine whether we're inside the debugger.
6448
6449         * debug-debugger.h
6450         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
6451
6452 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
6453
6454         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
6455         handler clauses. Fixes #78024.
6456
6457         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
6458         in the CALL_MEMBASE opcodes. Fixes #78088.
6459         (mono_arch_get_vcall_slot_addr): Ditto.
6460
6461 2006-04-10  Martin Baulig  <martin@ximian.com>
6462
6463         * debug-debugger.c: The thread handling code has now been moved
6464         into ../metadata/threads.c.
6465
6466 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
6467
6468         * driver.c (mono_main): Fix --with-gc=none build.
6469
6470         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
6471         (mono_spillvar_offset_float): Ditto.
6472         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
6473         hreg, not when its !global, since on ia64, there is a third category: stacked
6474         registers.      
6475
6476 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
6477
6478         * mini.c: set MonoInst->klass for load field address and a few other
6479         places.
6480
6481 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
6482
6483         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
6484
6485 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
6486
6487         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
6488         the branch opt changes.
6489
6490 2006-04-06  Dick Porter  <dick@ximian.com>
6491
6492         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
6493         
6494         * wapihandles.c (mini_wapi_seminfo): 
6495         * driver.c (mono_main): Add semaphore info option
6496
6497 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
6498
6499         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
6500         branch optimization changes. Fixes #78009.
6501
6502 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
6503
6504         * mini.c: ignore accessibility of methods in managed->native wrappers.
6505
6506 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
6507
6508         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
6509         
6510         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
6511
6512 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
6513
6514         * mini.c: Modify the branch optimizations to preserve the invariant that
6515         the entries inside the in_bb and out_bb arrays are unique.
6516         (mono_unlink_bblock): Avoid creation of new arrays.
6517
6518 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
6519
6520         * mini.c (mono_unlink_bblock): Fix regression caused by previous
6521         change (#77992).
6522
6523 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
6524
6525         * mini.c (optimize_branches): Remove the "optimizations" in
6526         the cbranch1/cbranch2 -> branch cases which were causing several
6527         problems in the past. Fixes #77986.
6528
6529 2006-03-31  Chris Toshok  <toshok@ximian.com>
6530
6531         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
6532         default optimizations :(
6533
6534 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
6535
6536         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
6537         branch.
6538
6539 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
6540
6541         * local-propagation.c: Added comments to structs and removed
6542         "Mono" prefixes from local tree mover types.
6543
6544 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
6545
6546         * Makefile.am (arch_sources): Define this for each architecture so 
6547         libmono_la_SOURCES is defined in one place.
6548
6549 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
6550
6551         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
6552         from handles/.
6553
6554 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
6555
6556         * driver.c: print the GC name supplied by configure.
6557
6558 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
6559
6560         * local-propagation.c: Added tree mover, and moved here all the
6561         local propagation code from mini.c
6562         * mini.c: Added support for treeprop, and moved all the local
6563         propagation code to local-propagation.c
6564         * mini.h: Added support for treeprop
6565         * driver.c: Added support for treeprop, enabled consprop, copyprop,
6566         treeprop, inline and deadce by default
6567         * Makefile.am: Added local-propagation.c
6568
6569 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
6570
6571         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
6572
6573 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
6574
6575         * debug-debugger.c: make it compile without the Boehm GC.
6576
6577 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6578
6579         * mini.c: fixed issue with mismatch when an icall is registered
6580         with multiple names but same address.
6581
6582 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
6583
6584         * declsec.c, mini-exceptions.c: use write barrier to set reference
6585         fields of managed objects.
6586
6587 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
6588
6589         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
6590         (can_access_internals): Fix a warning.
6591
6592         * mini.c (print_method_from_ip): Rename this to 
6593         mono_print_method_from_ip so it gets exported.
6594
6595         * trace.c: Deal with strings inside StringBuilder's containing garbage
6596         and fix memory leaks. Fixes #77848.
6597
6598 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
6599
6600         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
6601         fixes #77787.
6602
6603 2006-03-16 Neale Ferguson <neale@sinenomine.net>
6604         
6605         * mini-s390.c: Remove OP_X86_TEST_NULL.
6606
6607 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
6608
6609         * mini.c: use the correct GetHashCode() for the moving collector.
6610
6611 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
6612
6613         * liveness.c: Regalloc spill cost tuning.
6614
6615 2006-03-15 Neale Ferguson <neale@sinenomine.net>
6616         
6617         * mini-s390x.h: Correct S390_LONG macro.
6618
6619         * mini-s390x.c: Cleanup unused code.
6620
6621 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
6622
6623         * jit-icalls.h: New file.
6624
6625         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
6626         icalls and include that instead of including jit-icalls.c.
6627
6628         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
6629         OP_X86 opcodes.
6630
6631 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
6632
6633         * mini.c: when checking for member accessibility, also check for
6634         friend assemblies and for explicit interface implementations.
6635
6636 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
6637
6638         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
6639
6640         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
6641
6642         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
6643         common cases are done first.    
6644
6645         * mini-ops.h: Only define platform specific opcodes on the given platform.
6646
6647         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
6648         branch.
6649         
6650 2006-03-14  Martin Baulig  <martin@ximian.com>
6651
6652         Revert Paolo's change from r57348:
6653
6654         * mini.h: don't use gboolean for bitfields.
6655         * mini.c: verifier changes for fields and methods accessibility.
6656
6657 2006-03-13  Neale Ferguson <neale@sinenomine.net>
6658
6659         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
6660
6661         * mini-s390x.c: Fix conv_r_un.
6662
6663         * cpu-s390, cpu-s390x.md: Fix lengths.
6664
6665 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
6666
6667         * mini.c: nested types have access to all the nesting
6668         levels, not just the enclosing types.
6669
6670 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6671
6672         * mini.c: added a few more verification checks.
6673
6674 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
6675
6676         * liveness.c: Merge optimizations from the linear-il branch.
6677
6678 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
6679
6680         * mini-ia64.c (emit_call): Add a comment.
6681
6682         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
6683
6684         * tramp-ia64.c: Fix some warnings.
6685
6686 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
6687
6688         * mini.h: don't use gboolean for bitfields.
6689         * mini.c: verifier changes for fields and methods accessibility.
6690
6691 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
6692
6693         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
6694         lazy icall wrapper changes.
6695
6696         * dominators.c: Replace all the dominator algorithms with faster
6697         ones from the linear-il branch.
6698
6699         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
6700         the mempool.
6701
6702         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
6703         common cases are done first.
6704
6705         * mini-amd64.c: Fix some warnings.
6706
6707         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
6708         from the mempool.
6709
6710         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
6711         added code.
6712
6713         * mini.h: Add a missing prototype.
6714
6715 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
6716
6717         * mini.c: Compile icall wrappers lazily.
6718
6719         * mini-codegen.c: Use printf instead of g_print since its much faster.
6720
6721         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
6722         function.
6723
6724         * mini.c (optimize_branches): Cache the negative result from 
6725         remove_block_if_useless ().
6726
6727         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
6728         Also fix some bblock linking issues.
6729
6730         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
6731         assembly files.
6732
6733         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
6734
6735         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
6736         accessed fields first, for better cache behavior.
6737         
6738 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6739
6740         * mini.c: speedup IList<T> array accesses.
6741
6742 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
6743
6744         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
6745         inline_costs counter. Fixes #77190.
6746
6747 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
6748
6749         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
6750         trace messages. Fixes #77706.
6751
6752 2006-03-04  Martin Baulig  <martin@ximian.com>
6753
6754         * tramp-amd64.c, tramp-x86.c
6755         (mono_debugger_create_notification_function): Use
6756         mono_global_codeman_reserve() to allocate a buffer at runtime and
6757         return it.
6758
6759         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
6760
6761         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
6762         notification function at runtime and then call `initialize' in the
6763         `MONO_DEBUGGER__debugger_info' vtable.
6764
6765 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
6766
6767         * iltests.il: Fix a visibility problem.
6768
6769 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
6770
6771         * driver.c, mini.c: add hooks for the counters API.
6772
6773 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
6774
6775         * driver.c: show disabled options.
6776
6777 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6778
6779         * linear-scan.c: always use cost-driven selection.
6780
6781 2006-02-28  Raja R Harinath  <rharinath@novell.com>
6782
6783         * jit-icalls.c (helper_compile_generic_method): Revert change from
6784         2006-02-24.
6785
6786 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
6787
6788         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
6789
6790 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
6791
6792         * inssel.brg: style fixes, mostly to force the updated monoburg
6793         to run for people using svn.
6794
6795 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
6796
6797         * mini.c: match monoburg changes.
6798
6799 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6800
6801         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
6802         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
6803         declaration in the header file.
6804
6805 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
6806
6807         * helpers.c: reduce relocations and mem usage.
6808
6809 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
6810
6811         * mini.h, mini-codegen.c: disable logging features if
6812         requested by configure.
6813
6814 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
6815
6816         * mini.c: tiny verifier changes.
6817
6818 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
6819
6820         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
6821         cpu-pentium.md: stack alignment changes for osx/x86,
6822         partially from Geoff Norton <gnorton@customerdna.com>.
6823
6824 2006-02-24  Raja R Harinath  <harinath@gmail.com>
6825
6826         * jit-icalls.c (helper_compile_generic_method): Update to changes
6827         in metadata/class.c.
6828
6829 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
6830         
6831         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
6832         
6833         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
6834         interface calls with large offsets.
6835
6836 2006-02-23  Raja R Harinath  <rharinath@novell.com>
6837
6838         * jit-icalls.c (helper_compile_generic_method): Document the
6839         special-case we depend on so that we can inflate the method twice
6840         with the same context with no bad side-effects.
6841
6842 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
6843
6844         * mini-x86.c, mini-amd64.c: fix for case when xen support
6845         is disabled.
6846
6847 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
6848
6849         * mini-x86.c, mini-amd64.c: generate code to access tls items
6850         in a faster way for Xen systems.
6851
6852 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
6853
6854         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
6855         updates and compilation fixes for the OSX/x86 port, mostly from
6856         Geoff Norton <gnorton@customerdna.com>.
6857
6858 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6859
6860         * inssel.brg: faster interface call implementation
6861         to sync with the interface_offsets MonoVTable changes.
6862
6863 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
6864
6865         * mini.c: more verification checks.
6866
6867 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
6868
6869         * mini.c: added a few more verification checks.
6870
6871 2006-02-17      Neale Ferguson <neale@sinenomine.net>
6872
6873         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
6874         facility on the processor and use it if available.
6875
6876 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
6877
6878         * driver.c, aot.c, mini.c: throw exception if the IL code is
6879         invalid or unverifiable.
6880
6881 2006-02-17  Raja R Harinath  <rharinath@novell.com>
6882
6883         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
6884         m.StructField.
6885
6886 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
6887
6888         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
6889
6890 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6891
6892         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
6893         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
6894         handling of instantiated generic valuetypes.
6895
6896 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
6897
6898         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
6899         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
6900         instead.
6901
6902         * generics.2.cs: Revert the nullable reftypes tests.
6903
6904 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
6905
6906         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
6907         using __builtin_frame_address (1) as it doesn't work in the presence
6908         of optimizations. Hopefully fixes #77273.
6909
6910         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
6911         -> generics.cs change as it doesn't work with some automake versions.
6912
6913 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6914
6915         * mini.c: handle systems that sue a different way to
6916         retrieve the stack address of the current thread.
6917
6918 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
6919
6920         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
6921         it specially in the makefile.
6922
6923         * generics.2.cs: Add tests for nullable reference types.
6924
6925 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6926
6927         * mini.c: always handle the case when mono_jit_init()
6928         is called in a thread different from the main thread,
6929         confusing libgc (bug #77309).
6930
6931 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
6932
6933         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
6934
6935 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6936
6937         * mini.c: change optimize_branches () to use a single loop
6938         and introduce a new optimization to simplify some range checks.
6939
6940 2006-02-03  Martin Baulig  <martin@ximian.com>
6941
6942         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
6943         and merged with debugger_thread_manager_add_thread().
6944         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
6945         inform the debugger about the main thread.
6946
6947 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
6948
6949         * basic.cs: Add test for div.un/rem.un constant folding.
6950
6951 2006-02-03  Neale Ferguson <neale@sinenomine.net>
6952
6953         * cpu-s390x.md: correct int_xor_imm length
6954
6955 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
6956
6957         * generics.2.cs: New test for #77442.
6958
6959         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
6960         #77442.
6961
6962 2006-02-02  Martin Baulig  <martin@ximian.com>
6963
6964         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
6965         <mono/metadata/mono-debug-debugger.h>   
6966
6967         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
6968
6969 2006-02-02  Martin Baulig  <martin@ximian.com>
6970
6971         * debug-debugger.h: New header file for debug-debugger.c.
6972
6973         * debug-debugger.c: Big API cleanup; don't run the managed Main()
6974         function is a separate thread anymore; add support for attaching.
6975
6976 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
6977
6978         * tramp-x86.c: Fix a warning.
6979
6980 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
6981
6982         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
6983         on very large methods.
6984
6985         * aot.c (load_patch_info): Fix a warning.
6986
6987 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
6988
6989         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
6990         mini-ops.h: alu membase optimizations.
6991
6992 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
6993
6994         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
6995         to speedup StringBuilder.
6996
6997 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
6998
6999         * dominators.c (mono_compute_natural_loops): Fix detection of
7000         loop body start blocks.
7001
7002         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
7003
7004 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
7005
7006         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
7007         #75145.
7008
7009 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
7010
7011         * aliasing.c: Fixed aliasing issue on 64 bit archs.
7012
7013 2006-01-25  Martin Baulig  <martin@ximian.com>
7014
7015         * debug-debugger.c: Moved the `MonoDebuggerManager' and
7016         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
7017         started to cleanup this file a little bit.
7018
7019 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
7020
7021         * mini.c: optimize a codepath frequently happening in generics code.
7022
7023 2006-01-23  Martin Baulig  <martin@ximian.com>
7024
7025         * Makefile.am: Only compile debug-debugger.c on supported platforms.
7026
7027         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
7028         functions directly.
7029
7030         * driver.c: debug-debugger.c is only available if
7031         `MONO_DEBUGGER_SUPPORTED' is defined.   
7032
7033 2006-01-23  Martin Baulig  <martin@ximian.com>
7034
7035         * debug-debugger.c: Only enable this on platforms where the Mono
7036         Debugger is working (x86 and x86_64).
7037
7038 2006-01-21  Martin Baulig  <martin@ximian.com>
7039
7040         The Mono Debugger is now using the normal `mono' instead of the
7041         `mono-debugger-mini-wrapper' when executing managed code.
7042
7043         * debug-debugger.c: New file; previously known as
7044         debugger/wrapper/wrapper.c.
7045
7046         * debug-mini.c (mono_init_debugger): Removed.
7047
7048         * driver.c (mono_main): Added new `--inside-mdb' command line
7049         argument which is used when running inside the debugger.
7050
7051 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
7052
7053         * liveness.c (mono_analyze_liveness): Remove some unused data
7054         structures.
7055
7056 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
7057
7058         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
7059
7060 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
7061
7062         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
7063         depends on implementation details of monobitset.
7064
7065         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
7066         Fixes #77271.
7067
7068 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
7069
7070         * liveness.c: Update after monobitset changes.
7071
7072 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
7073
7074         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
7075
7076 2006-01-11 Neale Ferguson <neale@sinenomine.net>
7077
7078         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
7079
7080         * mini-s390x.c: Remove warning messages.
7081
7082 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
7083
7084         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
7085
7086 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
7087
7088         * generics.2.cs: Add ldelem/stelem_any test.
7089
7090 2006-01-10 Neale Ferguson <neale@sinenomine.net>
7091
7092         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
7093
7094 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
7095
7096         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
7097         
7098 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
7099
7100         * generics.2.cs: Reenable vtype tests.
7101
7102         * inssel-x86.brg: Remove an icorrect valuetype rule.
7103
7104 2006-01-06 Neale Ferguson <neale@sinenomine.net>
7105
7106         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
7107         initial support for OP_ABS.
7108
7109 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7110
7111         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
7112
7113 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7114
7115         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
7116         conversion and implement LADD/LSUB.
7117
7118         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
7119         architectures.
7120
7121 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7122
7123         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
7124
7125         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
7126         architectures.
7127
7128 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7129
7130         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
7131         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
7132         (stack walk problem).
7133
7134 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
7135
7136         * aot.c (mono_aot_load_method): Fix a warning.
7137
7138 2006-01-03  Neale Ferguson <neale@sinenomine.net>
7139
7140         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
7141
7142 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
7143
7144         * iltests.il: Add test for #77148.
7145
7146         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
7147         #77148.
7148
7149 2006-01-03  Neale Ferguson <neale@sinenomine.net>
7150
7151         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
7152
7153 2006-01-03  Neale Ferguson <neale@sinenomine.net>
7154
7155         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
7156         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
7157
7158         * basic-long.cs: Add lconv-to-r4/r8 tests.
7159
7160 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
7161
7162         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
7163
7164         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
7165         here as on other archs.
7166
7167 2005-12-29 Neale Ferguson <neale@sinenomine.net>
7168
7169         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
7170
7171 2005-12-29 Neale Ferguson <neale@sinenomine.net>
7172
7173         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
7174         
7175         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
7176
7177         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
7178         instrument_prolog; Add memory_barrier instruction.
7179
7180 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
7181
7182         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
7183
7184 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
7185
7186         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
7187
7188         * aliasing.c inssel.brg: Fix warnings.
7189
7190         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
7191         could skip initialization of some parts of memory.
7192
7193         * mini.c mini-ia64.c: Fix warnings.
7194
7195         * inssel-sparc.brg: Add an implementation of lneg which actually works.
7196
7197 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
7198
7199         * aliasing.c (mono_build_aliasing_information): Add a workaround for
7200         a crash seen on sparc.
7201
7202         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
7203         
7204         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
7205
7206 2005-12-21 Neale Ferguson <neale@sinenomine.net>
7207
7208         * mini-ops.h: Add s390_backchain instruction
7209
7210         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
7211
7212         * cpu-s390.md: Add s390_backchain instruction
7213
7214         * mini-s390.c: Significant ABI changes
7215
7216         * mini-s390.h: Cater for zero length structures
7217
7218 2005-12-20 Neale Ferguson <neale@sinenomine.net>
7219
7220         * mini-s390.c: ABI fixes
7221
7222         * inssel-s390.brg: Remove debug statements
7223
7224         * cpu-s390.md: Fix length of ATOMIC_xx operations
7225
7226 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
7227
7228         * basic-float.cs: Add float<->long conversion tests.
7229
7230 2005-12-16 Neale Ferguson <neale@sinenomine.net>
7231
7232         * mini-s390.c: Fix LOCALLOC processing.
7233
7234         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
7235
7236 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
7237
7238         * iltests.il: Add tests for some opcodes not covered by the other
7239         tests.
7240
7241 2005-12-15 Neale Ferguson <neale@sinenomine.net>
7242
7243         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
7244         register loading for Tail processing; Correct trace output.
7245
7246         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
7247
7248         * cpu-s390.md: Correct size of jmp instruction. 
7249
7250 2005-12-13 Neale Ferguson <neale@sinenomine.net>
7251
7252         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
7253
7254 2005-12-13 Neale Ferguson <neale@sinenomine.net>
7255
7256         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
7257           Bring s390 up to current level.
7258
7259 2005-12-12  Zltan Varga  <vargaz@gmail.com>
7260
7261         * generics.2.cs: Disable the newly added tests as they do not work yet.
7262         
7263         * generics.2.cs: Add valuetype tests.
7264
7265 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
7266
7267         * basic-long.cs: Add i4->u8 test.
7268
7269         * objects.cs: Add tests for JIT intrinsic.
7270
7271         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
7272         optimizations lost by a mistake.
7273
7274 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
7275
7276         * basic-long.cs: Remove a test moved to objects.cs.
7277
7278         * arrays.cs: Add more array tests.
7279
7280 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
7281
7282         * arrays.cs: Add new tests for multi-dimensional arrays.
7283
7284 2005-12-06  Raja R Harinath  <rharinath@novell.com>
7285
7286         * Makefile.am (test_sources2): Add generics.2.cs.
7287         (EXTRA_DIST): Add test_sources2.
7288
7289 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
7290
7291         Support for boxing and unboxing nullable types as well as the
7292         isinst operation on nullables, per the CLI ammendment.
7293
7294         * inssel.brg (CEE_ISINST): Special case for nullable
7295
7296         * mini.c (handle_unbox_nullable): new method
7297         (handle_box): Special case for nullable types
7298         (mono_method_to_ir): Call handle_unbox_nullable in correct
7299         places.
7300
7301         * generics.2.cs: New test suite
7302
7303         * Makefile.am: Support for regression tests with generics.
7304
7305 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
7306
7307         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
7308         allocated to registers. Fixes #76800.
7309
7310 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
7311
7312         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
7313
7314 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
7315
7316         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
7317         of platforms.
7318
7319 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
7320
7321         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
7322         objects.cs.
7323
7324         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
7325         
7326         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
7327 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
7328
7329         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
7330         single precision before storing to a single precision location.
7331
7332 2005-11-28  Raja R Harinath  <rharinath@novell.com>
7333
7334         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
7335
7336 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
7337
7338         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
7339         correct files.
7340
7341         * basic.cs: Remove test_0_byte_compares test which was moved to
7342         objects.cs a long time ago.
7343
7344 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
7345
7346         * aliasing.c: Fixed aliasing issue on 64 bit archs.
7347
7348 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
7349
7350         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
7351         handlers are called.
7352
7353         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
7354         throwing code.
7355
7356          * mini-ia64.c: Add support for the throw->branch exception 
7357         optimization.   
7358
7359         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
7360
7361 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
7362
7363         * mini.c: Enabled "fastpath" deadce :-)
7364         
7365 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
7366
7367         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
7368         alias analysis pass to support it.
7369         * mini.h: Likewise.
7370         * ssa.c: Likewise.
7371         * liveness.c: Likewise (liveness computation can use aliasing
7372         information to be more accurate).
7373         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
7374         moreover made so that "--compile-all" uses the given optimization
7375         flags and not the default ones.
7376         * aliasing.c: Alias analysis (new file).
7377         * aliasing.h: Likewise.
7378         * Makefile.am: added "aliasing.c" and "aliasing.h".
7379         
7380 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
7381
7382         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
7383         OP_L opcodes.
7384
7385 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
7386
7387         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
7388         fp >= end_of_stack exit condition, as it is not needed, and it might
7389         become true for fp eliminated frames.
7390
7391 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
7392
7393         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
7394         coded offsets.
7395
7396 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
7397
7398         * mini-arm.c: fixed alignment of doubles/longs to match
7399         the C ABI (bug #76635).
7400
7401 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
7402
7403         * aot.c: fix compilation with --enable-minimal=aot.
7404
7405 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
7406
7407         * mini-arm.c: fixed compatibility with the new
7408         floating point emulator package for compares.
7409
7410 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
7411
7412         * mini.c : reverted sig->pinvoke changes (r51396-51397).
7413
7414 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
7415
7416         * mini-exceptions.c (print_stack_frame): Output to stderr.
7417         (mono_handle_native_sigsegv): Ditto.
7418
7419 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
7420
7421         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
7422         OP_LCONV_TO_OVF_I implementation.
7423
7424         * mini-amd64.c: Add support for the throw->branch exception 
7425         optimization.
7426
7427         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
7428         when the catch clause catches a more general exception, i.e. Object.
7429
7430 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
7431
7432         * cpu-ia64.md: Remove unused opcodes.
7433
7434         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
7435         specific defines for architectures defining USE_SIGACTION.
7436
7437         * mini-ia64.c: Fix some warnings.
7438
7439         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
7440         version seemed to skip a frame.
7441
7442 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
7443
7444         * mini.c: Clean up the usage of sig->pinvoke flag. Now
7445         only calls which are made to native code use this flag.
7446
7447 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
7448
7449         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
7450         varargs methods as well.
7451         
7452         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
7453         which have save_lmf set. Reorganize methods prologs a bit.
7454
7455         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
7456         debugger to the proper place.
7457
7458 2005-10-29  Martin Baulig  <martin@ximian.com>
7459
7460         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
7461         when running inside the debugger until the debugger has support
7462         for it.
7463
7464 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
7465
7466         * mini.h: Fix a warning.
7467
7468 2005-10-24  Miguel de Icaza  <miguel@novell.com>
7469
7470         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
7471         we expose publicly, this returns the string.
7472
7473 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
7474
7475         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
7476         with fp elimination.
7477
7478 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
7479
7480         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
7481         native stacktrace using the glibc 'backtrace' function if available.
7482
7483 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
7484
7485         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
7486
7487         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
7488         handle SIGSEGVs received while in native code.
7489
7490         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
7491         code, call mono_handle_native_sigsegv which will abort the runtime
7492         after printing some diagnostics, instead of converting it into a
7493         confusing NullReferenceException.
7494
7495 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
7496
7497         * cpu-pentium.md: Remove unused opcodes.
7498
7499 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
7500
7501         * mini-amd64.h (MonoLMF): Add rsp field.
7502
7503         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
7504         the lmf too.
7505
7506 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
7507
7508         * mini-codegen.c (get_register_spilling): Fix some warnings.
7509
7510 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
7511
7512         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
7513         elimination during exception handling. Enable fp elimination by
7514         default.
7515
7516         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
7517         elimination.
7518
7519 2005-10-16  Martin Baulig  <martin@ximian.com>
7520
7521         * mini-exceptions.c
7522         (mono_debugger_run_finally): New public method for the debugger.
7523
7524 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
7525
7526         * debug-mini.c (mono_debug_init_method): Fix warning.
7527
7528         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
7529         the 'exname' parameter const to fix some warnings.
7530
7531 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
7532
7533         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
7534         introduced by the previous patch.
7535
7536 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
7537
7538         * basic-float.cs: Add test for precision of float arithmetic.
7539
7540         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
7541         when loading/storing single values from/to memory.
7542
7543         * mini.c (mono_jit_compile_method_with_opt): Create the function
7544         pointers in the correct domain.
7545
7546 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
7547
7548         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
7549         introduced by previous patch.
7550         
7551         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
7552         when out_filter_idx is NULL.
7553
7554         * mini-exceptions.c: Don't run filter clauses twice during exception
7555         handling. Fixes #75755.
7556
7557 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
7558
7559         * aot.c: Add support for ldflda wrappers.
7560
7561         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
7562         #75902.
7563
7564 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
7565
7566         * mini.c, mini.h: do not consider exception handlers blocks when
7567         setting up interface variables.
7568
7569 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
7570
7571         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
7572
7573 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
7574
7575         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
7576         causes a regression.
7577
7578         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
7579
7580 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
7581
7582         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
7583         of the OP_P definitions.
7584
7585         * TODO: Add a proposal for dealing with the CEE/OP mess.
7586
7587         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
7588         optimizations from the x86 port.
7589
7590         * cpu-amd64.md: Ditto.
7591
7592         * basic.cs basic-long.cs: Add tests.
7593
7594 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
7595
7596         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
7597         Patrik Torstensson's implementation of my exception-handling
7598         optimization idea, when the exception object is not used
7599         (bug #62150).
7600
7601 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
7602
7603         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
7604         of the mul_imm optimizations from the old jit.
7605
7606 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
7607
7608         * mini.c, liveness.c: patch by Patrik Torstensson and
7609         Zoltan Varga to improve performance in methods with
7610         exception clauses.
7611
7612 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
7613
7614         * driver.c: Remove 'Globalization' entry from --version.
7615
7616 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
7617
7618         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
7619         there is a profiler interested in JIT events.
7620
7621         * aot.c: Load profile files produced by the AOT profiling module, and
7622         reorder methods based on the profiling info. Add a 'method_order' table
7623         to the AOT file to make mono_aot_find_jit_info work with the reordered
7624         methods.
7625
7626         * mini.h: Bump AOT file version info.
7627
7628 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
7629
7630         * mini-arm.h: work around what looks like a gcc bug when optimizations
7631         are enabled.
7632
7633 2005-09-28  Raja R Harinath  <rharinath@novell.com>
7634
7635         * Makefile.am (AM_CFLAGS): Don't use += to append inside
7636         conditionals.  Use ...
7637         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
7638
7639 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
7640
7641         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
7642         to determine the amount of memory to copy when passing valuetypes.
7643
7644         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
7645         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
7646
7647 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
7648
7649         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
7650         information about aot.
7651
7652 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
7653
7654         * *.c: Replace the use of {Enter,Leave}CriticalSection with
7655         macros. This will allow a deadlock debugger to easily be plugged
7656         in.
7657
7658 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
7659
7660         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
7661
7662 2005-09-27  Raja R Harinath  <rharinath@novell.com>
7663
7664         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
7665         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
7666         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
7667         ($(arch_built)) [CROSS_COMPILING]: Error out.
7668
7669 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
7670
7671         * aot.c: Add support for the no_special_static flag for classes.
7672
7673 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
7674
7675         * Reapply reverted patches.
7676
7677         * *: Revert r50174 as well.
7678
7679         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
7680
7681 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
7682
7683         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
7684
7685 2005-09-23  Miguel de Icaza  <miguel@novell.com>
7686
7687         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
7688         part of the SIG_HANDLER_SIGNATURE.  
7689
7690 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
7691
7692         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
7693         statistics.
7694
7695         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
7696         introduced by previous patch.
7697
7698 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
7699
7700         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
7701         saved registers too.
7702
7703         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
7704         upon the information returned by get_call_info ().
7705         
7706         * mini-x86.c (add_float): Fix stack size calculation.
7707         (mono_arch_call_opcode): Rewrite this so it works based up the
7708         information returned by get_call_info ().
7709         (mono_arch_get_this_vret_args): Ditto.
7710
7711 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
7712
7713         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
7714         in cinfo to determine the registers which need to be used.
7715
7716 2005-09-20  Miguel de Icaza  <miguel@novell.com>
7717
7718         * driver.c (mono_main): Add --server and --desktop flags. 
7719
7720 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
7721
7722         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
7723         registers as global registers.
7724
7725         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
7726         longer needed with the new register allocator.
7727
7728         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
7729
7730         * cpu-ia64.md: Remove unused opcodes.
7731         
7732         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
7733         
7734 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
7735
7736         * cpu-amd64.md: Remove unused opcodes.
7737
7738         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
7739         needed with the new register allocator.
7740
7741         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
7742         reg-reg moves.
7743
7744 2005-09-16  Raja R Harinath  <rharinath@novell.com>
7745
7746         * Makefile.am (check-local): Don't invoke semdel-wrapper.
7747
7748 2005-09-16  Martin Baulig  <martin@ximian.com>
7749
7750         * exceptions-amd64.c
7751         (throw_exception): Don't call mono_debugger_throw_exception() if
7752         we're a rethrow - see the FIXME in the code.
7753
7754 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
7755
7756         * mini.c (mono_init_exceptions): This only works on some architectures.
7757         
7758 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
7759
7760         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
7761         on ia64.
7762
7763         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
7764
7765         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
7766         now in mini-exceptions.c.
7767
7768 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
7769
7770         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
7771         now in mini-exceptions.c.
7772
7773 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
7774
7775         * exceptions-x86.c: Applied patch from Patrik Torstensson 
7776         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
7777
7778         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
7779         code into mini-exceptions.c. Add some assertions to it.
7780
7781 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
7782
7783         * aot.c (emit_section_change): Applied patch from "The Software Team" 
7784         (<software@solmersa.com>). Fix as errors on windows.
7785
7786 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
7787
7788         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
7789         method info into the LMF.
7790
7791 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
7792         
7793         * mini-ia64.c: Add proper unwind info for method epilogs.
7794
7795         * exceptions-ia64.c: Add some code to help debugging.
7796         
7797         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
7798
7799         * mini-exceptions.c: Fix warning.
7800
7801 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
7802
7803         * mini.c: Really fix build.
7804
7805         * mini-x86.c mini-amd64.c: Fix build.
7806
7807 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
7808
7809         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
7810
7811         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
7812         some Interlocked methods as intrinsics.
7813
7814         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
7815         for Thread methods as well.
7816
7817         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
7818
7819         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
7820
7821         * mini-ia64.c mini-x86.c mini-amd64.c 
7822         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
7823         OP_MEMORY_BARRIER.
7824         
7825         * mini.c (mono_init_exceptions): Fix build breakage.
7826
7827 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
7828
7829         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
7830         of instructions. Use the new ia64_unw_op macros for emitting unwind
7831         info.
7832
7833         * mini.c (mono_init_exceptions): Initialize exception handling
7834         related trampolines at startup.
7835
7836 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
7837
7838         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
7839
7840 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
7841
7842         * mini.c: Handle type loading errors gracefully during compilation and
7843         throw the appropriate exception.
7844
7845 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
7846
7847         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
7848         for the mono binary.
7849
7850 2005-09-09  Martin Baulig  <martin@ximian.com>
7851
7852         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
7853         the release.
7854
7855 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
7856
7857         * mini-arm.h: use emulation for conv.r.un for the release.
7858
7859 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
7860
7861         * mini-arm.c, objects.cs: more fixes and tests for them.
7862
7863 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
7864
7865         * mini-arm.c: align structures to at least 4 bytes to be able
7866         to keep our current optimized memcpy.
7867
7868 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
7869
7870         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
7871
7872 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7873
7874         * mini.c: ignore SIGPIPE.
7875
7876 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
7877
7878         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
7879
7880         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
7881
7882 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
7883
7884         * mini.h: Add prototype for mono_allocate_stack_slots_full.
7885
7886 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
7887
7888         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
7889         exception handling support.
7890         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
7891         patch by Brian Koropoff <briank@marakicorp.com>).
7892
7893 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
7894
7895         * mini.c: revert another 'optimization' which breaks when
7896         items on the eval stack need to be saved at a basic block end
7897         (bug #75940).
7898
7899 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
7900
7901         * jit-icalls.c: for arrays, ensure we always provide
7902         lower bounds.
7903
7904 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
7905
7906         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
7907         
7908         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
7909
7910 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
7911
7912         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
7913         arguments in their original register.
7914
7915 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
7916
7917         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
7918         memset/memcpy.
7919
7920         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
7921         when ssapre is enabled.
7922
7923         * inssel-long.brg: Fix bug in previous patch.
7924
7925         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
7926         multiplication by a constant.
7927
7928 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
7929
7930         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
7931         icc.
7932
7933         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
7934         saving registers.
7935
7936 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
7937
7938         * inssel-arm.brg: apply changes tested by Brian Koropoff
7939         <briank@marakicorp.com>.
7940
7941 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
7942
7943         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
7944         
7945 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
7946
7947         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
7948         to the same register if dreg is just a base register.
7949         (print_ins): Improve printing of membase opcodes.
7950
7951         * inssel-x86.brg: Add optimized ldind(reg) rules.
7952
7953         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
7954
7955 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
7956
7957         * mini.c: when running under valgrind, set the stack bottom for
7958         the GC at the actual approximate stack for the app (fixes running
7959         mono with valgrind).
7960
7961 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
7962
7963         * mini.c: do no break at the first valuetype to init found
7964         (fixes bug #75791).
7965
7966 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
7967
7968         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
7969
7970 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
7971
7972         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
7973
7974 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
7975
7976         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
7977
7978 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7979
7980         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
7981
7982         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
7983         code.
7984
7985         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
7986         code.
7987
7988         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
7989         methods.
7990
7991 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
7992
7993         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
7994
7995 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7996
7997         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
7998         in the tail recursion optimization.
7999
8000         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
8001         debug info into the assembly file.
8002
8003         * iltests.il: Add test for filter regions.
8004
8005         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
8006         initial stack of filter regions. Fixes #75755.
8007
8008 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
8009
8010         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
8011         stack requirements.
8012
8013 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8014
8015         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
8016         the check for an already compiled method on non-ia64 platforms.
8017         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
8018         proper domain.
8019
8020         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
8021
8022         * inssel-x86.brg: Add some optimized call rules.
8023
8024 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
8025
8026         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
8027         method here.
8028
8029         * mini.h mini-trampolines.c: Pass the trampoline argument to 
8030         mono_arch_patch_delegate_trampoline.
8031
8032         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
8033
8034         * mini-trampolines.c: Fix build.
8035
8036         * mini-amd64.h: Add delegate trampolines.
8037
8038         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
8039
8040         * inssel-amd64.brg: Add optimized call rules.
8041         
8042         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
8043
8044         * inssel-ia64.brg: Add optimized ldind(reg) rules.
8045
8046 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
8047
8048         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
8049         change.
8050
8051         * mini-ia64.c: Remove LMF fixmes.
8052
8053         * mini-ia64.h: Remove most fields from LMF.
8054
8055         * inssel-ia64.brg (stmt): Fix unaligned access errors.
8056
8057         * mini-trampolines.c: Add support for IA64 function descriptors.
8058
8059         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
8060         for IA64 function descriptors.
8061
8062 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
8063
8064         * tramp-arm.c: patch the vtable for virtual calls. Added
8065         support code to register/unregister the LMF.
8066         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
8067         more LMF work.
8068
8069 2005-08-19  Dick Porter  <dick@ximian.com>
8070
8071         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
8072         bit value if needed.
8073
8074 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
8075
8076         * mini.c (mini_get_method): Move handling of wrapper data here.
8077
8078         * mini.c (mono_method_to_ir): Add support for dynamic methods.
8079
8080         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
8081         virtual.
8082
8083         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
8084         bblock->code does not remain empty.
8085
8086 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
8087
8088         * arrays.cs: Add regression test for #75832.
8089
8090         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
8091         rules. Fixes #75832.
8092
8093         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
8094         instruction scheduling.
8095
8096 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
8097
8098         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
8099
8100 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
8101
8102         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
8103
8104         * mini-codegen.c: Fix VC build.
8105
8106         * cpu-pentium.md: Increase length of atomic_exhange_i4.
8107
8108 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8109
8110         * mini.h: fix signature for mono_register_opcode_emulation.
8111
8112 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
8113
8114         * mini.c: Get rid of most of the helper_sig_... constants using
8115         mono_create_icall_signature ().
8116
8117 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
8118
8119         * jit-icalls.c (helper_ldstr): New helper function.
8120
8121         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
8122
8123         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
8124         throw, load the string using a helper call instead of creating a string object.
8125
8126         * aot.c: Update after LDSTR changes.
8127
8128         * mini.h: Bump AOT file version.
8129         
8130         * aot.c: Save class size info into the AOT file. Print more statistics during
8131         compilation.
8132
8133         * mini.h: Bump AOT file version.
8134
8135         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8136         ordering of disasm cases. Fixes #74957.
8137
8138 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
8139
8140         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
8141         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
8142         the generic code needed for the ARM port.
8143
8144 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
8145
8146         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
8147         inssel-arm.brg: more ARM features and fixes.
8148
8149 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
8150
8151         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
8152         ARM port work in progress.
8153
8154 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
8155
8156         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
8157
8158         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
8159
8160         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
8161
8162         * inssel.brg (mini_emit_memset): Add support for unaligned access.
8163
8164         * *-ia64.*: Ongoing IA64 work.
8165         
8166         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
8167
8168 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
8169
8170         * TODO: Remove out-of-data todo stuff.
8171
8172         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
8173         dead code.
8174
8175         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
8176
8177         * mini.h: Bump corlib version.
8178
8179 2005-07-27  Martin Baulig  <martin@ximian.com>
8180
8181         * mini-codegen.c
8182         (create_copy_ins): Added `const unsigned char *ip' argument; set
8183         `copy->cil_code' from it.
8184
8185 2005-07-27  Martin Baulig  <martin@ximian.com>
8186
8187         * mini-exceptions.c (mono_handle_exception): Don't call
8188         mono_debugger_handle_exception() for filters.
8189
8190 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
8191
8192         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
8193         as well.
8194
8195 2005-07-26  Martin Baulig  <martin@ximian.com>
8196
8197         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
8198
8199         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
8200         helper_compile_generic_method() if the method is actually virtual
8201         and non-final.
8202
8203 2005-07-26  Martin Baulig  <martin@ximian.com>
8204
8205         * mini.c
8206         (trampoline_code): Renamed to `mono_trampoline_code' and made it
8207         public; this is now accessed directly by the debugger.
8208         (mono_generic_trampoline_code): Removed.
8209
8210         * debug-mini.c
8211         (mono_debug_init_method): Also add interncalls and wrappers.
8212
8213 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
8214
8215         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
8216
8217 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
8218
8219         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
8220
8221 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
8222
8223         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
8224
8225 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
8226
8227         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
8228         getting TLS offsets on AMD64 too.
8229
8230 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
8231
8232         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
8233
8234 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
8235
8236         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
8237         inssel-arm.brg, mini-arm.h: ARM port work in progress.
8238
8239 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
8240
8241         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
8242
8243         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
8244         to mini.c.
8245
8246         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
8247         mono_sparc_is_virtual_call ().
8248         
8249         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
8250
8251         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
8252         trampoline parameters.
8253
8254         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
8255         
8256         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
8257         to mono_arch_get_vcall_slot_addr.
8258
8259         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
8260         trampoline code.
8261
8262         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
8263
8264 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
8265
8266         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
8267
8268 2005-07-19  Martin Baulig  <martin@ximian.com>
8269
8270         * exceptions-amd64.c (throw_exception): Call
8271         mono_debugger_throw_exception() here like we're doing it on i386.
8272
8273 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
8274
8275         * mini-ia64.c: Add optimized TLS access support.
8276
8277 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
8278
8279         * mini-exceptions.c: Ongoing IA64 work.
8280
8281         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
8282
8283         * mini.c: Use the default optimization set when embedding. Fixes
8284         #75194.
8285
8286 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
8287
8288         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
8289         of trampolines to a separate file.
8290
8291         * mini-trampolines.c: New file.
8292
8293         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
8294         separate file.
8295         
8296         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
8297         amd64/ia64 code.
8298
8299         * mini-codegen.c: Fix cygwin build.
8300
8301 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
8302
8303         * mini.c: Add some minor changes needed by the IA64 port.
8304
8305         * *-ia64.*: Ongoing IA64 work.
8306
8307 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
8308
8309         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
8310         trampolines into arch-independent and arch-dependent parts.
8311
8312         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
8313
8314 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
8315
8316         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
8317
8318         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
8319         the xp-regalloc-branch for amd64.
8320
8321         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
8322         xp-regalloc-branch for x86.
8323
8324 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
8325
8326         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
8327
8328 2005-07-06  Martin Baulig  <martin@ximian.com>
8329
8330         * mini.c
8331         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
8332         (mono_jit_runtime_invoke): Likewise.
8333
8334 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
8335
8336         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
8337         on x86 too.
8338         
8339         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
8340         without loading their metadata. Reorganize the file format so exception handling+
8341         debug info is kept separate from normal method info. Create MonoJitInfo 
8342         structures for methods lazily.
8343
8344         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
8345         loading metadata.
8346         (x86_class_init_trampoline): Patch AOT class init trampolines too.
8347
8348         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
8349
8350         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
8351         in AOT code.
8352
8353         * mini.h: Bump AOT file version.
8354
8355 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
8356
8357         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
8358
8359 2005-07-01  Raja R Harinath  <rharinath@novell.com>
8360
8361         * Makefile.am (check-local): Call semdel-wrapper.
8362
8363 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
8364
8365         * mini-x86.c: Revert the last change as it seems to break the build..
8366
8367 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
8368
8369         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
8370         
8371         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
8372
8373 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
8374
8375         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
8376         outside of the macro, so strange stuff doesn't happen with gcc4
8377         (NEW_AOTCONST_TOKEN): Likewise.
8378
8379 2005-06-28  Martin Baulig  <martin@ximian.com>
8380
8381         * mini.c (mini_class_is_system_array): New static method; use this
8382         instead of `klass->parent == mono_defaults.array_class' everywhere
8383         since this also works for the new generic array class.
8384
8385 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
8386
8387         * inssel.brg: Remove warnings.
8388
8389 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
8390
8391         * mini-ia64.c: Ongoing IA64 work.
8392
8393         * basic-float.cs: Add float->i1 conversion test.
8394
8395         * iltests.il: Add conv.u4 test.
8396
8397 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
8398
8399         * inssel-long.brg: Fix bug caused by last change.
8400
8401 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
8402
8403         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
8404         BSDs.  Allows the x86 JIT to work on OSX86
8405
8406 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
8407
8408         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
8409         u4->i8 conversion.
8410
8411         * mini-ia64.c: Ongoing IA64 work.
8412
8413 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
8414
8415         * mini-ia64.c: Ongoing IA64 work.
8416
8417         * driver.c: Clean up jit_code_hash as well when using --regression.
8418
8419         * inssel-long.brg: Fix long->i4/u4 conversion rules.
8420
8421         * basic-long.cs: Add tests for long->u4 conversion.
8422
8423 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
8424
8425         * mini.c: Take mono_get_domainvar out of macros. This makes sure
8426         that we do not depend on undefined C behavior: the order stuff
8427         gets evaluated within an expression. Fixes mono when compiled on
8428         GCC 4.
8429
8430 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
8431
8432         * *-ia64.*: Ongoing IA64 work.
8433
8434         * aot.c: Lower memory usage while loading AOT methods.
8435
8436         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
8437
8438         * mini.h: Bump AOT file format version.
8439
8440 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
8441
8442         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
8443
8444 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
8445
8446         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
8447         not on callee assembly). Fixed some comments.
8448
8449 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
8450
8451         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
8452         it gets proper disassembly.
8453         (emit_method_info): Remove some dead code.
8454
8455         * mini.c (mini_method_compile): Allways allocate the GOT var in
8456         mono_method_to_ir for emulating opcodes.
8457
8458 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
8459
8460         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
8461         before freeing the code memory. Fixes #74990.
8462
8463         * objects.cs: Add regression test for #74992.
8464
8465         * liveness.c: Extend live ranges of arguments to the beginning of the
8466         method. Fixes #74992.
8467
8468         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
8469         so it points into the faulting instruction.
8470
8471 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
8472
8473         * jit-icalls.c (mono_imul_ovf): Add exception handling.
8474
8475         * *-ia64.*: Ongoing IA64 work.
8476
8477         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
8478
8479 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
8480
8481         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
8482
8483         * *-ia64.*: Ongoing IA64 work.
8484
8485 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
8486
8487         * basic-long.cs: Add tests for add/sub.ovf.
8488
8489         * basic.cs: Add tests for sub.ovf.
8490
8491         * *-ia64.*: Ongoing IA64 work.
8492
8493 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
8494
8495         * *-ia64.*: Ongoing IA64 work.
8496
8497         * basic.cs: Add conv.ovf.i4.un test.
8498
8499 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
8500
8501         * mini.c: (remove_block_if_useless) Fixed bug 75061.
8502         
8503 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8504
8505         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
8506
8507 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
8508
8509         * *-ia64.*: Ongoing IA64 work.
8510
8511 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8512
8513         * trace.[ch]:
8514         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
8515
8516 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
8517
8518         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
8519
8520 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
8521
8522         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
8523
8524         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
8525         of a call is callable by a near call.
8526
8527 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
8528
8529         * mini-ia64.c: Ongoing IA64 work.
8530
8531 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
8532
8533         * genmdesc.c: Make the generated array non-static.
8534
8535         * inssel-long.brg: Fix LSHR_IMM rule.
8536
8537         * *-ia64.*: Ongoing IA64 work.
8538
8539         * *-ia64.*: Ongoing IA64 work.
8540
8541 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
8542
8543         * *-ia64.*: Ongoing IA64 work.
8544
8545         * *-ia64.*: Ongoing IA64 work.
8546         
8547         * mini-ia64.c: Ongoing IA64 work.
8548
8549         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
8550
8551 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
8552
8553         * objects.cs basic-calls.cs: Move some tests to objects.cs.
8554         
8555         * objects.cs basic-long.cs: Move some tests to objects.cs.
8556
8557 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
8558
8559         * *-ia64.*: Ongoing IA64 work.
8560
8561         * iltests.il: Add a new test.
8562
8563         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
8564         newobj. Fixes #75042.
8565
8566 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
8567
8568         * *-ia64.*: Ongoing IA64 work.
8569         
8570         * *-ia64.*: Ongoing IA64 work.
8571         
8572         * *-ia64.*: Ongoing IA64 work.
8573
8574         * basic.cs objects.cs: Move tests accessing static variables as well.
8575
8576         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
8577
8578 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
8579
8580         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
8581
8582         * driver.c: Always print failed tests.
8583
8584         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
8585         frame pointer.
8586
8587         * *ia64*: Ongoing IA64 work.
8588
8589 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
8590
8591         * basic.cs: Add tests for add.ovf. Fix warnings.
8592
8593 2005-05-18  Miguel de Icaza  <miguel@novell.com>
8594
8595         * driver.c (mono_main): Avoid crash if no argument is passed to
8596         --break;  Do not use g_error, but f_printf.   And fix all other
8597         ocurrences of the same crash.
8598
8599 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
8600
8601         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
8602         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
8603         Fixes #74742.
8604
8605 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
8606
8607         * *-ia64.*: Add beginnings of IA64 backend.
8608
8609         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
8610
8611 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
8612
8613         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
8614         Fixes #74925.
8615
8616         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
8617
8618         * mini-amd64.c: Fix a warning.
8619
8620 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
8621
8622         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
8623         in float_neg. Fixes #74897.
8624
8625         * mini-amd64.c (emit_call): Fix another near call bug.
8626
8627 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
8628
8629         * declsec.c: Keep the appdomain information in the structure. Added a 
8630         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
8631         value gets overwritten).
8632         * declsec.h: Set the default MonoArray for the the stack to 6. Added
8633         an MonoAppDomain member to MonoSecurityFrame.
8634         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
8635         used in the stack walk. Now use a MonoArray which grow (double) when
8636         it gets full.
8637
8638 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
8639
8640         * mini.c: Re-enabled runtime cleanup, since running threads should
8641         now properly stop when exiting.
8642
8643 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
8644
8645         * mini-codegen.c: New file contaning the arch-independent local
8646         register allocator. Not used by any architectures yet.
8647
8648         * mini.h linear-scan.c: Merge some changes from the 
8649         mini-xp-local-regalloc branch.
8650
8651 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
8652
8653         * mini-amd64.c (emit_call): Fix calls to native functions when the
8654         runtime is compiled as a shared library. Fixes #74756.
8655
8656         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
8657         on a literal field. Fixes #74751.
8658
8659 2005-04-25  Raja R Harinath  <rharinath@novell.com>
8660
8661         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
8662
8663 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
8664
8665         * objects.cs: Add missing null casting test.
8666
8667 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
8668
8669         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
8670         in wrapper methods. Also rename 'address' variable to 'offset'.
8671
8672 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
8673
8674         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
8675         warnings.
8676         
8677         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
8678
8679         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
8680         work on windows.
8681
8682 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
8683
8684         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
8685
8686 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
8687
8688         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
8689         just the last bytes.
8690
8691 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
8692
8693         * aot.c (mono_compile_assembly): Fix warning.
8694
8695         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
8696         by the _MSC_VER stuff.
8697
8698 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
8699
8700         * inssel-long.brg: Fix #74588.
8701
8702         * cpu-amd64.md: Fix #74591.
8703
8704         * iltests.il: Add new regression tests.
8705
8706 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
8707
8708         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
8709         valuetype.
8710
8711 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
8712
8713         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
8714
8715         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
8716         from Bill Middleton <flashdict@gmail.com>.
8717
8718 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
8719
8720         * arrays.cs: Add new regression test. Fix warnings.
8721
8722 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
8723
8724         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
8725         and leakage in CKFINITE.
8726
8727         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
8728         this to a null op since it is called on amd64 too.
8729
8730         * exceptions-amd64.c (get_throw_trampoline): Align stack.
8731
8732         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
8733         body since this is not used on amd64.
8734         
8735         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
8736
8737         * mini-amd64.c: Remove obsolete fixmes.
8738
8739         * mini.c (print_method_from_ip): Fix debugging support.
8740
8741 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8742
8743         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
8744         so that expressions that don't give much gain are not reduced.
8745         * ssapre.h: Likewise.
8746
8747 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
8748
8749         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
8750
8751         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
8752
8753         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
8754
8755 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
8756
8757         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
8758
8759         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
8760
8761 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
8762
8763         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
8764         stack touching.
8765
8766         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
8767
8768         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
8769
8770         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
8771
8772         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
8773         MONO_ARCH_USE_SIGACTION. Fixes #74252.
8774
8775         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
8776
8777         * mini-x86.c: Fix up stack overflow handling.   
8778
8779         * exceptions.cs: Add new regression test.
8780
8781 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
8782
8783         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
8784         mono_jit_thread_attach.
8785
8786         * mini.c (mono_method_to_ir): Verify called method is not abstract.
8787
8788 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
8789
8790         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
8791         avoid calling constructors using callvirt.
8792
8793         * inssel.brg: Fix #74073.
8794
8795 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
8796
8797         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
8798         compilation with non-GCC compilers.
8799         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
8800         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
8801
8802 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
8803
8804         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
8805         klass->interface_offsets (will likely fix bug#74073).
8806
8807 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
8808
8809         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
8810
8811 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
8812
8813         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
8814         to amd64_div_reg_size ().
8815         
8816         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
8817
8818 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
8819
8820         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
8821
8822 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
8823
8824         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
8825
8826 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
8827
8828         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
8829         
8830         * mini.c (mono_precompile_assembly): Load and precompile referenced
8831         assemblies as well. Fixes #74015.
8832
8833 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
8834
8835         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
8836
8837 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
8838
8839         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
8840         a lot of checks and (anyway) permissions cannot work until corlib is 
8841         loaded.
8842
8843 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
8844
8845         * mini-ppc.c: fixed ABI issue on sysv/ppc.
8846
8847 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
8848
8849         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
8850         calls (fixes bug#72824).
8851
8852 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
8853
8854         * mini.c: fix tail recursion elimination (see test in bug#73936).
8855
8856 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
8857
8858         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
8859         some fp functions in sse2 mode.
8860
8861 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
8862
8863         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
8864
8865 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
8866
8867         * mini.h mini.c: Add mono_get_jit_tls_key ().
8868
8869         * mini-x86.c: Enable fast TLS support on windows.
8870
8871 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
8872
8873         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
8874         * mini.c: Check for p/invoke method when generating code. If a
8875         p/invoke method, or it's class, isn't decorated with [Suppress
8876         UnmanagedCodeSecurity] then generate code to call System.Security.
8877         UnmanagedDemand (only if the security manager is active).
8878
8879 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
8880
8881         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
8882         last change as it seems to cause strange crashes.
8883         
8884 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8885
8886         * *.c: handle unsafe function pointers where needed.
8887
8888 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
8889
8890         * mini.c (mono_jit_free_method): Remove the fixme too.
8891
8892 2005-03-15  Miguel de Icaza  <miguel@novell.com>
8893
8894         * mini.c: As discussed, make the code actually free the delegate
8895         thunk now, to enable the debugging of delegate problems, use
8896         MONO_DEBUG=1 when running Mono. 
8897
8898         This takes also care of parts of the leaks as seen by Joe.
8899
8900 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
8901
8902         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
8903         thread_tls_offset calculation.
8904
8905 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
8906
8907         * declsec.c: Reworked linkdemand checks for icall. The previous code
8908         was using the declaration code (untrusted) and didn't work as expected
8909         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
8910         specific case.
8911
8912 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
8913
8914         * iltests.il: Add new localloc test.
8915
8916         * mini-amd64.c: Handle large stack allocations the same way as on
8917         windows if stack overflow handling is working.
8918         
8919         * mini-amd64.c: Allocate the signal stack using mmap.
8920
8921         * mini.c (sigsegv_signal_handler): Fix reading of context.
8922
8923         * mini-exceptions.c: Fix up stack overflow handling.
8924
8925         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
8926
8927         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
8928
8929         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
8930
8931         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
8932
8933         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
8934         tramp_init functions as they are no longer needed.
8935
8936 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
8937
8938         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
8939         
8940         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
8941
8942         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
8943         
8944         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
8945         support that now.
8946
8947         * mini-ops.h: Add OP_LMUL_IMM.
8948
8949         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
8950         long mul/div opcodes as intrinsic.
8951
8952         * mini-amd64.c (emit_call): Handle the case when the callee might be
8953         an AOT method.
8954
8955 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
8956
8957         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
8958         extra safe.
8959         
8960         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
8961
8962         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
8963
8964 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
8965
8966         * mini.c (mono_codegen): Don't leak here, to help people running
8967         monogrind.
8968
8969 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
8970
8971         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
8972         conversions in sse2 mode.
8973
8974         * basic-float.cs: Add regression test.
8975         
8976         * mini-amd64.c: Reenable sse2.
8977
8978 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
8979
8980         * mini-amd64.c: Disable sse2 until some regressions are fixed.
8981
8982 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
8983
8984         * driver.c: Copyright text should include 2005.
8985         
8986 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
8987
8988         * cpu-amd64.md (load_membase): Fix more max lengths.
8989
8990 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
8991
8992         * cpu-amd64.md (load_membase): Fix max length.
8993
8994         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
8995
8996         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
8997
8998         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
8999         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
9000
9001         * basic-float.cs: Add rounding regression test.
9002
9003         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
9004
9005 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
9006
9007         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
9008         structures in registers for pinvoke wrappers.
9009
9010 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
9011
9012         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
9013
9014 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
9015
9016         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
9017         wrapper to mono_jit_thread_attach.
9018
9019         * mini.c (mini_jit_thread_attach): New jit icall.
9020
9021         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
9022         native->managed wrappers.
9023
9024         * exceptions.cs: Add new regression test.
9025
9026         * mini.c (optimize_branches): Check regions in the cbranch to throw
9027         block case as well. Fixes #73242.
9028
9029 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
9030
9031         * mini.c: thread safety fixes.
9032
9033 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
9034
9035         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
9036         patching stuff, since delegates use jump trampolines so there is
9037         no caller.
9038
9039         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
9040         jump trampolines.
9041         
9042         * tramp-amd64.c: Fix build.
9043
9044         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
9045         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
9046
9047         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
9048         Rename this to mono_arch....
9049         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
9050
9051         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
9052
9053         * mini-amd64.c (emit_call): If both the caller and the callee is
9054         guaranteed to have 32 bit addresses, emit a normal call.
9055
9056         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
9057
9058         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
9059         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
9060         method_ptr inside delegates.
9061
9062 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
9063
9064         * mini.c (mono_jit_free_method): Free the method info even if the native code is
9065         invalidated. Fixes #73001.
9066
9067         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
9068
9069         * mini-x86.c: Only use stdcall for pinvokes on windows.
9070
9071 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
9072
9073         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
9074         * mini-x86.c: remove unreliable __thread var offset detection,
9075         use the correct accessors and enable by default.
9076
9077 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
9078
9079         * mini.c (mono_jit_free_method): Fix memory leak.
9080
9081 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
9082
9083         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
9084
9085 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
9086
9087         * cpu-amd64.md: Fix lengths of atomic opcodes.
9088
9089 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
9090
9091         * driver.c: try to not imply using ICU is any good.
9092
9093 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
9094
9095         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
9096         functions as inline ops.
9097
9098         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
9099         some Interlocked functions as inline ops.
9100
9101         * mini.c (move_basic_block_to_end): Fix bug in last patch.
9102
9103         * mini.h (MonoBasicBlock): Reorganize fields a bit.
9104
9105         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
9106
9107         * mini.c: Add support for OP_NOT_TAKEN.
9108
9109         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
9110         structures in registers for pinvoke wrappers.
9111
9112         * mini-amd64.c: Fix warnings.
9113
9114 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
9115
9116         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
9117
9118         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
9119
9120         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
9121         address instead of loading the address from it.
9122
9123         * mini-x86.c: Add support for returning small structs in registers
9124         on Win32. Fixes part of #70864.
9125         
9126 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
9127
9128         * trace.c (get_token): Improve error checking.
9129
9130 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
9131
9132         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
9133
9134 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
9135  
9136         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
9137         it can be reused for MonoClass.
9138         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
9139         _LINKDEMAND.
9140
9141 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
9142
9143         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
9144         instead of a MonoReflectionMethod. The method information wasn't used
9145         when displaying SecurityException details (but will be now).
9146
9147 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
9148
9149         * Makefile.am : windows build fix.
9150
9151 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
9152
9153         * iltests.il: Add new regression test.
9154
9155         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
9156         #72522.
9157
9158 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
9159  
9160         * mini.c: Moved linkdemand check into helper function check_linkdemand
9161         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
9162         LDFTN, LDVIRTFTN).
9163
9164 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
9165
9166         * declsec.c: Added statistics counter for different kinds of 
9167         LinkDemands.
9168         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
9169         (and commented) declaration.
9170         * mini.c: Added statistics counter for security Demand code 
9171         generation. Added display of security statistics.
9172
9173 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
9174
9175         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
9176         Fix compilation errors under gcc-2.95.
9177
9178 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
9179
9180         * mini.c, driver.c: Use the new jit trampoline hashtable
9181
9182 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9183
9184         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
9185
9186 2005-02-11  Martin Baulig  <martin@ximian.com>
9187
9188         * debug-mini.c (mono_debug_close_method): Free the line number array.
9189
9190 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
9191
9192         * aot.c: Break up large methods into smaller ones. Share GOT slots for
9193         icalls.
9194
9195         * mini.h: Bump AOT file format version. 
9196
9197 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
9198
9199         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
9200         APTC and P/Invoke.
9201         * declsec.h: Added macros to get/set lazyly initialized security 
9202         informations about assemblies. Added new enum for different type of
9203         possible LinkDemand violation. Added function to check LinkDemands.
9204         * mini.h: Added a field to MonoCompile to hold any security violation
9205         detected when JITting a method (so it can be thrown later).
9206         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
9207         and CEE_CALLVIRT. Added code to throw exception at the end of
9208         mini_method_compile (note: the exception is unhandled right now).
9209
9210 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
9211
9212         * mini.c, jit-icalls.c: use the managed implementation of
9213         memset for initobj and memset, to avoid managed <-> unmanaged
9214         transitions.
9215
9216 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
9217
9218         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
9219         optimization if it would need a GOT var.
9220
9221         * basic.cs: Add tests for constant propagation and switch statements.
9222
9223         * ssa.c: Fix out-of-range constant propagation and switch statements.
9224
9225 2005-02-09    <vargaz@freemail.hu>
9226
9227         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
9228
9229 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
9230
9231         * cpu-amd64.md (load_membase): Fix max length of load_membase.
9232
9233 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9234
9235         * mini.c: update to new signature of mono_class_get_allocation_ftn().
9236
9237 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
9238
9239         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
9240         arithmetic operations.
9241
9242 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
9243
9244         * mini-ppc.c: add a workaround for broken user code that
9245         DllImports vararg functions with non-vararg signatures.
9246
9247 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
9248
9249         * mini.c (mono_jit_compile_method_inner): Add detection and a 
9250         meaningfull error message for assemblies written in Managed C++.
9251
9252         * tramp-amd64.c mini-amd64.h: Add support for 
9253         create_trampoline_from_token ().
9254
9255         * aot.c mini-x86.c abcremoval.c: Applied patch from
9256         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
9257
9258 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
9259
9260         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
9261         which takes a MonoImage/token as parameter instead of a MonoMethod.
9262
9263         * aot.c: Use the new trampoline for initializing vtables.
9264
9265         * aot.c: Add support for ldfld/stfld_remote wrappers.
9266
9267         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
9268         rules for compare <MEM>, IMM.
9269
9270         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
9271
9272         * aot.c: Handle inherited finalizers correctly.
9273
9274 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
9275
9276         * inssel.brg (stmt): Add a missing _setup_... ().
9277
9278         * aot.c: Save some parts of the class state to the AOT file and use it
9279         to recompute that state when a class is initialized.
9280
9281         * mini.c: Install AOT hooks into the runtime.
9282
9283         * mini.h: Bump AOT file format version.
9284         
9285         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
9286         Fixes #72148.
9287
9288         * iltests.il: Add new test.
9289
9290 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
9291
9292         * mini.c: fix typo.
9293
9294 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
9295
9296         * mini.c: setup the statistical profiler in the thread attach
9297         callback to cope with the new single thread code.
9298
9299 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
9300
9301         * mini-ppc.c: ensure we have enough room for the profiler
9302         calls (fixed bug#72084).
9303
9304 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
9305
9306         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
9307         it.
9308
9309 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9310
9311         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
9312
9313 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9314
9315         * ssapre.c: Fixed an issue with down safety (this allows IronPython
9316         to succesfully execute parrotbench).
9317         * ssapre.h: Likewise.
9318
9319 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9320
9321         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
9322         variable for stores to method arguments (fixes a SSAPRE issue).
9323
9324 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
9325
9326         * mini.c: handle value types in dup, fixes gen-112.cs.
9327
9328 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
9329
9330         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
9331         sequence for calls in dynamic methods to avoid thunks.
9332
9333 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
9334
9335         * mini.c: correctly remove dynamic methods from the hashtable.
9336
9337 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9338
9339         * driver.c: Disabled SSAPRE until fix the bug that appears
9340         in IronPython's parrotbench.
9341
9342 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
9343
9344         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
9345
9346         * mini.c (mono_method_to_ir): Revert the previous change.
9347         
9348         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
9349         when AOT compiling.
9350
9351         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
9352         mono_jit_info_table_find () etc. when running under valgrind.
9353
9354         * inssel.brg: Fix warnings.
9355
9356         * mini-exceptions.c: Fix warnings.
9357
9358 2005-01-31  Martin Baulig  <martin@ximian.com>
9359
9360         * driver.c (compile_all_methods_thread_main): Don't try to compile
9361         generic methods or anything which has type parameters.
9362
9363 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
9364
9365         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
9366
9367         * TestDriver.cs: Add --verbose flags.
9368
9369         * graph.c ssa.c: Fix 64 bit warnings.
9370         
9371         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
9372         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
9373         Fix 64 bit warnings.
9374
9375         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
9376         variable not spotted by gcc.
9377         
9378         * mini-amd64.c inssel-amd64.brg: Applied patch from  
9379         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
9380         X86_COMPARE_MEMBASE opcodes.
9381
9382         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
9383
9384 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
9385
9386         * *: MonoMethod->signature might be NULL now. You *MUST* use
9387         mono_method_signature.
9388
9389 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
9390
9391         * driver.c (compile_all_methods_thread_main): Compile the methods
9392         without invoking cctors.
9393
9394 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
9395
9396         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
9397         * basic-calls.cs: test for the above.
9398
9399 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
9400
9401         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
9402         MonoJitInfo changes.
9403
9404 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
9405
9406         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
9407         eagerly if it contains dynamic methods.
9408         
9409         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
9410
9411         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
9412         trace, it is now computed by an icall from trace_ips.
9413         
9414         * mini-exceptions.c: Fix a warning.
9415
9416 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
9417
9418         * mini-exceptions.c: don't bother getting stack trace info if
9419         it's not going to be used.
9420
9421 2005-01-27  Raja R Harinath  <rharinath@novell.com>
9422
9423         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
9424         ssapre-mini-ops.h.
9425
9426 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
9427
9428         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
9429
9430         * aot.c: Avoid calling mono_method_get_header () if not needed.
9431
9432         * mini.h: Bump AOT file format version.
9433         
9434         * mini.c (mono_emit_native_call): Allocate a GOT var here.
9435
9436         * mini.c (mono_print_tree): Print more info for calls.
9437
9438 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
9439
9440         * declsec.h: Remove warning by adding missing include for marshal.h
9441
9442 2005-01-26  Martin Baulig  <martin@ximian.com>
9443
9444         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
9445         `ip' twice.
9446
9447 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
9448
9449         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
9450         flags.
9451
9452         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
9453
9454         * aot.c (mono_compile_assembly): Fix a warning.
9455
9456 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
9457
9458         * declsec.c: Look for security attributes on the original MonoMethod 
9459         (and not the wrapped one). This fix permissions on icalls.
9460
9461 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
9462
9463         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
9464
9465         * mini.c (mono_allocate_stack_slots): Add a fixme.
9466
9467         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
9468
9469 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
9470
9471         * inssel.brg: optimize casts of sealed types (more
9472         optimizations waiting for fixes in remoting).
9473
9474 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
9475
9476         * inssel.brg (stmt): Add another dummy rule.
9477
9478         * driver.c: Fix warnings.
9479
9480         * driver.c (mono_main): If running under valgrind, instruct glib to use
9481         the system allocation functions so valgrind can track the memory
9482         allocated by the g_... functions.
9483
9484         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
9485
9486         * mini-ops.h: Add OP_DUMMY_STORE opcode.
9487
9488         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
9489
9490         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
9491         variables in try regions.
9492
9493         * mini.c (mini_method_compile): Don't disable optimizations on large
9494         methods when AOT compiling.
9495
9496         * mini.c (mono_allocate_stack_slots): New arch independent method to 
9497         allocate stack slots. Not yet used.
9498
9499 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
9500
9501         * debug-mini.c (mono_debug_close_method): Plug some leaks.
9502
9503 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
9504
9505         * mini-ppc.c: make the branch info relative as the code
9506         buffer can be reallocated.
9507
9508 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
9509
9510         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
9511         * driver.c: Removed the AOT/security restriction. Now initialize the
9512         security manager (in metadata) if --security is used.
9513         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
9514         rather than the pointer to declarative security, when AOT is used.
9515
9516 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
9517
9518         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
9519         basic blocks, reduced intrinsic exception throwing code size.
9520
9521 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
9522
9523         * driver.c (mini_usage): Reorder the usage screen.
9524
9525 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
9526
9527         * mini.c (mono_resolve_patch_target): Fix warning.
9528
9529 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
9530
9531         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
9532         previous patch.
9533
9534         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
9535
9536         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
9537         breaks the amd64 build.
9538
9539         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
9540         register allocation. Fixes #71454.
9541
9542         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
9543
9544         * arrays.cs: Add new regression test.   
9545
9546 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9547
9548         * ssapre.c: Turned usage of snprintf to GString.
9549         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
9550         (I left it on by mistake in my previous commit).
9551
9552 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
9553
9554         * mini.c, cfold.c, basic-calls.cs: preserve side effects
9555         on cond branch optimization (fixes bug# 71515).
9556
9557 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9558
9559         * abcremoval.c: Fixed bug 71062.
9560         * abcremoval.h: Likewise.
9561
9562 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9563
9564         * mini.c: Added a new functionality to optimize_branches, the removal
9565         of useless basic blocks, and fixed some problem in the removal of
9566         critical edges; some utility functions added for both purposes.
9567         * ssapre.c: Added complex expression support, and fixed bug 70637.
9568         * ssapre.h: Likewise.
9569         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
9570         enabled in SSAPRE.
9571         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
9572         * driver.c: Re-enabled SSAPRE.
9573
9574 2005-01-19  Martin Baulig  <martin@ximian.com>
9575
9576         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
9577         the result of mono_get_method_constrained().
9578
9579 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
9580
9581         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
9582         manager.
9583
9584 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
9585
9586         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
9587         be detected.  Fixes #59296.
9588
9589 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
9590
9591         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
9592         which can happen. Fixes #71361.
9593
9594 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
9595
9596         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
9597         manager.
9598
9599 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
9600
9601         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
9602         appdomain-unload.exe to fail.
9603         
9604         * mini.c: Fix some memory leaks.
9605
9606 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
9607
9608         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
9609         Fixed bug and sped up some codepaths.
9610
9611 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
9612
9613         * mini.c: Fix some memory leaks.
9614
9615         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
9616         conversion.
9617
9618         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
9619
9620         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
9621         #71320.
9622
9623         * iltests.il: Add regression test for #71320.
9624
9625 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
9626
9627         * mini.c (mono_codegen): Fix installation of profiler hooks.
9628
9629         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
9630
9631 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
9632
9633         * mini.h, mini.c, cfold.c: optimize access to enum
9634         readonly fields, too. Eval conditional branches if possible
9635         to perform unreachable code removal in more cases.
9636
9637 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
9638
9639         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
9640
9641         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
9642         code manager.
9643
9644         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
9645         WinXP DEP. Fixes #71244.
9646
9647 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
9648
9649         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
9650
9651 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
9652
9653         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
9654
9655 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
9656
9657         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
9658         changes.
9659
9660         * mini.h: Bump AOT version.
9661
9662         * mini.h (MonoCompile): Change exvar to a hash table.
9663
9664         * mini.c: Allocate a separate exvar for each handler block.
9665
9666         * mini.c: Get rid of the computation of filter_lengths, its not needed.
9667
9668         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
9669         ex var with the pending exception and only throw if the two are equal.
9670         Fixes #68552.
9671         
9672         * exceptions.cs: Add tests for rethrow and nested catch clauses.
9673
9674         * mini-x86.c: Fix warnings.
9675
9676         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
9677         used by all the ports now.
9678
9679         * aot.c: Add write-symbols and save-temps options.
9680
9681 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
9682
9683         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
9684
9685 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
9686
9687         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
9688         operations.
9689
9690         * tramp-s390.c: Check vtable slot belongs to the domain.
9691
9692         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
9693         as per other platforms.
9694
9695         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
9696
9697 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
9698
9699         * driver.c: we don't run the Main() code in a subthread anymore.
9700
9701 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
9702
9703         * mini.c: added experimental rtc support in the statistical
9704         profiler: if the user has the permission, more accurate statistics
9705         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
9706         The MONO_RTC value must be restricted to what the linux rtc allows:
9707         power of two from 64 to 8192 Hz.
9708
9709 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
9710
9711         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
9712
9713 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
9714
9715         * mini-ppc.c: better icache flush for smp.
9716
9717 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
9718
9719         * mini-amd64.c (emit_move_return_value): Fix memory leak.
9720
9721         * mini-x86.c (get_call_info): Add the get_call_info () code from the
9722         amd64 port, not yet used.
9723
9724 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
9725
9726         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
9727         a struct type.
9728
9729 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
9730
9731         * driver.c: Added --security option to activate the security manager.
9732         Right now this will allow code generation for declarative demands and
9733         is disabled when AOT is specified.
9734         * mini.c: Add code generation for declarative security demands.
9735         * mini.h: Add mono_use_security_manager as an extern gboolean.
9736
9737 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
9738
9739         * aot.c (mono_compile_assembly): Speed up compilation a bit by
9740         emitting more dense assembly code.
9741
9742         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
9743         exception throwing stuff.
9744
9745 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
9746
9747         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
9748         dead code.
9749
9750         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
9751         left in by mistake.
9752
9753         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
9754         fixed.
9755
9756         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
9757
9758         * tramp-*.c: Only patch vtable slots if the object is in the current
9759         domain. Fixes appdomain-unload.exe.
9760
9761         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
9762         
9763         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
9764         x86 branch.
9765
9766 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
9767
9768         * mini.c (reverse_branch_op): New helper function.
9769
9770         * mini.c (optimize_branches): Run the new optimization only on 
9771         platforms which support it. Also reverse all kinds of branches.
9772
9773         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
9774
9775         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
9776         a throw statement.
9777
9778         * mini.c (optimize_branches): Reverse not-equals branches if the false
9779         bblock is a throw. This happens a lot of time with argument checking in
9780         corlib.
9781
9782         * mini.c (mono_codegen): Add support for placing basic blocks after
9783         the function epilogue.
9784
9785         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
9786         function epilogue.
9787         
9788 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
9789
9790         * mini.c (setup_stat_profiler): Only set this up if the platform
9791         supports ITIMER_PROF.
9792
9793 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
9794
9795         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
9796         previous patch.
9797
9798         * inssel.brg: Fix a warning.
9799
9800 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
9801
9802         * mini.c: added support for statistical profiler 
9803         (run with: --profile=default:stat).
9804
9805 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
9806
9807         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
9808
9809         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
9810
9811         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
9812         related to global registers from the amd64 port.
9813
9814 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
9815
9816         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
9817
9818         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
9819         with global registers.
9820         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
9821
9822         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
9823
9824 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
9825
9826         * debug-mini.c (encode_value): Fix off-by-one.
9827
9828         * aot.c (encode_value): Likewise.
9829
9830         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
9831
9832 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
9833
9834         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
9835         AOT.
9836
9837         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
9838         
9839         * aot.c (emit_method_info): Increase size of temp buffer.
9840
9841         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
9842         the AOT case.
9843
9844 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
9845
9846         * aot.c (emit_method_info): Fix build.
9847         
9848         * aot.c: Further rework of the AOT file format to reduce the size of
9849         the method info data.
9850
9851         * mini.h: Bump AOT file format version.
9852
9853 2004-12-27  Martin Baulig  <martin@ximian.com>
9854
9855         * mini.c (mini_get_method): New static method; call
9856         mono_get_method_full() and mono_get_inflated_method().
9857         (mono_method_to_ir): Use mini_get_method() instead of
9858         mono_get_method_full(). 
9859
9860 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
9861
9862         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
9863
9864 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
9865
9866         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
9867
9868         * inssel-amd64.brg: Add some optimization rules.
9869
9870 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
9871
9872         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
9873         standard not GC'd stuff is fine.
9874
9875 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
9876
9877         * aot.c: Rework the AOT file format to get rid of most of the global
9878         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
9879
9880         * mini.h: Bump AOT file format version.
9881         
9882 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
9883
9884         * mini.h: Bump AOT file format version.
9885
9886         * aot.c (mono_aot_is_got_entry): New function to determine if an 
9887         address is inside a GOT.
9888
9889         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
9890
9891         * cpu-pentium.md: Increase the maximum size of some instructions which
9892         might involve a got access.
9893         
9894         * mini.c (get_method_from_ip): Another debug helper function.
9895
9896         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
9897         when got var accesses are created during the decompose phase.
9898
9899         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
9900
9901         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
9902         argument mini_compile_method and to MonoCompile, and use this to
9903         determine whenever a given method is compiled for AOT. This allows the
9904         other methods compiled during AOT compilation to be free of AOT stuff,
9905         so the backends does not need to add special support for them by
9906         creating a fake GOT etc.
9907
9908         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
9909         longer needed.
9910
9911 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
9912
9913         * mini.c (mono_method_to_ir): It turns out that some of the
9914         x-appdomain wrappers are lax with types, so just ignore this for
9915         all wrappers.
9916
9917         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
9918         at the vtable->klass. If it is non-shared code we can just use the
9919         vtable.
9920
9921 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
9922
9923         * mini-ppc.c: access MonoDomain from tls, too.
9924
9925 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
9926
9927         * declsec.c: Removed unused variable (and related warning ;-)
9928
9929 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
9930
9931         * iltests.il: New test for LDELEMA on an array of ref types.
9932
9933         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
9934         all ldelema's on reftypes.
9935         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
9936         it was the wrong place to put it.
9937
9938         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
9939         register to pop to make this cleaner, at the request of Paolo.
9940
9941 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
9942
9943         * mini-ops.h (OP_GETHASHCODE): New op.
9944
9945         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
9946
9947         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
9948         operation.
9949
9950         For a microbenchmark, this reduces the cost of Hashtable.get_Item
9951         by 25%.
9952         
9953         * mini-x86.c (mono_arch_output_basic_block): Rather than
9954
9955         add ebp, 4
9956
9957         Emit
9958
9959         pop edx
9960
9961         The first is 3 bytes while the second is 1. This saves 36 kb on
9962         mscorlib, quite a big saving. When bootstraping mcs, I was able to
9963         see a small boost because of icache locality.
9964
9965         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
9966
9967 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
9968
9969         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
9970         started code sharing with the generic code.
9971
9972 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
9973
9974         * mini-ppc.c, cpu-g4.md: added code for direct access to
9975         tls data slots.
9976
9977 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
9978
9979         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
9980          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
9981         to OP_TLS_GET.
9982
9983 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
9984
9985         * declsec.c|h: Added functions to cache the declarative stack modifiers
9986         in MonoJitInfo and to create a security frame from a MonoJitInfo 
9987         structure.
9988         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
9989         created. Register internal calls for System.Security.SecurityFrame::
9990         _GetSecurityFrame and _GetSecurityStack.
9991         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
9992         the definitions for the new stack walk/callback mechanism.
9993         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
9994         first security frame for LinkDemands and InheritanceDemands) and
9995         GetSecurityStack for Demands. Both use the new mono_walk_stack code
9996         from lupus.
9997         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
9998         walk initialization (lupus).
9999
10000 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
10001
10002         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
10003         idiom.
10004         (handle_loaded_temps): Do not create a temporary variable for
10005         things that we know are temps. They will never be modified.
10006         (mono_spill_call): Set MONO_INST_IS_TEMP
10007         (mono_emulate_opcode): ditto
10008         (emit_tree): ditto
10009         (mono_method_to_ir.CEE_DUP): ditto
10010
10011 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
10012
10013         * mini.c (type_to_eval_stack_type): Make this handle the void type
10014         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
10015         (emit_tree): use ip_in_bb to special case some common idioms
10016         Update all callers to pass in the IP.
10017         (mono_method_to_ir): Make CEE_CALL* do the above as well.
10018
10019         This gives us a nice 2% speedup in mcs bootstrap.
10020
10021         * mini-x86.c (peephole_pass): Peephole pass to make
10022         mov  [foo], eax
10023         push [foo]
10024
10025         into
10026
10027         mov [foo], eax
10028         push eax
10029
10030         * mini.c (ip_in_bb): new method.
10031         (mono_method_to_ir): use this method rather than doing the hash
10032         lookup ourselves.
10033
10034         * linear-scan.c (mono_linear_scan): When expiring actives, you
10035         don't need to keep around variables that expire on this
10036         instruction. This makes it so that:
10037              a = b + 1
10038         will turn into:
10039              store (ebx add (ebx, 1))
10040         which will become
10041              add ebx, 1
10042
10043 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
10044
10045         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
10046         combination to avoid doing two copies. Fix up problems with previous
10047         patch.
10048
10049         * mini.c: Fix 64 bit warnings.
10050
10051         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
10052
10053 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
10054
10055         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
10056         changes from the x86 code.
10057
10058         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
10059
10060 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
10061
10062         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
10063         throwing code to reduce its size, unify the AOT and non-aot code and 
10064         get rid of relocations in the AOT case.
10065
10066         * mini-x86.h mini.c exceptions-x86.c 
10067         (mono_arch_get_throw_corlib_exception): New arch specific function to 
10068         raise corlib exceptions which doesn't require relocations in the 
10069         caller.
10070
10071         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
10072
10073 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
10074
10075         * mini.c (mono_emit_method_call): Only allocate the got var when it is
10076         needed.
10077
10078         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
10079         in the AOT case.
10080
10081 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10082
10083         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
10084         with add function when used from Inc/dec atomic 
10085         functions. Re-enabled optimization on x86.
10086         * mini-ops.h: renamed atomic_add functions to
10087         allow _add to match the Interlocked::Add and
10088         _add_next to match Interlocked::Inc/Dec.
10089
10090 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
10091
10092         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
10093         linking of BBs to the end BB, and enabled SSAPRE also with
10094         consprop and copyprop (which was prevented by that bug).
10095
10096 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10097
10098         * mini-x86.c: disabling the Interlocked optimizing code. 
10099
10100 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
10101
10102         * aot.c (load_aot_module): Move reading of got_addr after the AOT
10103         file version check.
10104         
10105 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10106
10107         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
10108         interlocked optimization due lack of support on x86, rewrote 
10109         exchange to take into account that base may be in eax.
10110         
10111         xsp works again; activated Interlocked optimizing code.
10112         
10113 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
10114
10115         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
10116
10117 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
10118
10119         * mini-ops.h: Add new opcodes.
10120
10121         * mini.h: Add new patch types. Add got_var to MonoCompile.
10122
10123         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
10124         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
10125         make it work with all kinds of patchable code.
10126
10127         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
10128         address of the GOT, and referencing entries in the GOT.
10129
10130         * mini.c: Add code to load the GOT address if needed by an opcode.
10131
10132         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
10133         independent AOT code on the x86 using an elf-style Global Offset Table.
10134
10135 2004-12-14  Raja R Harinath  <rharinath@novell.com>
10136
10137         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
10138
10139 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10140
10141         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
10142         when running xsp.
10143
10144 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
10145
10146         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
10147         of Interlocked:Increment/Decrement/Add as inline ops.
10148         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
10149
10150 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
10151
10152         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
10153         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
10154
10155 2004-12-12  Duncan Mak  <duncan@ximian.com>
10156
10157         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
10158         again. `patch_info->table_size' is no longer valid after Zoltan's
10159         commit #37636.
10160
10161 2004-12-12  Martin Baulig  <martin@ximian.com>
10162
10163         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
10164         if we are the "real" method, ie. not an inlined method inside it.
10165
10166 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
10167
10168         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
10169         before we look in the special fields table. This fixes
10170         ../tests/thread-static-init.cs.
10171
10172 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10173
10174         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
10175         for Array get_Rank and get_Length. Fixes bug #70465.
10176
10177 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
10178
10179         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
10180         separate structure to reduce the size of MonoJumpInfo.
10181
10182 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
10183
10184         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
10185
10186 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
10187
10188         * mini.c (mini_get_inst_for_method): Changed to allow ports
10189         to return a MonoInst instead of opcode 
10190         (renamed mini_get_opcode_for_method to better reflect the new functionality)
10191         
10192         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
10193         Allow ports to return a created MonoInst instead of op-code, will enable
10194         new optimizations.
10195         (renamed mini_get_opcode_for_method to better reflected the functionality)
10196
10197 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
10198
10199         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
10200
10201 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
10202
10203         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
10204         Fixes #69985.
10205
10206 2004-12-08  Martin Baulig  <martin@ximian.com>
10207
10208         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
10209         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
10210
10211 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
10212
10213         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
10214         correctly.
10215
10216         * exceptions.cs: Disable some tests which depend on properties of x86 fp
10217         arithmetic.
10218
10219 2004-12-08  Raja R Harinath  <rharinath@novell.com>
10220
10221         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
10222
10223 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
10224
10225         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
10226         bug introduced by the previous patch.
10227
10228 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
10229
10230         * mini-ppc.c, objectc.cs: handle large structs passed by value
10231         (fixes bug #69972).
10232
10233 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
10234
10235         * mini-ppc.c: OP_ARGLIST implementation from
10236         Geoff Norton  <gnorton@customerdna.com>.
10237
10238 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
10239
10240         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
10241         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
10242
10243 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
10244
10245         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
10246
10247 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10248
10249         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
10250         support.
10251
10252 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
10253
10254         * mini-sparc.c: Zero out localled-ed memory.
10255
10256         * iltests.il: Add tests for zeroing out localloc-ed memory.
10257
10258 2004-12-04  Martin Baulig  <martin@ximian.com>
10259
10260         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
10261         mono_method_get_signature_full().       
10262
10263 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
10264
10265         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
10266         and some utility functions (always for SSAPRE), integrated SSAPRE.
10267         * mini.h: Likewise.
10268         * driver.c: Added ssapre option.
10269         * ssa.c: Small fix on OP_ARG handling.
10270         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
10271         * Makefile.am: Likewise.
10272
10273 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
10274
10275         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
10276         now in the xp code.
10277
10278         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
10279         icall.
10280
10281 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10282
10283         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
10284         
10285         * cpu-s390.md : Increase instruction length of oparglist.
10286
10287         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
10288
10289 2004-11-30  Martin Baulig  <martin@ximian.com>
10290
10291         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
10292         virtual generic methods.  We call a special helper_compile_generic_method()
10293         icall to retrieve the method from the vtable, inflate and compile
10294         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
10295
10296         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
10297
10298 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
10299
10300         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
10301
10302 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
10303
10304         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
10305         Fixes #69929.
10306
10307 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
10308
10309         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
10310         platforms with PIC aot.
10311
10312 2004-11-28  Martin Baulig  <martin@ximian.com>
10313
10314         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
10315         Fixes gen-112.cs.
10316
10317 2004-11-28  Martin Baulig  <martin@ximian.com>
10318
10319         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
10320         the result of mono_type_get_underlying_type() to check whether
10321         we're byref.
10322
10323 2004-11-26  Martin Baulig  <martin@ximian.com>
10324
10325         * mini.c
10326         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
10327         in the g_assert().
10328
10329 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
10330
10331         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
10332         the same way as the other arguments so they won't get clobbered.
10333
10334         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
10335         calls through R11 since it is clobbered by the trampoline code.
10336
10337 2004-11-26  Raja R Harinath  <rharinath@novell.com>
10338
10339         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
10340         pick up in-tree mscorlib.dll.
10341
10342 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
10343
10344         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
10345
10346         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
10347         runtime data/code are now stored in a table similar to the GOT in ELF. 
10348         This allows the code itself to be position independent.
10349
10350         * aot.c: Fix loading of referenced assemblies after the lazy assembly
10351         loading changes.
10352
10353         * aot.c: Attach ELF type (object/function) directives to all global
10354         symbols.
10355
10356         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
10357
10358         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
10359
10360         * mini-amd64.h: Turn on PIC AOT code.
10361
10362         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
10363         returning the offset within an OP_AOTCONST instruction where the GOT
10364         offset needs to be added.
10365
10366         * mini.h: Bump AOT file format version.
10367
10368 2004-11-25  Martin Baulig  <martin@ximian.com>
10369
10370         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
10371         uninflated generic methods.
10372
10373 2004-11-25  Martin Baulig  <martin@ximian.com>
10374
10375         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
10376
10377 2004-11-24  Martin Baulig  <martin@ximian.com>
10378
10379         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
10380         original klass (this only applies for generic instances).
10381
10382 2004-11-24  Martin Baulig  <martin@ximian.com>
10383
10384         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
10385         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
10386         that array).
10387
10388 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
10389
10390         * mini.c (mono_method_to_ir): Disable inlining for methods containing
10391         localloc. Fixes #69678.
10392
10393         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
10394         
10395 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
10396
10397         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
10398         used SSE registers on pinvoke calls. Fixes #69774.
10399
10400 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
10401
10402         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
10403         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
10404
10405 2004-11-23  Raja R Harinath  <rharinath@novell.com>
10406
10407         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
10408         Refer directly to the mcs/ tree.
10409
10410 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10411
10412         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
10413         Check if a trampoline for a synchronized method is required. 
10414
10415 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
10416
10417         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
10418         with localloc if needed. Throe arithmetric exception in
10419         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
10420         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
10421
10422 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
10423
10424         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
10425         types before switching on type.  Fixes #69622.
10426
10427 2004-11-19  Raja R Harinath  <rharinath@novell.com>
10428
10429         * Makefile.am (check-local): New.  Integrate into 'make check'.
10430         (MCS,RUNTIME): Define using in-tree mono and mcs.
10431         (ILASM): New.
10432         (%.exe): Use $(ILASM).
10433
10434 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
10435
10436         * mini-ppc.c: adjust initial prolog size (bug #69691).
10437
10438 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
10439
10440         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
10441         #69664.
10442
10443 2004-11-17  Raja R Harinath  <rharinath@novell.com>
10444
10445         * Makefile.am (clean-local): Rename from 'clean'.
10446
10447 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10448
10449         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
10450         to mono_arch_is_int_overflow. 
10451         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
10452         SIGFPE events.
10453
10454 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
10455
10456         * declsec.c|h: New files to support declarative security attributes.
10457         Added function to check if a method has (applicable) security.
10458         * mini.c|h: Add check for declarative security attributes in
10459         mono_method_check_inlining.
10460         * Makefile.am: Added declsec.c and declsec.h to the build.
10461
10462 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
10463
10464         * mini.c, mini.h: update to keep dynamic code info per-domain.
10465
10466 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
10467
10468         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
10469         (mini_init): Get rid of it from here too.
10470
10471 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
10472
10473         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
10474         implemented OP_RETHROW (patch by Geoff Norton
10475         <gnorton@customerdna.com>).
10476
10477 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
10478
10479         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
10480         between appdomains.  Fixes appdomain-unload on PPC.
10481
10482 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
10483
10484         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10485         mini-exceptions.c: handle the new wrapper types.
10486         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
10487         token value as a MonoClass* when compiling a wrapper.
10488         mono_jit_create_remoting_trampoline now takes an additional
10489         MonoRemotingTarget parameter.
10490         
10491 2004-11-10  Martin Baulig  <martin@localhost>
10492
10493         * mini.c (mono_method_to_ir): Use `generic_container->context'
10494         rather than creating a new one.
10495
10496 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10497
10498         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
10499
10500         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
10501
10502 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
10503
10504         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
10505         the experimental aot cache stuff.
10506
10507 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
10508
10509         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10510         mini-exceptions.c: update to exception clause structure changes.
10511
10512 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
10513
10514         * exceptions-x86.c (throw_exception): Fix warnings.
10515
10516         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
10517         for OP_RETHROW.
10518
10519 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
10520
10521         * exceptions-sparc.c (get_throw_exception): Really fix this.
10522
10523 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
10524
10525         * tramp-*.c: we no longer support icalls without wrappers, so
10526         a bit of code can be removed here
10527
10528 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
10529
10530         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
10531         patch.
10532
10533         * cpu-sparc.md: Add op_rethrow.
10534
10535         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
10536
10537         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
10538
10539         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
10540         * mini-ops.h: Add OP_RETHROW.
10541
10542         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
10543
10544         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
10545
10546 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
10547         
10548         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
10549         Makes the output much easier to read
10550
10551 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
10552
10553         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
10554         prevents another huge leak when compiling with ssa. Secondly, the
10555         performance of doing this rather than freeing the lists is much
10556         better. GList does a lock every time you allocate a list link,
10557         so that it can use a memory pool. So, it is better to just use
10558         a memory pool of our own.
10559         
10560         * ssa.c, linear-scan.c: replace g_list_remove_link with
10561         g_list_delete.  The remove one does not free the GList, so we were
10562         leaking memory. On -O=all --compile-all with corlib, this cut down
10563         3 MB of allocations.
10564
10565 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
10566
10567         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
10568
10569         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
10570
10571         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
10572         into a new function mono_create_jit_trampoline ().
10573
10574 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
10575
10576         * trace.c (get_spec): Allow tracing of classes without a namespace.
10577
10578 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
10579
10580         * mini.c: Fix pointer overwrite in mini_method_compile.
10581
10582 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
10583
10584         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
10585         The darwin ABI needs some special handling for 1 and 2 byte structs
10586         Lets use lbz/lhz instead of lwz everywhere.
10587         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
10588         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
10589         Use stb/sth for the former, and put the latter always on stack instead of in
10590         argument registers.
10591
10592 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
10593
10594         * trace.c (is_filenamechar): Add '_'.
10595
10596 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
10597
10598         * mini-s390.c: Fix prolog length to allow for large trace requirements.
10599
10600         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
10601
10602 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
10603
10604         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
10605         depends on libmonogc. Fixes #68805.
10606
10607 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
10608
10609         * mini.c (mono_jit_free_method): Provide extra information for
10610         this error.  Currently this leaks, but will be turned into a
10611         developer option in the future.
10612
10613 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
10614
10615         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
10616
10617 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
10618
10619         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
10620         boundary. Fixes reading of PATCH_INFO_R4 and R8.
10621         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
10622
10623 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
10624
10625         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
10626         trampolines for AOT code.
10627
10628 2004-10-22    <vargaz@freemail.hu>
10629
10630         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
10631         constructed types. Fixes #68136.
10632
10633 2004-10-21  Martin Baulig  <martin@ximian.com>
10634
10635         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
10636         if it returns true, unwind the stack to the call instruction.
10637
10638 2004-10-21    <vargaz@freemail.hu>
10639
10640         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
10641
10642         * mini.h: Bump AOT version number.
10643
10644         * objects.cs: Add another test for unbox trampolines.
10645
10646         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
10647         valuetype methods.
10648
10649 2004-10-20    <vargaz@freemail.hu>
10650
10651         * driver.c: Add SHARED to the set of optimizations tested.
10652
10653         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
10654
10655         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
10656         used by CEE_NEWARR.
10657
10658         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
10659
10660 2004-10-20  Martin Baulig  <martin@ximian.com>
10661
10662         * mini-exceptions.c (mono_handle_exception): Call
10663         mono_debugger_handle_exception() to tell the debugger about
10664         catch/finally clauses.
10665
10666 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
10667
10668         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
10669
10670         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
10671         #68447.
10672
10673 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
10674
10675         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
10676         methods as their native size, fixed bug #57543, #57545.
10677         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
10678         This saves a temporary register and mullw call down into 1 (minor perf
10679         increase for cases like sum = sum * 5;  This use to translate into:
10680             li r11,5
10681             mullw r28,r28,r11
10682         It now translates to
10683             mulli r28,r28,5
10684
10685 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
10686
10687         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
10688         #68388.
10689
10690 2004-10-11  Martin Baulig  <martin@ximian.com>
10691
10692         * mini.c (mono_method_to_ir): If we're a generic method, get the
10693         MonoGenericContainer from our MonoMethodNormal and create a
10694         MonoGenericContext from it.
10695
10696 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
10697
10698         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
10699
10700         * basic-long.cs: Add test for checked i8->i2 cast.
10701
10702 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10703
10704         * inssel-ppc.brg: added a couple of speedup rules.
10705
10706 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
10707
10708         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
10709         to speed up rebuilds.
10710
10711 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10712
10713         * mini-s390.c: Minor fix to OP_OR_IMM.
10714
10715 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
10716
10717         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
10718         better. Fixes appdomain-unload.exe on sparc.
10719
10720 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
10721
10722         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
10723         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
10724         see bug 67324.
10725
10726 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
10727
10728         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
10729
10730 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
10731
10732         * mini.c: Always generate a field read/write wrapper for members
10733         of the class MarshalByRefObject since the actual instance could
10734         be a CBO.
10735
10736 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
10737
10738         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
10739
10740 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
10741
10742         * driver.c mini.h trace.c: Move the setting of the main assembly into
10743         a separate function called mono_trace_set_assembly () and call it after
10744         actually loading the main assembly. Fixes #66872.
10745
10746 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
10747
10748         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
10749         using the code manager.
10750
10751 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
10752
10753         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
10754
10755 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
10756
10757         * cpu-amd64.md: Fix bug in previous patch.
10758         
10759         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
10760         #66650.
10761
10762 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
10763
10764         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10765         mini-exceptions.c: updates for changed stack walk interface.
10766
10767 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10768
10769         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
10770
10771 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
10772
10773         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
10774
10775 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
10776
10777         * driver.c (mini_regression_list): Do not call mono_assembly_close 
10778         since assemblies can't be unloaded.
10779         
10780 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
10781
10782         * cpu-amd64.md: Fix more instruction lengths.
10783
10784         * cpu-amd64.md: Fix lengths of some instructions.
10785
10786 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
10787
10788         * inssel.brg: Make the array ldelema check aot friendly.
10789
10790 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
10791
10792         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
10793
10794         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
10795
10796 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
10797
10798         * mini-x86.c: Fix build.
10799
10800         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
10801         mono_type_get_underlying_type () helper function to simplify code.
10802         
10803 2004-09-09  Martin Baulig  <martin@ximian.com>
10804
10805         * mini-amd64.c: Don't access `type->data.klass' directly, call
10806         mono_class_from_mono_type() instead since the type may be a
10807         generic instance.
10808
10809 2004-09-09  Martin Baulig  <martin@ximian.com>
10810
10811         * mini-amd64.c (get_call_info): Fix support for generic instances.
10812         (add_valuetype): Use mono_class_from_mono_type() to get the class
10813         since we can be a generic instance.
10814
10815 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
10816
10817         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
10818
10819 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
10820
10821         * liveness.c: reset spill costs on each scan: bug 62107
10822
10823 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
10824
10825         * exceptions-sparc.c (mono_arch_find_jit_info): remove
10826         unnecessary line that doesn't compile
10827
10828 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
10829
10830         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
10831         trampolines, make them call an error function so people can fix their
10832         code.
10833
10834 2004-09-06  Martin Baulig  <martin@ximian.com>
10835
10836         * mini.c (mono_method_to_ir): When initializing locals, handle a
10837         generic instances like a valuetype if it's a valuetype and like a
10838         class if it's a class.
10839
10840 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
10841
10842         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
10843         stack. Fixes #64674.
10844
10845         * exceptions.cs: Add test for unwinding of call arguments.
10846
10847 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
10848
10849         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
10850         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
10851         set the carry/borrow flag). The sparc and s390 implementations
10852         can now use optimized versions (and simplify the code). ppc bugfixes.
10853
10854 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
10855
10856         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
10857
10858 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
10859
10860         * inssel-amd64.brg: Remove leftover 32 bit rule.
10861
10862         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
10863
10864 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
10865
10866         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
10867         mono_arch_find_jit_info functions into a new function. Fix a memory
10868         leak.
10869
10870         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
10871         refactored code.
10872         
10873 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
10874
10875         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
10876         as well.
10877         
10878         * exceptions.cs: Add array size tests.
10879
10880         * mini.c: Allocate a separate icall wrapper for each arity of 
10881         mono_array_new_va. Fixes #59509.
10882
10883         * exceptions.cs: Add testcase for 64578.
10884
10885         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
10886
10887         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
10888         
10889 2004-09-02  Martin Baulig  <martin@ximian.com>
10890
10891         * mini.c (mono_method_to_ir): When initializing the locals, call
10892         handle_initobj() on the generic instance itself, not its
10893         underlying type.
10894
10895 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
10896
10897         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
10898         MonoJitInfo for dynamic methods.
10899
10900         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
10901
10902         * mini.c: Add support for freeing JIT data for dynamic methods.
10903         
10904 2004-09-01  Martin Baulig  <martin@ximian.com>
10905
10906         * mini-x86.c (is_regsize_var): Added support for generic
10907         instances.
10908         (mono_arch_emit_prolog): Make this compile again, use
10909         `x86_push_imm_template (code)'.
10910
10911 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
10912
10913         * mini-x86.c: make all push_imm instructions that get
10914         patched always emit the long form
10915
10916 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
10917
10918         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
10919         in a per-domain hash.
10920
10921         * mini-amd64.c (merge_argument_class_from_type): Handle generic
10922         types.
10923
10924 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
10925
10926         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
10927         work.
10928         
10929         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
10930         work.
10931
10932         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
10933         Beginnings of SSE2 support.
10934
10935         * exceptions.cs: Add more tests for checked int<->uint casts.
10936
10937 2004-08-28  Martin Baulig  <martin@ximian.com>
10938
10939         * mini-x86.c (mono_arch_instrument_epilog): Added support for
10940         generic instances.
10941
10942         * mini.c
10943         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
10944         Handle generic instances recursively.
10945
10946 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
10947
10948         * iltests.il: test for conv.u8 on a constant
10949
10950 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
10951
10952         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
10953         LCONV_x4 (shrun_32 (membase)).
10954
10955 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
10956
10957         * inssel-x86.brg: c&p rules for push/setret of long
10958
10959 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
10960
10961         * inssel-x86.brg: c&p rules for compare (base, regvar) and
10962         compare (regvar, base)
10963
10964         * inssel-x86.brg: more burg love
10965
10966         * inssel.brg: more cleanup
10967
10968         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
10969
10970 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
10971
10972         * basic-long.cs, basic-calls.cs: new tests for optimization.
10973
10974 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
10975
10976         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
10977         patch.
10978
10979 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
10980
10981         * mini-amd64.c (read_tls_offset_from_method): Add another case.
10982         
10983 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
10984
10985         * inssel.brg (mini_emit_memcpy): use 
10986         NO_UNALIGNED_ACCESS to disable memcpy optimization
10987
10988 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
10989
10990         * mini-amd64.c: Handle generic types in various places.
10991
10992         * mini.c (mono_method_to_ir): Handle generic types in init locals.
10993
10994 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
10995
10996         * mini.c (handle_box): Fix warning.
10997
10998         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
10999
11000         * mini-amd64.h: Enable the emit_state optimization.
11001
11002         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
11003
11004         * mini-amd64.c: Add some new 64 bit peephole opts.
11005
11006         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
11007
11008         * cpu-amd64.md: sreg1 of div instructions must be %rax.
11009
11010         * mini-amd64.c: Register allocator fixes.
11011
11012         * mini.c: Add an optimization to emit_state to avoid allocation of new
11013         registers on some platforms.
11014
11015 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
11016
11017         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
11018
11019         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
11020         allocation. Fixes #63085.
11021
11022         * basic-long.cs: Add new regression test.
11023
11024         * mini-amd64.c: Register allocator improvements.
11025
11026 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
11027
11028         * mini-amd64.c (read_tls_offset_from_method): Add another code
11029         sequence.
11030
11031         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
11032         instruction sequence for nullifying class init trampolines.
11033
11034         * objects.cs: Add new regalloc test.
11035
11036         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
11037
11038 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
11039
11040         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
11041         
11042         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
11043         arguments.
11044
11045         * driver.c: Fix profiling after TLS changes.
11046         
11047         * driver.c (mono_main): Set mono_stats.enabled if needed.
11048
11049         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
11050         CEE_BOX.
11051
11052 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
11053
11054         * mini-x86.c: use a 1 op rather than a 2 op tls access
11055         instruction -> faster.
11056
11057 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
11058
11059         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
11060         x86 backend.
11061
11062 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
11063
11064         * exceptions-sparc.c (throw_exception): fix typo
11065
11066 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
11067
11068         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
11069         set tree->dreg correctly with tls. Allow any
11070         register to be used.
11071
11072         * mini-x86.c (read_tls_offset_from_method): add new code
11073         generation pattern seen with GCC.
11074
11075
11076 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11077
11078         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
11079         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11080         exceptions-sparc.c: fix some performance issues in exception
11081         handling and setting of the stack trace for exceptions that were
11082         already thrown.
11083
11084 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
11085
11086         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
11087         x86 backend.
11088         
11089         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
11090         registers.
11091
11092 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11093
11094         This patch inlines tls access, when possible.
11095         
11096         * mini.h: new arch functions for TLS intrinsics.
11097         All platforms updated with a stub.
11098
11099         * mini.c: use the new intrinsics
11100
11101         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
11102         arch specific intrinsic for tls variables
11103
11104 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
11105
11106         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
11107         under windows.
11108
11109 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11110
11111         * mini.c: thread local allocation
11112
11113 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
11114
11115         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
11116
11117         * Makefile.am: Link against the static version of libmonogc.
11118         
11119         * Makefile.am: Link the static versions of the convenience libraries
11120         into the mono executable.
11121
11122         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
11123
11124 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
11125
11126         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
11127         on integer overflow.
11128
11129         * mini-amd64.c: Reorganize function call code.
11130
11131         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
11132
11133 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
11134
11135         * inssel-x86.brg: use xor eax,eax.
11136         
11137         * basic.cs: new tests
11138
11139 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11140
11141         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
11142         in exception throwing code.
11143         
11144 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
11145
11146         * inssel-x86.brg: use xor esi,esi.
11147
11148 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11149
11150         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
11151         can trace methods compiled during mini_init () too.
11152
11153         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
11154         CEE_CONV_U4.
11155
11156 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
11157
11158         * Makefile.am: static link on x86 (r=zoltan)
11159
11160 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11161
11162         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
11163         code since it causes some programs to fail.
11164
11165 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
11166
11167         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
11168
11169 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
11170
11171         * mini.c: ovfops_op_map - add STACK_OBJ case for
11172         CONV_I 
11173         * basic.cs: add test_0_pin_string as test
11174         case for above.
11175
11176 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
11177
11178         * Makefile.am: build C# if srcdir != builddir
11179
11180 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11181
11182         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
11183         fall-through blocks.
11184
11185 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11186
11187         * driver.c: enable loop by default again and include abcrem in -O=all.
11188
11189 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
11190
11191         * iltests.il: Add some localloc tests.
11192
11193         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
11194
11195         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
11196         Fixes #62574.
11197
11198         * inssel-amd64.brg: Add some optimizations.
11199
11200         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
11201         for gcc-3.4.
11202
11203         * Makefile.am: Statically link mono against libmono on AMD64.
11204         
11205         * mini-amd64.c inssel-amd64.brg: Optimizations.
11206
11207 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
11208
11209         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
11210
11211         * tramp-amd64.c: Patch calling code in trampolines.
11212
11213 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
11214
11215         * mini-amd64.c: pinvoke struct passing fixes.
11216
11217 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
11218
11219         * mini-sparc.c: redo change, make mono_arch_cpu_init call
11220         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
11221
11222 2004-08-05  Duncan Mak  <duncan@ximian.com>
11223
11224         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
11225         CEE_LDELEM_ANY.
11226
11227 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
11228
11229         * mini-amd64.c (emit_move_return_value): Move return value for normal
11230         calls too.
11231
11232 2004-08-05  Martin Baulig  <martin@ximian.com>
11233
11234         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
11235         `type->type'; just modify `type' itself when dealing with enums
11236         and generic instances.
11237         (check_call_signature): Make `simple_type' a `MonoType *'.
11238
11239 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
11240
11241         * mini.c: Use OP_PADD to add offsets to addresses.
11242
11243         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
11244
11245 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
11246
11247         * mini-sparc.c (mono_arch_emit_epilog): fix check
11248         for folding last op into restore instruction
11249
11250 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
11251
11252         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
11253         helper methods using the code manager.
11254         
11255         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
11256
11257         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
11258
11259 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11260         
11261         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
11262           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
11263
11264         * mini-s390.c: fix tail processing
11265
11266 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
11267
11268         * mini-ppc.c: mul.ovf.un exception name fix.
11269
11270 2004-08-03  Martin Baulig  <martin@ximian.com>
11271
11272         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
11273         instances; before jumping to `handle_enum', also modify `ptype'.
11274
11275 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
11276
11277         * cpu-sparc.md: fcall maximal length too small.
11278
11279 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
11280
11281         * mini-amd64.c mini.h: Add initial support for passing/returning 
11282         structures to/from pinvoked methods.
11283
11284 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
11285
11286         * mini-ppc.c: reg allocator fix.
11287
11288 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
11289
11290         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
11291
11292         * inssel.brg: Optimize memset on 64 bit machines.
11293
11294         * mini-amd64.c: Fix some vararg cases.
11295
11296 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11297
11298         * mini-s390.c: Corrected macro in emit_float_to_int
11299
11300         * s390-abi.cs: Tests to exercise the s390 ABI
11301
11302 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
11303
11304         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
11305         caller saved regs.
11306
11307         * basic.cs: Add a test for add.ovf.un.
11308
11309 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
11310
11311         * mini-sparc.c: add case for OP_IDIV_UN
11312
11313 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
11314
11315         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
11316         
11317         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
11318
11319 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
11320
11321         * basic.cs: regression tests.
11322
11323         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
11324         regressions.
11325
11326 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
11327
11328         * basic.cs: Add a new test.
11329
11330         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
11331         and AOT. Various fixes and optimizations.
11332
11333         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
11334
11335 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
11336
11337         * mini-ppc.c: make sure temp regs are not used for global reg
11338         allocation.
11339
11340 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
11341
11342         * cpu-sparc.md: conv_i8 fix for 64bits
11343
11344         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
11345
11346 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
11347         
11348         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
11349         add opcode for cmp BYTE PTR [eax], imm.
11350
11351         * inssel.brg: Make memcpy and memset takes bases.
11352
11353 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
11354
11355         * *-amd64.*: More AMD64 work.
11356         
11357 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
11358
11359         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
11360         add a compare-not-equal opcode.
11361         
11362 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
11363
11364         * mini.c: Use mono_init_from_assembly instead of mono_init.
11365         
11366 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
11367
11368         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
11369
11370         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
11371
11372         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
11373
11374         * inssel.brg: 64 bit fixes.
11375
11376         * mini.h (MonoCallInst): Add some AMD64 specific data.
11377
11378         * mini.h: Add some OP_P opcodes.
11379
11380 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
11381
11382         * basic.cs: tests for 61797 and 61740
11383
11384 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
11385
11386         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
11387         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
11388
11389 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
11390
11391         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
11392
11393         * *-amd64*.*: Ongoing AMD64 work.
11394
11395 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
11396
11397         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
11398
11399         * *-amd64*: Ongoing AMD64 work.
11400
11401         * mini-arch.h: Add AMD64 support.
11402
11403         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
11404
11405         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
11406
11407         * mini-ops.h: Add new opcodes.
11408
11409         * Makefile.am: Add AMD64 support.
11410
11411         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
11412         rules into the inssel-long*.brg files.
11413
11414         * *-amd64.*: Add beginnings of AMD64 backend.
11415
11416 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
11417
11418         * mini.c (print_dfn): commenting out the code that prints
11419         the cil. With -O=deadce, this makes -v -v crash.
11420         
11421         * cpu-pentium.md: make checkthis have a length of 2
11422
11423 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
11424
11425         * mini-sparc.h: fix implementations of __builtin
11426         functions for Sun compiler for V9.
11427
11428 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
11429
11430         * mini.c: use the new stelem.ref wrapper
11431         * exceptions.cs, arrays.cs: new stelem.ref tests
11432
11433 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11434
11435         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
11436         new XSP should work with these changes).
11437
11438 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
11439         
11440         * inssel-{long32,x86,}.brg: trivial optimizations.
11441         
11442 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
11443
11444         * mini.c: load value when emitting box operation in
11445         constrained calls.
11446
11447 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
11448
11449         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
11450         is one byte shorter than cmp DWORD PTR [eax], 0.
11451
11452 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
11453
11454         * inssel-ppc.brg: arguments on the stack are always
11455         relative to the stack pointer (spotted by Neale Ferguson).
11456
11457 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11458
11459         * exceptions-x86.c: delay appending the method name to the trace until
11460         after mono_jit_info_table_find is called, as this gets the real
11461         MonoMethod.
11462
11463 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
11464
11465         * aot.c: register roots
11466
11467 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
11468
11469         * aot.c : I could just use PLATFORM_WIN32 flag.
11470
11471 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
11472
11473         * aot.c : Reverting the previous fix. This time it broke linux build.
11474
11475 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
11476
11477         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
11478
11479 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
11480
11481         * mini.c (handle_stack_args): Remove some more debugging code.
11482         
11483         * mini.c (handle_stack_args): Remove debug output left in by mistake.
11484
11485         * driver.c mini.h aot.c: Allow additional options to be specified with
11486         --aot and pass them to mono_compile_assembly.
11487
11488         * aot.c: Add experimental code to AOT compile all loaded assemblies
11489         on demand and save the code into a cache in the filesystem.
11490
11491         * aot.c: Add support for more wrapper methods.
11492         
11493         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
11494         58863.
11495
11496         * cpu-*.md: Remove removed opcodes.
11497
11498         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
11499         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
11500         related icalls to marshal.c.
11501
11502 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
11503
11504         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
11505
11506         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
11507
11508         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
11509
11510 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
11511         * liveness.c: If liveness is recomputated we need to reset the information
11512         for each variable. This way, if the liveness range has been narrowed
11513         by optimizations that happened after the last computation, we can return
11514         a smaller range.
11515         
11516         For example, if you have
11517         
11518         {
11519                 int i = 0;
11520                 
11521                 // Tons of code that does not affect i
11522                 
11523                 i = foo ();
11524                 ...
11525         }
11526         
11527         i = 0 is dead code and will be removed by SSA. However, when
11528         linear scan gets to the code, i will still appear to be live
11529         throughout the entire block. This prevents good register allocation.
11530
11531 2004-07-06  Martin Baulig  <martin@ximian.com>
11532
11533         * debug-mini.c (mono_debug_init_method): Allow
11534         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
11535         (mono_debug_add_icall_wrapper): New method.
11536
11537         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
11538
11539 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
11540
11541         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
11542         optimization.
11543
11544 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
11545
11546         * aot.c (mono_aot_load_method): Fix loading of debug info.
11547
11548 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
11549
11550         * aot.c: Add logging support.
11551
11552 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
11553
11554         * mini.h: Add prototype for mono_print_method_from_ip.
11555
11556         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
11557
11558         * inssel.brg: 64 bit fixes.
11559
11560         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
11561         inssel-long32.brg.
11562
11563         * Makefile.am: Add SPARC64 support.
11564
11565 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
11566
11567         * aot.c: Fix alignment problems on 32 bit platforms.
11568
11569 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
11570
11571         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
11572         SPARC64.
11573
11574         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
11575         problems.
11576
11577         * mini.h: Bump AOT file version. Some 64 bit fixes.
11578
11579 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
11580
11581         * inssel-sparc.brg: Add new rule to avoid register moves.
11582
11583         * inssel.brg: Add ldind_to_load_membase helper function.
11584
11585 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
11586
11587         * mini.c: OffsetToStringData intrinsic.
11588         
11589 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
11590
11591         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
11592
11593         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
11594         regression tests.
11595
11596         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
11597 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11598
11599         * mini.c: reinstated mono_compile_get_interface_var()
11600         on x86, too, since the change breaks the Gtk# build there as well.
11601
11602 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11603
11604         * driver.c: remove loop from the default optimizations: it seems to
11605         interact badly with some of the other options (see bug #60613).
11606
11607 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
11608
11609         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
11610         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
11611
11612 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
11613
11614         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
11615         vararg-using methods.
11616
11617 2004-06-21  Martin Baulig  <martin@ximian.com>
11618
11619         * mini/mini-exceptions.c
11620         (mono_handle_exception): Added `gpointer original_ip' argument.
11621         After calling mono_unhandled_exception(), call
11622         mono_debugger_unhandled_exception() and if that returns true,
11623         restore the context and return.
11624
11625 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
11626
11627         * mini-ppc.c: prefer the use of relative branches so
11628         they won't need to be patched in aot code (patch from Patrick Beard).
11629
11630 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
11631
11632         * aot.c: patch from Patrick Beard to make the output assembly
11633         more correct for the MacOSX assembler. Small tweak to
11634         generate sane images on Linux/PPC, too.
11635
11636 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11637
11638         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
11639         case until bug #59509 is fixed (shows up in #60332).
11640
11641 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11642
11643         * mini.c: make sure the needed wrappers are compiled, too, with
11644         precomp.
11645
11646 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
11647
11648         * driver.c: remove NPTL reference in --version output.
11649
11650 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11651
11652         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
11653         generate valid assembly for the Mach-O assembler.
11654
11655 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
11656
11657         * driver.c: don't include abcrem in the all optimization specifier
11658         since it slows down jit compilation too much for now.
11659
11660 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
11661
11662         * mini.c: use BIGMUL only if both operands have the same signage.
11663         * iltests.il: Test for bug 60056. (errors related to signage in
11664         BIGMUL).
11665
11666         r=lupus.
11667
11668 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
11669
11670         * mini.c, aot.c: memory leak fixes.
11671
11672 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11673
11674         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
11675
11676 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
11677
11678         * Makefile.am: remove the -static hack completely, it links in
11679         statically glib as well.
11680
11681 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
11682
11683         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
11684         * exceptions.cs: make it compile with new mcs/csc.
11685
11686 2004-06-03 Massimiliano Mantione <massi@ximian.com>
11687         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
11688         and added relevant test case.
11689
11690 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
11691
11692         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
11693         regressions in gtk-sharp.
11694
11695 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
11696
11697         * exceptions.cs: New regression tests.
11698
11699         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
11700
11701 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
11702
11703         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
11704
11705 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
11706
11707         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
11708
11709         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
11710
11711 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
11712
11713         * mini.c (mono_jit_runtime_invoke): Init class in this
11714         method instead of trusting mono_jit_compile_method to
11715         do the work (because wrappers can be in object class)
11716
11717 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
11718
11719         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
11720
11721         * basic-long.cs: New regression test.
11722
11723 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
11724
11725         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
11726         and div/rem checks.
11727
11728 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
11729
11730         * Makefile.am: fix miguel's change to build mono statically against
11731         libmono (track build dependencies).
11732
11733 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
11734
11735         * cfold.c: Some glib versions do not have G_MININT32.
11736
11737 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
11738
11739         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
11740         with precision of tan, atan, sin and cos, and implemented related
11741         regressions tests (fixes bug 54467, but one new problem appeared and
11742         is not fixed yet).
11743
11744 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
11745
11746         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
11747
11748         * exceptions.cs: Add test for constant folding && division by zero.
11749
11750         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
11751         since driver.c is in libmono too, so the optimization was useless.
11752
11753         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
11754         variable to driver.c so the compiler can emit more efficient code to
11755         access them.
11756
11757 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11758
11759         * Makefile.am: don't distribute generated inssel.[ch] files.
11760
11761 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
11762
11763         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
11764         into the default appdomain. Fixes #58707.
11765
11766         * jit-icalls.c: Remove the broken approximation for truncl, doing
11767         no conversion is better.
11768
11769         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
11770         Fixes #58863.
11771
11772 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
11773
11774         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
11775         of the mcrxr instruction which is not available on some processors
11776         even if it's documented to be. Implement add and sub overflow correctly
11777         (still not complete for long unsigned). Speed up icalls a bit.
11778
11779 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
11780
11781         * mini.c (mono_jit_compile_method_with_opt): Make sure that
11782         we run .cctor in the current domain instead of target_domain.
11783         
11784         Fixes bug #58558, .cctor not being called in -O=shared.
11785
11786 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
11787
11788         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
11789
11790 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
11791
11792         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
11793         which can be done with an imm8, do it that way.
11794         (mono_arch_output_basic_block): ditto for a jmp
11795         (mono_arch_emit_prolog): Computate maximum offset of a label.
11796
11797 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
11798
11799         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
11800         now tries to allocate prefered physical reg's for virtual
11801         regs. This reduces the number of emited spills/loads with
11802         20-30% on our core assemblies.
11803
11804 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11805
11806         * jit-icalls.c: truncl() is not needed and trunc() is
11807         the correct thing to do anyway (bug #58287).
11808
11809 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
11810
11811         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
11812         if available.
11813
11814 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
11815
11816         * driver.c: enable loop optimizations by default.
11817
11818 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
11819
11820         * mini-x86.c: fix calc of max loop size when aligning loops start.
11821
11822 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
11823
11824         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
11825         the stack.
11826
11827 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
11828
11829         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
11830         should set carry.
11831
11832         * basic-long.cs: Add tests for add/subtract of immediates with carry.
11833
11834         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
11835         
11836         * mini.c (inline_method): Allways inline some wrappers even if the cost
11837         is too large. Fixes #58785.
11838
11839         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
11840         
11841 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
11842
11843         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
11844         (crichton@gimp.org). Beginning of support for sparc/linux.
11845
11846         * mini-sparc.c: Optimize retrieval of LMF address.
11847
11848 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
11849
11850         * exceptions-ppc.c:  handle alloca in methods with clauses.
11851
11852 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
11853
11854         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
11855
11856 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
11857
11858         * mini.c: Delegate most of the abort signal work to 
11859           mono_thread_request_interruption, which also handles Stop and Suspend
11860           states.
11861
11862 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
11863
11864         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
11865         supports the save/restore lmf opcodes.
11866
11867 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
11868
11869         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
11870         by gcc-3.4 as well.
11871
11872         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
11873
11874 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
11875
11876         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
11877         methods which contain array accesses.
11878
11879         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
11880         boundaries. Fixes #58537.
11881
11882         * iltests.il: Add regression test for #58537.
11883
11884 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
11885
11886         * mini-x86.c (mono_arch_local_regalloc): Last part of
11887         fix for bug #58633 (releasing register to early).
11888
11889 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
11890
11891         * basic-long.cs: Add new regression test.
11892
11893 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
11894
11895         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
11896         register too early on the chain.
11897
11898 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
11899
11900         * mini.c (create_helper_signature): Use a helper function to reduce
11901         the code which needs to be written. Also set the calling convention of
11902         icalls on windows. Fixes #57840.
11903
11904 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
11905
11906         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
11907         exceptions-ppc.c: added helper function to get the instruction address
11908         from a signal handler context.
11909
11910 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11911
11912         * helpers.c: use g_get_tmp_dir. Invokes happyness 
11913         from gonzalo.
11914
11915 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11916
11917         * helpers.c: Add new env variable to pass args to objdump.
11918         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
11919
11920 2004-05-17  Radek Doulik  <rodo@ximian.com>
11921
11922         * Makefile.am (common_sources): added abcremoval.h so it get
11923         disted and daily mono packages on go-mono.com will build again
11924
11925 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
11926
11927         * abcremoval.c: Fixed coding style, added copyright header.
11928
11929         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
11930
11931         * mini.h: Added prototype for abc removal main function.
11932
11933         * build_relations_propagation_table.pl: Added copyright header.
11934
11935 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
11936
11937         * basic-long.cs: reg test for complex ceq_long bug.
11938
11939 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
11940
11941         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
11942         reg in long and clob case (bug #58343). Fixed/added comments.
11943
11944 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
11945
11946         * mini.c (mono_jit_runtime_invoke): Follow new convention
11947         of calling the invoke method with an function pointer.
11948
11949 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
11950
11951         * ChangeLog: Fix author of memory leak patch.
11952
11953 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
11954
11955         * Makefile.am: fix make dist as well...
11956
11957
11958 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
11959
11960         * cfold.c: Made so that conversions from pointer to int4 are no-ops
11961         on archs where pointers are 4 bytes long.
11962
11963         * Makefile.am: Added abcremoval.c source file.
11964
11965         * abcremoval.c: Added abcremoval.c.
11966
11967         * abcremoval.h: Added abcremoval.h.
11968
11969         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
11970
11971         * inssel.brg: Enabled bounds check removal.
11972
11973         * mini.c: Added support for abcrem optimization.
11974
11975         * mini.h: Added abcrem optimization label.
11976
11977         * driver.c: Added support for abcrem optimization.
11978
11979         * propagated_relations_table.def: Added propagated_relations_table.def.
11980
11981 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
11982
11983         * mini.c, cfold.c: fix style.
11984
11985 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11986
11987         * mini.c: handle issue with the low-level implementation of
11988         some long opcodes (bug #54209).
11989
11990 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
11991
11992         * basic.cs: test for my new cmov stuff.
11993
11994 2004-05-13      Patrik Torstensson
11995
11996         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
11997         opt and added peephole documentation.
11998
11999 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
12000
12001         * tramp-ppc.c: rewrote the generic trampoline code.
12002
12003 2004-05-11      Patrik Torstensson
12004
12005         * mini-x86.c: optimize long shl/shr asm code (one less branch)
12006
12007 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
12008
12009         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
12010
12011         * mini.h mini.c dominators.c: Applied patch from Derek Woo
12012         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
12013
12014         * mini.c: Add new icalls for AsAny marshalling.
12015
12016 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
12017
12018         * tramp-ppc.c, mini-ppc.c: more cleanups.
12019
12020 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12021
12022         * mini.c: no warnings.
12023
12024 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12025
12026         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
12027
12028 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
12029
12030         * mini.c: In the thread abort signal handler, if the thread is in the
12031         process of being stoped, don't throw the Abort exception, just stop the
12032         thread.
12033
12034 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
12035
12036         * tramp-ppc.c: removed old code.
12037
12038 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12039
12040         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
12041         do some simple speed optimizations on ppc.
12042
12043 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12044
12045         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
12046         and large offsets in load/store.
12047
12048 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
12049
12050         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
12051         it causes regressions.
12052
12053 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
12054
12055         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
12056         support.
12057
12058 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12059
12060         * jit-icalls.c: remove warnings.
12061         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
12062         speedups for unsafe code.
12063
12064 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
12065
12066         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
12067
12068 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
12069
12070         * basic-calls.cs: Add new regression test.
12071
12072         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
12073         more portable.
12074
12075         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
12076
12077         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
12078         is no longer used.
12079
12080 2004-05-06      Patrik Torstensson
12081
12082         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
12083         long reg allocation in any reg (not only eax:edx) and implemented 
12084         long shl/shr ops in asm instead of helpers.
12085
12086 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
12087
12088         * mini-sparc.h: Fix warnings.
12089
12090         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
12091         stack.
12092
12093         * mini-exceptions.c (mono_handle_exception): Call the filter in a
12094         separate statement for clarity.
12095
12096         * mini-sparc.c: Update status.
12097
12098 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
12099
12100         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
12101         here.
12102
12103 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12104
12105         * inssel-ppc.brg: another small pre-release workaround:
12106         we don't do overflow detection for long_sub_un.
12107
12108 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12109
12110         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
12111         (also works around a weird ppc bug: 57957).
12112
12113 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
12114
12115         * tramp-ppc.c: trampoline fixes.
12116
12117 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
12118
12119         * mini-ppc.c: fixed typos.
12120
12121 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12122
12123         * mini-ppc.c, exceptions-ppc.c: more code saves registers
12124         at the top of the stack. Fixed typos. Use a frame registers
12125         for all the methods with exception clauses.
12126
12127 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12128
12129         * exceptions-ppc.c: restore fp registers.
12130
12131 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
12132
12133         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
12134         order from the stack top (moved the stack room to save the
12135         return value for trace after the param area). Fixed corruption
12136         in restoring registers on unwind.
12137
12138 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12139
12140         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
12141
12142 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12143
12144         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
12145         and prolog/epilog for methods that use it. Allow
12146         enough param area room for varargs methods. Fix miguel's
12147         breakage in exception handling.
12148
12149 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12150
12151         * Makefile.am: run genmdesc only on current arch.
12152
12153 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12154
12155         * exceptions-x86.c:
12156         * mini-x86.h: fix the build on windows.
12157
12158 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
12159
12160         * 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.
12161
12162         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
12163
12164         * mini-exceptions.c: New file.
12165         
12166         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
12167         Move some parts of the x86 exception handling code to an 
12168         arch-independent file so it can be shared with other ports.
12169
12170 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
12171
12172         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
12173
12174 2004-04-26  David Waite  <mass@akuma.org>
12175
12176         * driver.c: remove comma from end of enumeration declaration
12177
12178 2004-04-26  Jackson Harper  <jackson@ximian.com>
12179
12180         * driver.c: parse config file before loading first assembly. This
12181         allows the user gac to be enabled/disabled. 
12182         
12183 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
12184
12185         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
12186         simpler mechanism: we do not care what is encoded initially
12187         (branch absolute or relative), we care about the code and its
12188         target.  I kept the old code for reference for now.
12189
12190         The new code tries first to determine if the jump is anywhere in
12191         the -/+32 absolute meg range, if it succeeds, it encodes using the
12192         absolute branch;  If not, it tried to find something in the
12193         relative range, if not, it uses the handle_thunk code. 
12194
12195 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
12196
12197         * exceptions-ppc.c: use the correct ip register on macosx.
12198
12199 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
12200
12201         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
12202
12203 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
12204
12205         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
12206         Raise exception on integer divide by zero by hand since the hw
12207         doesn't support it. Handle NaNs in FP compares.
12208
12209 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
12210
12211         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
12212         code reducing duplication between the platforms and enabled
12213         signal exception handling (on linux for now).
12214
12215 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
12216
12217         * exceptions-ppc.c: more macosx support.
12218
12219 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12220
12221         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
12222
12223 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
12224
12225         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
12226
12227 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
12228
12229         * iltests.il: more tests.
12230
12231 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
12232
12233         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
12234         vars as well.
12235
12236 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12237
12238         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
12239
12240 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
12241
12242         * liveness.c: Mark variables as volatile in all basic blocks reachable
12243         from exception clauses.
12244
12245 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
12246
12247         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
12248         inlining.
12249
12250 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
12251
12252         * iltests.il, basic.cs: more tests for regalloc.
12253
12254 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12255
12256         * iltests.il: Some tests for register allocation modifications
12257         I have locally.
12258
12259 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
12260
12261         * exceptions.cs: Add regression test for bug #56782.
12262
12263         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
12264         original stack trace if an exception is rethrown. Fixes #56782. Oh,
12265         the beauty of fixing the same thing in 5 different files...
12266
12267 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
12268
12269         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
12270         methods.
12271
12272 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
12273
12274         * mini.c: Add support for STRWLPARRAY marshalling convention.
12275
12276 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12277
12278         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
12279         to init the context to setup the regs pointer).
12280
12281 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12282
12283         * exceptions-ppc.c: more exceptions work.
12284
12285 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12286
12287         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
12288         not allowed.
12289
12290 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
12291
12292         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
12293         can use the memory directly.
12294
12295         * cpu-pentium.md: Update documentation from a post from Zoltan. 
12296
12297         add x86_add_membase, x86_sub_membase, x86_mul_membase
12298
12299 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
12300
12301         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
12302         GENERAL_REGS they were also hardcoded for all PPC ports.
12303
12304         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
12305
12306         Remove hard-coded limit for floating point registers, use
12307         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
12308
12309         Notice that in MacOS X calling conventions you can fit a lot more
12310         floating point values in registers, so I should update the PInvoke
12311         test to excercise the passing of floating point values on the
12312         stack (currently broken).
12313         
12314 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
12315
12316         * tramp-ppc.c (create_trampoline_code): Added
12317         JUMP_TRAMPOLINE_SIZE. 
12318         (ppc_magic_trampoline): Follow the pattern from
12319         x86_magic_trampoline: if code is set to zero, return. 
12320         (create_trampoline_code): Always pass MonoMethod to the jump
12321         trampoline, before it was passing a null.
12322         (mono_arch_create_jump_trampoline): Implement the jump stub, could
12323         share the code with mono_arch_create_jit_trampoline. 
12324
12325         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
12326         implemented.
12327         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
12328         implemented.  
12329
12330         * cpu-g4.md: Added length for jmp instruction, the worst case
12331         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
12332         for save_lmf).
12333
12334 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
12335
12336         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
12337
12338 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
12339
12340         * mini.c: Only set bblock->real_offset when adding a new bblock, and
12341         before each IL instruction.
12342
12343         * mini.c (CEE_BOX): Fix warnings.
12344
12345 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12346
12347         * mini.c: removed a few unused vars and extra whitespace.
12348
12349 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
12350
12351         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
12352         checks.
12353         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
12354         index.
12355         (OP_GETCHR): use the above
12356         (CEE_LDELEMA): use the above.
12357
12358         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
12359         version of the generic impl.
12360         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
12361         (CEE_LDELEMA): use the above.
12362
12363 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
12364
12365         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
12366         Fixes #56317.
12367
12368         * iltests.il: Added new regression test for #56317.
12369
12370 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
12371
12372         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
12373         under NetBSD. Fixes #56450.
12374
12375         * liveness.c (update_gen_kill_set): Fix previous patch.
12376
12377 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12378
12379         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
12380
12381 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
12382
12383         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
12384         ldsfld and ldsflda.
12385
12386         * inssel-sparc.brg: Add more optimizations.
12387
12388         * mini-sparc.c: Replace multiply/divide with shifts if possible.
12389
12390 2004-04-01  Martin Baulig  <martin@ximian.com>
12391
12392         * mini.c (handle_box): New static function; moved the
12393         implementation of CEE_BOX here.
12394         (mono_method_to_ir): Added `constrained_call' variable.
12395         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
12396         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
12397         mono_method_get_constrained() to get the method.
12398
12399 2004-04-01  Martin Baulig  <martin@ximian.com>
12400
12401         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
12402         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
12403         (mono_method_to_ir): We don't need these macros anymore since
12404         mono_class_get_full() already takes care of it. 
12405
12406 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12407
12408         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
12409         use @function (as doesn't accept #function here) and check the return
12410         value of system and stop if fails.
12411
12412 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12413
12414         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
12415
12416 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
12417
12418         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
12419
12420         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
12421
12422         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
12423         #56223.
12424
12425         * basic-long.cs: Add test for negation of Int64.MinValue.
12426
12427 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
12428
12429         * mini-sparc.c: Update status.
12430
12431         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
12432
12433         * exceptions-sparc.c: Fix return value in filters.
12434
12435         * inssel-sparc.brg: Fix register allocation in some rules.
12436
12437 2004-03-28  Martin Baulig  <martin@ximian.com>
12438
12439         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
12440         if neccessary.  
12441
12442 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
12443
12444         * mini-x86.c (mono_arch_patch_code): Fix warnings.
12445         
12446         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
12447         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
12448         remove unused conv_u4 opcode.
12449
12450         * mini-x86.c: Remove valgrind workaround since it slows down things
12451         even when mono is not run under valgrind.
12452
12453 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
12454
12455         * mini-sparc.c: Update status.
12456
12457         * inssel-sparc.brg: Add some optimizations.
12458
12459         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
12460         future delay slot filling. Add support for varargs, tail calls and JMP.
12461
12462         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
12463         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
12464
12465         * inssel.brg: Fix register allocation in OP_ARGLIST.
12466
12467         * inssel.brg: Fix warnings.
12468
12469 2004-03-25  Martin Baulig  <martin@ximian.com>
12470
12471         * mini.c (inflate_generic_field): Removed.
12472         (mini_get_method): Removed, use mono_get_method_full(),
12473         (mini_get_class): Removed, use mono_class_get_full().
12474         (mono_method_to_ir): Pass our generic context to
12475         mono_field_from_token().        
12476
12477 2004-03-25  Martin Baulig  <martin@ximian.com>
12478
12479         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
12480         of a `MonoMethod *'.
12481         (mini_get_method): Take a `MonoGenericContext *' instead
12482         of a `MonoMethod *'.
12483         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
12484         a new local variable called `generic_context' which holds the
12485         current `MonoGenericContext *'; use it to lookup things.
12486
12487 2004-03-24  Martin Baulig  <martin@ximian.com>
12488
12489         * mini.c (mini_get_class): New static method; if we're inside a
12490         generic instance, inflate the class if neccessary.
12491         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
12492
12493 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
12494
12495         * iltests.il: New regression test for #55976.
12496
12497         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
12498         #55976.
12499
12500 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
12501
12502         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
12503         output.
12504
12505 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
12506
12507         * liveness.c: Consider SSA stores as well as loads when making vars
12508         volatile.
12509
12510         * exceptions.cs: New regression tests for register allocation.
12511         
12512 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
12513
12514         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
12515         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
12516           domain lock only to protect puntual access to data structures.
12517           Added access lock for sighash, jit_icall_hash_name, 
12518           jit_icall_hash_addr and domain->code_mp.
12519
12520 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
12521
12522         * driver.c: Print SIGSEGV handling method.
12523
12524         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
12525
12526         * mini.c (setup_jit_tls_data): Handle case when this is called
12527         multiple times for a thread.
12528
12529         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
12530         is different from fbxx_un. Fixes #54303. Also use constants instead of
12531         magic numbers in a lot of places.
12532
12533 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
12534
12535         * exceptions.cs: Fix cctor test when --regression is used.
12536
12537 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
12538
12539         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
12540         for Linux/ppc.
12541
12542 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
12543
12544         * inssel-ppc.brg: fixed register assignments for some rules.
12545
12546 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
12547
12548         * exceptions.cs: Add test for exceptions in static constructors.
12549
12550         * mini.c (mono_jit_compile_method_with_out): Move the calling of
12551         static constructors outside the domain lock. Fixes #55720.
12552
12553 2004-03-17  Martin Baulig  <martin@ximian.com>
12554
12555         * mini.c (get_generic_field_inst): Removed, this'll never happen.
12556         (inflate_generic_field): Take the `MonoMethod *' instead of the
12557         `MonoClass *' and added support for generic method.
12558         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
12559         have a `field->parent->gen_params', only inflate the field if it's
12560         an open constructed type.
12561
12562 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
12563
12564         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
12565         exception object instead of the preconstructed ones.
12566
12567 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12568
12569         * mini.c: reverted changed to sigsegv_signal_handler commited
12570         accidentally in the previous patch.
12571
12572 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12573
12574         * mini.c:
12575         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
12576         running --aot with an old assembly.
12577
12578 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
12579
12580         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
12581         point values.
12582
12583         * mini-sparc.c: Add support for v9 branches with prediction.
12584
12585 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
12586
12587         * mini.c (mini_init): #warning is GNUC only
12588
12589         * mini-sparc.h: implement __builtin_frame_address
12590         and __builtin_return_address for Sun C compiler
12591
12592 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
12593
12594         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
12595
12596 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
12597
12598         * basic-calls.cs: Add test for unaligned byref long argument passing.
12599
12600         * mini-ops.h: Add sparcv9 compare and branch instructions.
12601
12602         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
12603         v9 instructions if we have a v9 cpu.
12604
12605         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
12606         registers for global allocation.
12607
12608         * exceptions-sparc.c: Fixes.
12609         
12610 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
12611
12612         * liveness.c (mono_analyze_liveness): Optimized version.
12613
12614         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
12615
12616         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
12617         sparc work.
12618
12619         * basic-float.cs basic-calls.cs: New regression tests.
12620
12621 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
12622
12623         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
12624         sigaltstack implementation.
12625
12626         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
12627         
12628         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
12629         stuff if SIGSEGV_ON_ALTSTACK is not defined.
12630
12631 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
12632
12633         * mini.c: Fix warnings.
12634         
12635         * mini.c (mono_resolve_patch_target): New function which contains the
12636         arch independent part of the patching process.
12637
12638         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
12639         patching code to a separate function.
12640
12641 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
12642
12643         * mini.c (add_signal_handler): ifdef out on Windows
12644
12645 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
12646
12647         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
12648         cpu-sparc.md: Add exception handling support + other fixes.
12649
12650         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
12651         typed GC detection in --version.
12652
12653         * basic.cs exceptions.cs: New regression tests.
12654
12655         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
12656         the arch specific code can store data during a compilation.
12657
12658         * mini-ops.h: Add OP_SETFRET.
12659
12660         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
12661         function, register a separate icall for each arity, so the icalls can
12662         get a wrapper.
12663         
12664         * mini.c (mono_print_tree): Print negative offsets in a more readable
12665         form.
12666         
12667         * mini.c: Make signal handling work on sparc.
12668         
12669         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
12670
12671         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
12672
12673         * jit-icalls.c: Emulate truncl by aintl on solaris.
12674
12675         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
12676
12677 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
12678
12679         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
12680
12681 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
12682
12683         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
12684         a MarshalByRef type, inline a method that performs the check, taking into
12685         account that the object can be a proxy. Also implemented tow new opcodes:
12686         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
12687         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
12688         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
12689
12690 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
12691
12692         * mini-ppc.c: if a relative branch displacement is too big
12693         but it points to and area reachable with an absolute branch, 
12694         avoid the thunks.
12695
12696 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
12697
12698         * mini.c: optimize small copies in cpblk.
12699
12700 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
12701
12702         * basic-calls.cs basic-float.cs: New regression tests.
12703
12704         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
12705         negative offsets from %fp. Implement localloc. Fix local register 
12706         allocation. Fix the case when the this argument needs to be saved to
12707         the stack. Implement some missing opcodes.
12708
12709 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
12710
12711         * mini.c (mini_method_compile): Reenable global regalloc in methods
12712         with exception handlers.
12713
12714         * linear-scan.c (mono_varlist_sort): Fix warning.
12715
12716         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
12717
12718         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
12719         regalloc costs.
12720
12721         * liveness.c: Make all variables uses in exception clauses volatile, to
12722         prevent them from being allocated to registers. Fixes #42136.
12723
12724 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
12725
12726         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
12727         causes regressions.
12728
12729         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
12730         argument to mono_arch_regalloc_cost.
12731
12732         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
12733         precisely.
12734
12735 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
12736
12737         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
12738         Make the cost of allocating a variable to a register arch dependent.
12739
12740         * basic-calls.cs: Fix compilation of tests.
12741         
12742         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
12743         helper function to cut back on the number of #ifdefs needed.
12744
12745         * mini-ppc.c: Fix compilation.
12746
12747         * basic-calls.cs: New regression tests.
12748
12749         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
12750
12751         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
12752         of l0 since that is callee saved.
12753
12754         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
12755         to virtual calls.
12756
12757         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
12758         of delay instruction.
12759
12760         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
12761
12762         * mini.h (MonoCallInst): Add 'virtual' flag.
12763
12764         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
12765
12766 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
12767
12768         * *.cs: New regression tests.
12769
12770         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
12771         work.
12772
12773         * mini.c (mono_runtime_install_handlers): Fix build.
12774
12775         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
12776         'signal_stack_size' members.
12777
12778         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
12779         alternate signal stack.
12780
12781         * exceptions-x86.c: Add stack overflow handling.
12782
12783         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
12784         functions to arch independent code.
12785
12786         * mini.c (mono_print_tree): Print more detailed info for load_membase
12787         opcodes.
12788         
12789 2004-02-23  Martin Baulig  <martin@ximian.com>
12790
12791         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
12792
12793 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
12794
12795         * mini-x86.c: fixed reg allocation for div/rem.
12796
12797 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
12798
12799         * driver.c (mono_main): Report some configuratio options on --version.
12800
12801 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
12802
12803         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
12804         low in the address space. Correctly flush memory in thunks where we
12805         output native code.
12806
12807 2004-02-20  Martin Baulig  <martin@ximian.com>
12808
12809         * mini.c (mini_get_method): New static method; inflate all generic
12810         methods and methods in open generic instances.
12811         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
12812         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
12813
12814 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
12815
12816         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
12817
12818         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
12819
12820 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
12821
12822         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
12823
12824         * mini-sparc.c (flushi mono_arch_output_basic_block): make
12825         it compile using Sun's compiler.
12826
12827 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
12828
12829         * 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.
12830
12831         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
12832
12833 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
12834
12835         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
12836         code.
12837         * mini-ppc.c: handle calls outside of the allowed range with thunks
12838         allocated using the code manager.
12839         * tramp-ppc.c: use the code manager to hold generated native code.
12840         Fixed the magic trampoline to just patch vtable entries.
12841
12842 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
12843
12844         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
12845         independent file.
12846
12847 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
12848
12849         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
12850         PPC.
12851
12852         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
12853         if we have a working __thread implementation.
12854
12855         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
12856         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
12857
12858 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
12859
12860         * mini-x86.c: Fix compilation under gcc 2.
12861         
12862 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
12863
12864         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
12865         contains a call to the wrapped function.
12866
12867         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
12868         OP_<CALL>_IMM opcodes, and use them under X86.
12869         
12870         * mini.c (mono_jit_find_compiled_method): Fix warning.
12871
12872         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
12873
12874         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
12875
12876         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
12877         functionality to mini.c.
12878
12879         * mini.c (mono_create_jump_trampoline): New function to create a jump
12880         trampoline. Return a compiled method instead of a trampoline if it
12881         exists. Add a cache for jump trampolines.
12882
12883         * mini.c (mono_jit_find_compiled_method): New function to return a
12884         compiled method if it exists.
12885
12886         * mini-x86.c: Call mono_create_jump_trampoline instead of 
12887         mono_arch_create_jit_trampoline.
12888
12889         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
12890         a jump trampoline. Fixes #52092.
12891         
12892 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
12893
12894         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
12895         which is not up-to-date. Add check_corlib_version () instead.
12896
12897         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
12898         have to call it.
12899         
12900         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
12901         since newer valgrind versions do not need it.
12902
12903         * mini.c (mono_jit_compile_method_with_opt): New helper function to
12904         compile a method with a given set of optimizations.
12905
12906         * mini.c: Compile icall wrappers on-demand instead of at startup.
12907
12908         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
12909         wrapper for an icall.
12910
12911 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
12912
12913         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
12914         #54063.
12915
12916         * iltests.il: Add test for non-empty stack before switch instruction.
12917
12918 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
12919
12920         * mini.c: Add support for new stringbuilder marshalling conventions.
12921
12922         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
12923
12924 2004-02-01  Martin Baulig  <martin@ximian.com>
12925
12926         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
12927         in `ginst->mtype_argv'.
12928
12929 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
12930
12931         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
12932         facilitate grepping.
12933
12934 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
12935
12936         * mini.c: fixed buglet in initobj generic implementation for references.
12937
12938 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
12939
12940         * Makefile.am: make the version script conditional.
12941         * jit-icalls.c: handle missing truncl().
12942
12943 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
12944
12945         * exceptions.cs: Add more tests for double->int conversion.
12946
12947         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
12948         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
12949
12950 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
12951
12952         * driver.c: make --verbose --version emit an error
12953         if the loaded corlib doesn't match the runtime version.
12954
12955 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
12956
12957         * mini-ppc.h: export ppc_patch().
12958         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
12959         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
12960         on par or better than on MacOSX.
12961
12962 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
12963
12964         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
12965         mono_lookup_pinvoke_call.
12966
12967         * mini-x86.c: Under windows, the default pinvoke calling convention is
12968         stdcall. Fixes #52834.
12969
12970         * mini.c (optimize_branches): Add an upper bound to the number of
12971         iterations to prevent infinite loops on strange loops. Fixes #53003.
12972
12973 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
12974
12975         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
12976         and ISINST. Fixes #52093.
12977
12978         * objects.cs (test_0_vector_array_cast): New tests.
12979         
12980 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
12981
12982         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
12983         checking in Array.Set ().
12984
12985         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
12986         #52590.
12987
12988         * object.cs (test_0_multi_array_cast): New regression test.
12989
12990 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
12991
12992         * exceptions-ppc.c: fix build on Linux/PPC.
12993
12994 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
12995
12996         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
12997         running under valgrind.
12998         (x86_magic_trampoline): Fix build bustage.
12999
13000         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
13001         negative values as well. This is needed for the encoding of the line number
13002         info, since sometimes the line numbers are not in increasing order.
13003
13004 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
13005
13006         * cpu-pentium.md (localloc): Increase the size of the localloc 
13007         instruction since it is a loop under Win32.
13008
13009         * debug-mini.c (record_line_number): Get rid of unneccesary memory
13010         allocation.
13011
13012 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
13013
13014         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
13015         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
13016         Max Horn (max@quendi.de). Fix file names in comments.
13017
13018 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
13019
13020         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
13021         avoid stack overflow.
13022         (replace_usage): Avoid uninitialized variable warnings.
13023
13024         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
13025         and taking the address of valuetype variables.
13026
13027 2004-01-03  Patrik Torstensson
13028
13029         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
13030         for other purposes than FP later on.
13031
13032 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
13033
13034         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
13035         of tail calls.
13036
13037 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
13038
13039         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
13040
13041 2003-12-30  Patrik Torstensson <p@rxc.se>
13042
13043         * mini-x86.h: Decreased number of availiable fp regs.
13044         Solves corner cases with FP spilling.
13045
13046 2003-12-23  Patrik Torstensson <p@rxc.se>
13047
13048         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
13049         for floating point stack tracking / spilling on x86. 
13050         Fixes bug #49012.
13051         
13052         * basic-float.cs: added float mul overflow test.
13053
13054 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
13055
13056         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
13057
13058 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13059
13060         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
13061         supports for cond branches that overflow the immediate
13062         overflow offset. mcs can compile simple programs.
13063
13064 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13065
13066         * exceptions-ppc.c: exception handling support wip:
13067         finally handlers get run on exception.
13068
13069 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
13070
13071         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
13072         profiling.
13073
13074 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
13075
13076         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
13077         initial support for stack walking and unwinding.
13078
13079 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
13080
13081         * driver.c (mono_main): Make corlib-out-of-sync message more 
13082         descriptive. Also remove verify_corlib call.
13083
13084 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
13085
13086         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
13087         not overlap with other call's arguments, too.
13088
13089 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
13090
13091         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
13092         move to arch-specific code the choice of arch-specific
13093         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
13094         * mini.c: ensure emulation calls will not interleave
13095         with other calls.
13096
13097 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
13098
13099         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
13100         the magic trampoline stack frame is dropped before executing
13101         the new method.
13102
13103 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13104
13105         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
13106         and integer to fp conversions. Added support for overflowing
13107         arguments on the stack. Reserve a couple more registers as temps.
13108         Added support for aot compilation (as output still needs to be
13109         tweaked, though).
13110
13111 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13112
13113         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
13114         Don't overwrite return register in some corner cases.
13115
13116 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
13117
13118         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
13119         static constructors when AOT compiling.
13120
13121         * driver.c (mono_main): Call mono_check_corlib_version.
13122
13123 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
13124
13125         * cpu-g4.md, basic.cs: fixed div target register.
13126
13127 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
13128
13129         * mini-ppc.c, basic.cs: shl_imm fix with test.
13130
13131 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
13132
13133         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
13134         structures by value. Misc fixes.
13135         * objects.cs: more tests.
13136
13137 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
13138
13139         * mini-ppc.c: lconv.ovf.i implemented.
13140
13141 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13142
13143         * mini.c:
13144         (mini_init): don't error out if someone already called g_thread_init.
13145
13146 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
13147
13148         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
13149         to be any type per the spec. Fix abnormal memory usage when
13150         the same object is repeatedly thrown.
13151
13152 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
13153
13154         * mini.c: check for overruns in IL code.
13155
13156 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
13157
13158         * TODO: Add/remove some todo entries.
13159
13160 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
13161
13162         * driver.c (mono_main): Call mono_verify_corlib.
13163
13164 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
13165
13166         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
13167         This has been moved to mini.c
13168         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
13169         type being casted is marshalbyref it could be a proxy, so instead of
13170         emitting the type check code, emit a call to a runtime method that will
13171         perform the check by calling CanCastTo if needed.
13172
13173 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
13174
13175         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
13176         methods with large stack frames under Win32.
13177
13178 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
13179
13180         * Makefile.am: Distribute regression tests.
13181
13182         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
13183         at the end instead of inserting each variable into the sorted list.
13184
13185         * linear-scan.c (mono_varlist_sort): New helper function.
13186         
13187 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
13188
13189         * mini.c: ensure arguments and locals are within bounds.
13190
13191 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13192
13193         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
13194         related fixes.
13195
13196 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
13197
13198         * mini.c (mono_cprop_copy_values): Fix crash.
13199
13200         * aot.c: Set verbosity back to 0.
13201         
13202 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
13203
13204         * regalloc.c: complete memory leak fix by Laurent Morichetti
13205         (l_m@pacbell.net).
13206
13207 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
13208
13209         * driver.c (main_thread_handler): Revert the previous patch.
13210
13211         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
13212         under valgrind.
13213
13214         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
13215         memory from the memory pool.
13216
13217         * driver.c (main_thread_handler): Turn on all optimizations when
13218         --aot is used.
13219
13220         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
13221         an array for better performance.
13222
13223         * regalloc.c (mono_regstate_assign): Fix memory leak.
13224
13225         * debug-mini.c (mono_debug_serialize_debug_info): New function to
13226         serialize the debug info.
13227
13228         * debug-mini.c (mono_debug_add_aot_method): New function to load the
13229         debug info from the serialized representation.
13230
13231         * aot.c: Save debug info into the generated file and load it when 
13232         loading a method.
13233
13234         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
13235
13236 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
13237
13238         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
13239         More FP-related fixes.
13240
13241 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
13242
13243         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
13244         and register allocation buglet. Hello world now runs.
13245
13246 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
13247
13248         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
13249         * tramp-ppc.c: fixed class init trampoline.
13250         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
13251
13252 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
13253
13254         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
13255         mini.c: more ppc changes/fixes.
13256
13257 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
13258
13259         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
13260         Also optimize the case when the arguments are the same in the caller 
13261         and in the callee.
13262
13263         * iltests.il: Add tests for tail calls with valuetype arguments.
13264
13265 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
13266
13267         * mini-ppc.c: fixes for struct return type.
13268
13269 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
13270
13271         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
13272         mono_spillvar_offset() to arch-specific code.
13273
13274 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
13275
13276         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
13277
13278 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
13279
13280         * exceptions-x86.c: Fix stack space leaks.
13281         
13282         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
13283         registers from the lmf if the method has save_lmf set.
13284
13285 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
13286
13287         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
13288         of icall wrappers into InvokeInDomain, since these are now per-domain.
13289
13290 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
13291
13292         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
13293         make some opcode emulation and intrinsic ops enabled/disabled 
13294         according to the architecture. More fixes.
13295
13296 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
13297
13298         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
13299
13300 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
13301
13302         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
13303         arch-specific handling for 'this' and struct return type to
13304         arch-specific code.
13305
13306 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13307
13308         * aot.c: prevent divide by zero error when reporting (it happened with
13309         Accessibility.dll).
13310
13311 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
13312
13313         * mini.h (inst_switch): Remove unused macro.
13314
13315 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13316
13317         * aot.c:
13318         (load_aot_module): free 'info->methods' and 'info' properly. No more
13319         "free(): invalid pointer blah" messages when you have an old aot
13320         compiled assembly.
13321
13322 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
13323
13324         * jit-icalls.c, mini.c: Added support for context static fields.
13325
13326 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
13327
13328         * mini.c (mono_method_blittable): Methods which set LastError are not 
13329         blittable either. Fixes #51108.
13330         
13331 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
13332
13333         * mini.c: flush icache.
13334         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
13335
13336 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
13337
13338         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
13339
13340 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
13341
13342         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
13343         safe on IA32.
13344
13345         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
13346         vararg calls.
13347
13348         * inssel.brg (CEE_MKREFANY): Fix AOT case.
13349
13350 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
13351
13352         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
13353         instruction when the result is discarded.
13354
13355         * iltests.il (test_0_div_regalloc): New regression test.
13356
13357         * arrays.cs: Fix compilation error.
13358
13359 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
13360
13361         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
13362         float rules to inssel-x86.brg: sane architectures with FP registers
13363         don't need to implement these rules.
13364
13365 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
13366
13367         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
13368
13369 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
13370
13371         * mini.h, inssel-long32.brg: fixed endianess issues in int64
13372         implementation of 32 bit systems.
13373
13374 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
13375
13376         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
13377         (Jeroen Zwartepoorte).
13378
13379 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
13380
13381         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
13382         the caller and the callee matches.
13383         
13384         * mini.c (mono_method_to_ir): Add comment.
13385
13386         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
13387         signbit is missing on some platforms.
13388
13389 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
13390
13391         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
13392
13393         * mini.c (setup_jit_tls_data): Call the new function.
13394         
13395         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
13396
13397         * mini-x86.c: Add experimental support for fast access to the lmf
13398         structure under NPTL/Linux 2.6.x.
13399
13400 2003-11-06  Martin Baulig  <martin@ximian.com>
13401
13402         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
13403         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
13404         the debugger.
13405
13406 2003-11-02  Martin Baulig  <martin@ximian.com>
13407
13408         * mini.c (inflate_generic_field): New static method.
13409         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
13410         generic instance and the field is declared in a generic type, call
13411         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
13412
13413 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
13414
13415         * mini.h mini.c (mono_method_same_domain): New function to return
13416         whenever the caller and the callee are in the same domain.
13417
13418         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
13419
13420 2003-10-30  Martin Baulig  <martin@ximian.com>
13421
13422         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
13423         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
13424         method parameters.
13425         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
13426         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
13427
13428 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
13429
13430         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
13431         propagation.
13432
13433         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
13434         object here, so it is in the correct appdomain etc.
13435
13436 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
13437
13438         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
13439         already done.
13440         (mono_method_to_ir): Avoid freeing the type created returned from
13441         mono_type_create_from_typespec, since it is put into an internal cache
13442         by the function. Fixes pointer.exe.
13443
13444         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
13445         trampolines for icalls and pinvokes as well. Fixes #33569.
13446
13447 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
13448
13449         * mini.c: Update after appdomain changes.
13450
13451         * mini.c (mono_jit_compile_method_inner): Allways compile native
13452         method wrappers in the root domain, since there can only be one
13453         instance of them, whose address is stored in method->info.
13454
13455 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
13456
13457         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
13458         environment variable. Instead detect automatically whenever running
13459         under valgrind using the magic macro RUNNING_ON_VALGRIND from
13460         valgrind.h.
13461
13462 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
13463
13464         * trace.c, trace.h: New files that implement the new trace option
13465         parsing. 
13466
13467         * driver.c: Document new --trace options.
13468
13469         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
13470         mini-x86.c: Apply:
13471
13472         -       if (mono_jit_trace_calls)
13473         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
13474
13475         * mini.h: prototypes.
13476         
13477 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
13478
13479         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
13480
13481         * mini.c inssel.brg: Implement typedefbyref opcodes.
13482
13483         * mini.c (mono_jit_compile_method): Remove unused local variable.
13484
13485         * mini.c (mono_jit_compile_method_inner): Ditto.
13486         
13487 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
13488
13489         * tramp-x86.c (x86_class_init_trampoline): Fix build.
13490         
13491         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
13492
13493 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
13494
13495         * mini.c (mono_no_aot): Remove unused global variable.
13496
13497         * mini.c: Thread safety fixes.
13498
13499 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
13500
13501         * mini.c (mono_create_class_init_trampoline): Add a lock around
13502         class_init_hash_addr.
13503
13504         * arrays.cs (test_0_newarr_emulation): Add new regression test for
13505         #30073.
13506
13507         * mini.c: Decompose the NEWARR instruction before decomposing its
13508         arguments. Fixes #30073.
13509
13510 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
13511
13512         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
13513         convention.
13514
13515 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
13516
13517         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
13518
13519         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
13520
13521         * driver.c: Add support for compiling icall wrappers to --compile.
13522
13523 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
13524
13525         * inssel.brg: The empty value in class->interface_offsets is -1, not
13526         0. Fixes #49287.
13527
13528 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
13529
13530         * objects.cs: New test for 'is' operator on an array of interfaces.
13531
13532 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13533
13534         * tramp-ppc.c: update trampoline code to support jumps
13535         and class initialization.
13536
13537 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
13538
13539         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
13540
13541         * inssel.brg (OP_UNBOXCAST): Fix #46027.
13542
13543         * inssel.brg (OP_UNBOX): Remove unused rule.
13544
13545         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
13546         region instead of one for each method. Fixes #47813.
13547
13548 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
13549
13550         * exceptions.cs (test_0_nested_finally): New regression test for
13551         nested exception handlers.
13552
13553         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
13554
13555         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
13556
13557         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
13558         inlining.
13559
13560         * mini.c (mono_method_check_inlining): Make the inlining limit 
13561         configurable by an environment variable.
13562         
13563         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
13564
13565         * mini.h: Bump AOT file version.
13566
13567         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
13568         token, store the image along with the token, since the token might not 
13569         refer to the same image as the method containing the relocation, 
13570         because of inlining.
13571
13572 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
13573
13574         * mini.c (mono_precompile_assemblies): New function to compile
13575         all methods in all loaded assemblies.
13576
13577         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
13578
13579         * regalloc.h regalloc.c (MonoRegState): Change the type of 
13580         iassign and fassign to int*, since they can contain large negative
13581         values if the register is spilled. Also added some comments. Fixes
13582         #45817.
13583
13584         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
13585         under Win32. Fixes #42964.
13586
13587 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
13588
13589         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
13590
13591         * aot.c: Added support for AOT compiling methods which contain calls
13592         to wrappers. Currently, only remoting-invoke-with-check wrappers are
13593         handled.
13594         
13595         * driver.c (compile_all_methods): Run the compilation in a thread
13596         managed by mono. Fixes #44023.
13597
13598         * mini.c (mono_codegen): Print full method name in verbose output.
13599
13600         * mini-x86.c (mono_arch_patch_code): Fix warning.
13601         
13602         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
13603         jumps, since the method we are jumping to might be domain-specific.
13604
13605         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
13606
13607 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13608
13609         * inssel.brg: string chars are unsigned.
13610
13611 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
13612
13613         * TODO: New todo item.
13614
13615         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
13616         which calls mono_runtime_class_init and patches the call site to
13617         avoid further calls.
13618         (mono_arch_create_class_init_trampoline): New arch specific function 
13619         to create a class init trampoline.
13620         (create_trampoline_code): Generalized so it can create
13621         class init trampolines as well.
13622
13623         * mini.c (helper_sig_class_init_trampoline): New helper variable.
13624         (mono_create_class_init_trampoline): New function to create and cache
13625         class init trampolines.
13626         (mono_find_class_init_trampoline_by_addr): New function to lookup the
13627         vtable given the address of a class init trampoline. Used by the
13628         patching process.
13629         (mono_codegen): Generate a call to a trampoline instead of
13630         mono_runtime_class_init in LDSFLD[A].
13631         (mono_codegen): Add relocations for the new trampoline.
13632         
13633         * mini.h mini-x86.c aot.c: Added a new relocation type: 
13634         MONO_PATCH_INFO_CLASS_INIT.
13635
13636         * mini.h: Bump AOT version number.
13637
13638         * aot.c: Create a copy of the loaded code instead of using the original
13639         so methods which call each other will be close in memory, improving
13640         cache behaviour.
13641         
13642         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
13643         patch since it breaks the regression tests.
13644         
13645         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
13646         for the register saving instruction sequence since the 
13647         frame_state_for function in glibc 2.3.2 don't seem to detect it.
13648
13649 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
13650
13651         * TODO: Fix todo item && remove another.
13652
13653 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
13654
13655         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
13656         previous checkin.
13657
13658         * aot.c: Moved the check for MONO_LASTAOT into the initialization
13659         function of the module.
13660
13661         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
13662         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
13663         --no-aot command line option.
13664
13665 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
13666
13667         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
13668         by Bernie Solomon (bernard@ugsolutions.com).
13669
13670         * inssel.brg: Refactor the interface offset table related code into
13671         its separate functions and add support for the AOT case.
13672
13673 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
13674
13675         * aot.c (mono_aot_get_method_inner): Fix memory leak.
13676         
13677         * aot.c: Added mono_aot_verbose variable and made all debugging
13678         output depend on the value of this variable.
13679
13680         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
13681         method_label and info_label.
13682
13683         * mini.h mini-x86.c aot.c: Added a new relocation type 
13684         MONO_PATCH_INFO_IID for klass->interface_id.
13685
13686         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
13687         the MonoJitInfo structure.
13688
13689         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
13690         a non-root appdomain in shared mode.
13691
13692 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13693
13694         * aot.c: make aot loader less verbose. Remove free of unused variable.
13695
13696 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
13697
13698         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
13699
13700         * .cvsignore: Added *.dll.
13701
13702         * mini.c (mono_print_tree_nl): New function callable while debugging.
13703
13704         * mini.c (mono_print_code): Export this.
13705
13706         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
13707         patched code.
13708
13709 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
13710
13711         * mini.h (MonoCompile): Added 'jit_info' field.
13712
13713         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
13714         the cfg structure, since it is needed by the AOT compiler.
13715
13716         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
13717
13718         * aot.c: A major rewrite. Changes include:
13719         - save exception tables for methods which have them.
13720         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
13721         to g_module_symbol.
13722         - reworked the file format so it is now much smaller and needs
13723         fewer relocation entries.
13724         
13725 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
13726
13727         * aot.c (load_aot_module): Fix build bustage on platforms without
13728         Boehm GC.
13729
13730 2003-09-04  Martin Baulig  <martin@ximian.com>
13731
13732         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
13733
13734 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
13735
13736         * TODO: Some new optimization ideas.
13737
13738         * aot.c: Move AOT module loading logic here from mono_assembly_open.
13739
13740         * aot.c: Save the optimization flags used to compile the code into
13741         the AOT module.
13742
13743         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
13744         support emitting domain specific code.
13745         
13746         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
13747         no longer domain neutral. It can be made domain neutral by compiling 
13748         with --optimize=shared.
13749
13750         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
13751         between appdomains.
13752
13753         * driver.c mini.h mini.c: New --no-aot debugging option which disables
13754         loading of AOT code.
13755
13756         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
13757         
13758         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
13759         if there is no domain neutrality information.
13760
13761 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
13762
13763         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
13764         format version into the generated library.
13765
13766         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
13767         callee method into the caller since one of them could be shared.
13768
13769         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
13770         system exceptions from AOT code now works.
13771
13772         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
13773         method if it is domain neutral and the callee is not.
13774
13775         * graph.c (cfg_emit_one_loop_level): Fix warning.
13776
13777 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
13778
13779         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
13780         last checkin.
13781
13782 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
13783
13784         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
13785         is needed  by code which is executed before mono_runtime_init ().
13786         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
13787         
13788         * mini.c (mono_thread_abort): Fix warning.
13789         (mono_jit_compile_method): Call static constructor in the AOT case too.
13790
13791         * aot.c (mono_compile_assembly): Fix warning.
13792
13793 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13794
13795         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
13796
13797 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
13798
13799         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
13800
13801         * cpu-pentium.md: Fix the length of call opcodes so they include the
13802         ESP restoring instruction. Fixes #47968.
13803
13804 2003-08-28  Martin Baulig  <martin@ximian.com>
13805
13806         * mini-x86.c (mono_arch_call_opcode): Added support for
13807         MONO_TYPE_GENERICINST.
13808
13809         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
13810
13811 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
13812
13813         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
13814         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
13815
13816         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
13817         metadata_section.
13818
13819 2003-08-26  Martin Baulig  <martin@ximian.com>
13820
13821         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
13822         when reporting an error, set this to the actual error location.
13823         (mono_method_to_ir): Report the correct error location if
13824         get_basic_blocks() returned an error.
13825
13826 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
13827
13828         * mini.c (mono_type_blittable): OBJECT is not blittable.
13829         (mono_method_blittable): Methods which have marshalling descriptors
13830         are not blittable either. Fixes #47842.
13831
13832 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
13833
13834         * driver.c mini.c: Use an environment variable instead of a global 
13835         variable. Also fix the build.
13836
13837         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
13838         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
13839         reporting this. 
13840
13841         * driver.c mini.c: Added --with-valgrind option to turn off some
13842         code which prevents mono from running under valgrind.
13843
13844         * mini.c (mono_emit_call_args): Fixed warning.
13845
13846         * mini.c (mono_emulate_opcode): Fixed warning.
13847
13848 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13849
13850         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
13851         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
13852         regalloc.c, regalloc.h: specify available registers in arch-specific
13853         code and support floats in the regallocator (patch by Laurent Morichetti 
13854         <l_m@pacbell.net>)
13855
13856 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13857
13858         * mini.c: mono_thread_current() can be called only after
13859         mono_runtime_init(): rearrange code to not call it early on.
13860
13861 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13862
13863         * mini.c: allocate jump tables in the code mempools.
13864
13865 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13866
13867         * mini.c, mini.h: make sure per-thread data allocated by the jit is
13868         freed.
13869
13870 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
13871
13872         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
13873         12 to 16.  This fixes bug #47453.
13874
13875
13876 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13877
13878         * mini-ppc.c: fixed indexed load and unsigned compares.
13879
13880 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
13881
13882         * mini.c: reenabled installation of handler for
13883           thread abort signal.
13884
13885 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13886
13887         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
13888         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
13889         until it's fixed and actually useful.
13890
13891 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13892
13893         * inssel-long32.brg: couple more opcodes implemented.
13894
13895 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
13896         
13897         * mini-sparc.c: Even more opcodes implemeted.
13898
13899 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
13900
13901         * mini-sparc.c: More opcodes implemented.
13902
13903 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
13904
13905         * mini-sparc.c: More opcodes implemented.
13906
13907 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
13908
13909         * inssel-sparc.brg: Add some needed rules.  Direct
13910         copy from PPC.
13911         * Makefile.am: Use inssel-sparc.brg
13912         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
13913         an assert happy for now.
13914
13915 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
13916
13917         * mini-sparc.c: Fixed compile errors.
13918         * exceptions-sparc.c: Same.  We now produce a mono binary 
13919         on sparc-linux.  Yea.
13920
13921 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
13922
13923         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
13924         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
13925         They compile, but do not work.
13926
13927 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13928
13929         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
13930         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
13931         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
13932         (ct@gentoo.org).
13933
13934 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13935
13936         * mini.c: more opcodes implemented and better support for generics.
13937
13938 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
13939
13940         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
13941         * mini.c, mini.h: first cut at generics support: some new instructions 
13942         added and changed the behaviour of some of the existing ones.
13943
13944 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
13945
13946         * mini.c: Removed definition of metadata_shared mutex here.
13947
13948 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
13949
13950         * mini-x86.c: make vararg calls work for instance methods.
13951
13952 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13953
13954         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
13955         returns the arguments in a separte list, now.
13956
13957 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13958
13959         * aot.c, mini.c: updates for array type representation changes.
13960
13961 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
13962
13963         * mini.c: register function to perform jit shutdown.
13964
13965 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13966
13967         * mini.c: use a faster allocator if possible.
13968
13969 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13970
13971         * aot.c: some cleanups and portability changes.
13972
13973 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13974
13975         * mini.c: use faster allocation for CEE_BOX if possible.
13976
13977 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13978
13979         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
13980         Moved inlined mempcy code to its own function so that is can be
13981         reused. Added an inline memset function as well (optimized initobj).
13982         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
13983
13984 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13985
13986         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
13987
13988 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13989
13990         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
13991         arch code can setup the cpu for CLR execution, if needed.
13992         We use it on x86 to set the precision of FP operations.
13993
13994 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13995
13996         * mini.c: disable some optimizations if we can guess they'll cost too
13997         much for a given method.
13998
13999 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14000
14001         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
14002         
14003 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14004         * mini.h mini.c mini-x86.c: Added instruction level coverage 
14005         info collection support.
14006
14007 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14008
14009         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
14010         is now implemented in the profiling API. Get rid of a couple of
14011         unnecessary global variables.
14012
14013 2003-06-15  Nick Drochak <ndrochak@gol.com>
14014
14015         * basic-long.cs: tests for negative values for bigmul, and unsigned.
14016         * cpu-g4.md: add op_bigmul and op_bigmul_un
14017         * cpu_pentium.md: add op_bigmul_un
14018         * inssel-long32.brg: add rule for unsigned bigmul
14019         * mini-ops.h: define OP_BIGMUL_UN
14020         * mini-x86.c: THE BUG: handle (un)signed properly
14021         * mini.c: choose unsigned opcode if needed.
14022         This set of patches fixes bug #44291
14023
14024 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
14025
14026         * mini.c (optimize_branches): improved to handle all kinds of
14027         conditional branches.
14028
14029 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14030
14031         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
14032         don't raise exceptions.
14033
14034 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14035
14036         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
14037         to arch-specific files.
14038
14039 2003-06-09  Martin Baulig  <martin@ximian.com>
14040
14041         * Makefile.am (libs): Added $(LIBGC_LIBS).
14042
14043 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
14044
14045         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
14046         and OP_ATAN (fixes bug#44293).
14047
14048 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
14049
14050         * Makefile.am, mini-x86.c: rename cpu description array to
14051         pentium_desc, since some compilers define the 'pentium' preprocessor
14052         symbol.
14053
14054 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
14055
14056         * mini.c (mini_select_instructions): add explicit branch if the
14057         following block is not the false target of a conditional branch -
14058         we need this with any optimization that reorder or remove bblocks
14059
14060         * mini.c (optimize_branches): bug fixes
14061
14062 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
14063
14064         * mini.c (mono_method_to_ir): inline static readonly fields
14065
14066         * ssa.c (fold_tree): start cfold support for long (very simple
14067         cases only)
14068
14069         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
14070
14071 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14072
14073         * inssel.brg: fixed memcpy (bug #44219).
14074
14075 2003-06-05  Dick Porter  <dick@ximian.com>
14076
14077         * driver.c: Set the glib log levels to not abort if g_message
14078         recurses.
14079
14080         g_set_prgname() has to happen before mini_init() so that the
14081         process handle gets the info.
14082         
14083 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14084
14085         * driver.c: add intrins to the default optimizations to get wider
14086         exposure.
14087
14088 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14089
14090         * mini.h: some large basic blocks will overflow a 16-bit
14091         integers for symbolic registers.
14092
14093 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
14094
14095         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
14096         (mono_arch_output_basic_block): fix bug 43499 
14097
14098 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14099
14100         * mini.c: kill duplicated definition of mono_debug_format.
14101
14102 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
14103
14104         * mini-x86.c, arrays.cs: fixed register allocation bug.
14105
14106 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
14107
14108         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
14109
14110         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
14111
14112 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14113
14114         * mini.c:
14115         (print_method_from_ip): also print source location information if
14116         available.
14117
14118 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
14119
14120         * mini.c (mono_find_block_region): bug fix in region code
14121         (mini_method_compile): enable removing unreachable code again, but
14122         only in methods without exception clauses.
14123
14124 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
14125
14126         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
14127         Implemented arglist opcode and handling of TypedReference type.
14128         Fixed x86 call convention when a structure is returned.
14129         Minimal support for calling static vararg methods.
14130
14131 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
14132
14133         * mini.c (mini_method_compile):  always remove unreachable code,
14134         because the code in them may be inconsistent  (access to dead
14135         variables for example).
14136
14137 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14138
14139         * driver.c, debug-mini.c: warning fixes.
14140
14141 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
14142
14143         * Makefile.am, jit.h, mini.h: install header for embedding mono.
14144
14145 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
14146
14147         * mini.c: thread-static fields are registered in mono_class_vtable(),
14148         so ensure the function is called before checking for them.
14149
14150 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
14151
14152         * mini.c (optimize_branches): fix for bug 43586
14153
14154         * jit-icalls.c (mono_llmult_ovf): added an additional check for
14155         overflow (fixes Bug #43639)
14156
14157 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14158
14159         * mini.c, objects.cs: allow the use of stobj for primitive types.
14160
14161 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14162
14163         * mini.c: be less strict about argument checking until we support
14164         running the verifier.
14165
14166 2003-05-27  Nick Drochak <ndrochak@gol.com>
14167
14168         * basic-long.cs: tests for (ulong)int * (ulong)int also
14169         * mini.c: use the same trick for (ulong)int * (ulong)int
14170
14171 2003-05-27  Nick Drochak <ndrochak@gol.com>
14172
14173         * basic-long.cs: add regression test for (long)int * (long)int
14174         * cpu-pentium.md: add op_bigmul specification
14175         * inssel-long32.brg: add OP_BIGMUL rule
14176         * mini-ops.h: add OP_BIGMUL
14177         * mini-x86.c: register allocator: handle case where src1 needs to be
14178         in EAX.
14179         * mini.c: substitute special BIGMUL opcode in the tree for 
14180         (long)int * (long)int
14181
14182 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
14183
14184         * jit-icalls.c: call the type ctor on field access if needed.
14185
14186 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14187
14188         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
14189         to a method (including results of ldelema, bug#43207).
14190
14191 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
14192
14193         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
14194         colors to show exception handler blocks.
14195
14196         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
14197         (fix for pinvoke7.cs).
14198
14199 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14200
14201         * mini.h, mini.c: ensure correct initialization order for types that
14202         require it. Prepare for lazy compilation of jit icall wrappers.
14203         Provide a name for opcode emulation to reduce unneeded mallocing.
14204
14205 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
14206
14207         * mini-x86.c: better register restoring code and profiling
14208         support for tail calls.
14209
14210 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14211
14212         * mini.h, driver.c: prepare for leaf methods optimization.
14213
14214 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14215
14216         * mini.c: get targets of branches before converting a method.
14217
14218 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
14219
14220         * mini.c (optimize_branches): added some experimental code (disbaled) 
14221
14222 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
14223
14224         * mini.c (optimize_branches): fix branch to branch optimization 
14225
14226         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
14227
14228         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
14229
14230         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
14231
14232         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
14233         if needed.
14234
14235 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
14236
14237         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
14238         enable use of interface variables again.
14239
14240         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
14241         I1 to registers because there is no simply way to sign extend 8bit
14242         quantities in caller saved registers on x86.
14243
14244         * inssel-float.brg: set costs of some rules to 2 so
14245         that monobure always select the arch. specific ones if supplied,
14246         regardless of the order we pass the files to monoburg.
14247
14248 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
14249
14250         * mini.c, mini-x86.c: since the magic trampoline for jumps
14251         can't patch the code directly, we do it as soon as the
14252         method gets compiled.
14253
14254 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14255
14256         * mini-x86.c, mini.h: introduce a new patching method
14257         to support CEE_JMP and tail calls.
14258         * mini.c: obey tail.call. Don't precompile methods target
14259         of CEE_JMP.
14260         * tramp-x86.c: new trampoline code to handle methods
14261         reached through a jump.
14262
14263 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
14264
14265         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
14266         bit values to registers
14267
14268 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
14269
14270         * mini.c (mono_compile_get_interface_var): share interface
14271         variables if possible.
14272
14273 2003-05-16  Martin Baulig  <martin@ximian.com>
14274
14275         * debug-mini.c (mono_init_debugger): New function to initialize
14276         the debugger.  This is not in the debugger since it needs to
14277         access some of mini's internals.
14278
14279 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
14280
14281         * mini.c (mono_method_to_ir): inlining fixes/cleanups
14282
14283 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
14284
14285         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
14286         for value type handling.
14287
14288 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
14289
14290         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
14291         (mono_method_check_inlining): enable inlining of all kinds of wrappers
14292
14293 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
14294
14295         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
14296           the constructor through a proxy.
14297
14298 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14299
14300         * jit-icalls.c, inssel.brg: fixes to array element address
14301         calculations.
14302
14303 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
14304
14305         * mini-x86.c (is_regsize_var): allocate pointer to registers
14306
14307 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14308
14309         * driver.c: fixed typo, added intrins to the set of optimizations
14310         tested with regressions.
14311
14312 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14313
14314         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
14315         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
14316         test case.
14317
14318 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
14319
14320         * inssel.brg: remove some common pop instructions without side effects
14321
14322 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14323
14324         * inssel-x86.brg: fixed thinko in int to double conversions.
14325
14326 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
14327
14328         * mini.c, jit-icalls.c: added runtime thread-static variable support.
14329
14330 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14331
14332         * inssel-long32.brg: two more missing instructions.
14333
14334 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
14335
14336         * mini.c (mono_emit_call_args): set the cil_code for all arguments
14337         if not already set.
14338
14339 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
14340
14341         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
14342         correctly.
14343
14344         * basic-float.cs: Added tests for negative zero.
14345
14346 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14347
14348         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
14349         a couple of missing operations for long casts, with test cases.
14350
14351 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14352
14353         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
14354
14355 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
14356
14357         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
14358         code size estimation.
14359
14360 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
14361
14362         * mini.c (mono_jit_create_remoting_trampoline): make it work with
14363         abstract methods (fix bug 42542)
14364
14365         * aot.c: add ability to handle array types
14366         
14367 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
14368
14369         * mini.c: Call the _specific versions of the object allocation
14370         functions if possible.
14371
14372 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
14373
14374         * driver.c: call setlocale ().
14375
14376 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14377
14378         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
14379         windows build.
14380
14381 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
14382
14383         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
14384
14385         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
14386         wrappers (fix bug 42122)
14387
14388 2003-05-04  Martin Baulig  <martin@ximian.com>
14389
14390         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
14391
14392         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
14393         s/mini_set_defaults/mono_set_defaults/g.
14394
14395 2003-05-04  Martin Baulig  <martin@ximian.com>
14396
14397         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
14398
14399 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14400
14401         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
14402         (reported by Don Roberts).
14403
14404 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
14405
14406         * mini.c: temporarily work around two bugs for this release.
14407
14408 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14409
14410         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
14411         that contains -export-dynamic and it makes using the ld script
14412         useless.
14413         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
14414
14415 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14416
14417         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
14418         specific cpu.
14419
14420 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14421
14422         * mini.c: make sure leave calls all the needed finally blocks,
14423         even when the target jumps out of multiple exception clauses.
14424
14425 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14426
14427         * ldscript, Makefile.am: add linker script to reduce the number of
14428         exported symbols (should also fix the issues with libwine defining
14429         some of the same symbols in io-layer).
14430
14431 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
14432
14433         * driver.c (mini_main): Avoid assertion when no file name is given on 
14434         the command line.
14435
14436 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
14437
14438         * driver.c: added --version/-V command line option.
14439         Added the inline optimization in the regression tests.
14440
14441 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14442
14443         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
14444         to the type in the method signature (fixes bug#42134).
14445
14446 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
14447
14448         * mini.c: when inlining, check this is not null only when needed (bug #42135).
14449
14450 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
14451
14452         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
14453
14454 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14455
14456         * driver.c: fixed bug #42100.
14457
14458 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
14459
14460         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
14461
14462 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
14463
14464         * mini.c: moved most of the code required to do inlining to its own
14465         function so it can be reused. Inline also ctors if appropriate.
14466
14467 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
14468
14469         * Makefile.am: Link with -export-dynamic so shared libs loaded by
14470         the runtime can call mono API functions.
14471
14472 2003-04-27  Martin Baulig  <martin@ximian.com>
14473
14474         * debug-mini.c (mono_debug_init_method): Added
14475         `guint32 breakpoint_id' argument; if the method has a breakpoint,
14476         send a notification to the debugger.
14477
14478         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
14479         running in the Mono Debugger, just pass the breakpoint number to
14480         mono_debug_init_method().
14481
14482         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
14483
14484 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
14485
14486         * mini.c: allow some more unsafe compares.
14487
14488 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14489
14490         * mini-x86.c, Makefile.am: make distcheck works (partially from
14491         a patch by Richard Lee <r.h.lee@attbi.com>).
14492         * regset.c, regset.h: removed, they are unused.
14493
14494 2003-04-25  Dick Porter  <dick@ximian.com>
14495
14496         * driver.c: Usage reports the name as 'mono' not 'mini'
14497         * exceptions-x86.c: Build and run on freebsd
14498
14499 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
14500
14501         * Makefile.am: install the program with the 'mono' name and
14502         the library as libmono instead of mini and libmini.
14503
14504 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14505
14506         * driver.c: provide the APIs for the embedding interface of the old jit.
14507
14508 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
14509
14510         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
14511
14512 2003-04-23  Martin Baulig  <martin@ximian.com>
14513
14514         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
14515
14516         * driver.c: Added `--debug' command line argument to enable
14517         debugging support.
14518
14519 2003-04-23  Martin Baulig  <martin@ximian.com>
14520
14521         * debug.[ch]: Removed.  The code is now in
14522         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
14523
14524         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
14525         last six months.
14526
14527 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
14528
14529         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
14530
14531 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14532
14533         * mini.c:
14534         (mini_cleanup): moved mono_runtime_cleanup call after the call to
14535         mono_domain_finalize.
14536         (mini_method_compile): use mono_method_profile* if the the option is
14537         enabled.
14538
14539 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
14540
14541         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
14542         methods with their wrapper.
14543
14544         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
14545         methods with their wrapper.
14546
14547         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
14548         their wrapper.
14549
14550         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
14551         wrapper.
14552
14553         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
14554         methods.
14555
14556 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
14557
14558         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
14559
14560 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
14561
14562         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
14563         of the mempool. This is slightly faster and uses less memory
14564
14565 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14566
14567         * mini.c: avoid O(n) allocation for variables.
14568
14569 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14570
14571         * mini.c: handle items on the stack after inlining methods.
14572
14573 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14574
14575         * mini.c: make the method->opcode optimization dependent
14576         on MONO_OPT_INSTRINS and do it lazily.
14577
14578 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14579
14580         * driver.c: print overall results at the end of regression run.
14581
14582 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
14583
14584         * inssel.brg: don't overwrite symbolic registers.
14585
14586 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
14587
14588         * inssel-x86.brg: fix conversion from long to float.
14589
14590 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
14591
14592         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
14593
14594 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
14595
14596         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
14597
14598         * driver.c: Added --print-vtable option as in the old JIT.
14599
14600 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14601
14602         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
14603
14604 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
14605
14606         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
14607
14608 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
14609
14610         * mini.c regalloc.c regalloc.h: Fix memory leak.
14611
14612 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
14613
14614         * aot.c (mono_aot_get_method): register all used strings
14615
14616 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14617
14618         * mini.c: always intern strings references with ldstr at compile time.
14619
14620 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14621
14622         * Makefile.am: add BUILT_SOURCES.
14623
14624 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
14625
14626         * driver.c: give a better error message when the assembly to execute
14627         doesn't have an entry point.
14628
14629 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
14630
14631         * Makefile.am: added hack for automake
14632
14633         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
14634         correct sematics.
14635
14636         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
14637
14638 22003-04-07  Martin Baulig  <martin@ximian.com>
14639
14640         * Makefile.am: Added Makefile.am.
14641
14642         * debugger-main.c: Removed, this is now in the debugger where it
14643         belongs.
14644
14645         * mini.pc.in: Call this package `mini' for the moment.
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659