2008-07-26 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2
3         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
4
5         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
6         long vreg volatile even if the variable was already created.
7
8         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
9         volatile variables.
10
11 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
12
13         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
14
15         * mini.c (mono_jit_compile_method_inner): Add support for 
16         MONO_EXCEPTION_BAD_IMAGE.
17
18         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
19         mini_method_get_context () returns NULL. Fixes #356531.
20
21         * mini.c (mono_method_to_ir): Ditto.
22         
23         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
24         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
25
26 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
27
28         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
29         in the LDFTN implementation.
30
31 2008-07-25  Mark Probst  <mark.probst@gmail.com>
32
33         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
34         code, patch calls to icalls, too, even if they're not in the
35         shared generic code hash.  Fixes #411962.
36
37 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
38
39         * cpu-x86.md: Increase the length of the fcall opcodes.
40
41         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
42         calls returning floats.
43
44         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
45         on NEWARR.
46         
47         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
48         missed earlier.
49
50         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
51         into the domain->method_code_hash.
52
53         * aot-compiler.c: Fix win32 build.
54
55         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
56         
57         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
58         gshared NEWARR implementation.
59
60         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
61
62         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
63         can be used outside of method_to_ir.
64
65         * mini.h (MonoCompile): Add arg_types field.
66
67         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
68         
69         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
70         the values of the local arg_array and param_types array.
71
72 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
73
74         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
75         got accesses might only get generated later when NEWOBJ is decomposed.
76         
77         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
78         looking up the native code of the target method when a delegate is called
79         for the first time.
80
81         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
82         optimization.
83
84         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
85
86         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
87         AOT work on platforms without a working dlsym implementation.
88
89         * mini.h: Bump AOT image format version.
90         
91 2008-07-24  Mark Probst  <mark.probst@gmail.com>
92
93         * mini-exceptions.c: Free a MonoType with
94         mono_metadata_free_type() instead of g_free().
95
96         * aot-runtime.c: Free a MonoType.
97
98 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
99
100         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
101         optimization.
102
103         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
104         fp stack on x86.
105
106 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
107         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
108         profiler hook.
109
110 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
111
112         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
113         NEWOBJ calls on valuetypes.
114
115         * iltests.il.in: Add new test.
116
117         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
118
119 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
120
121         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
122         is no longer needed.
123
124         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
125         non register sized integer arguments.
126         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
127         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
128         emit_memcpy2 ().
129
130         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
131         CEE_MONO_RETOBJ.
132         
133         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
134         two a binop with different sized arguments is emitted.
135
136         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
137         instruction in the ins==NULL case.
138
139 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
140
141         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
142
143         * mini-x86.c: Fix osx build.
144
145         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
146         opcodes as well.
147
148         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
149         instruction for non int sized variables.
150
151         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
152         implementation.
153
154 2008-07-23  Robert Jordan  <robertj@gmx.net>
155
156         * method-to-ir.c: Fix MSVC build.
157
158 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
159
160         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
161         a non int sized type, widen it to an int since newer versions of gcc seem to
162         generate code which needs this.
163
164         * ssa2.c abcremoval2.c: Fix warnings.
165
166         * *: Merge the Linear IR branch.
167
168         The original branch is at trunk/branches/vargaz/mini-linear-il, and
169         the ChangeLog file there describes all the changes done over the years. 
170         Further documentation can be found at www.mono-project.com/Linear_IL.
171
172 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
173
174         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
175           The float param registers and other param registers must be the 
176           same index on Windows x64.
177
178         Contributed under MIT/X11 license.
179
180 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
181
182         * mini.c: Make the previous fix GC safe.
183
184 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
185
186         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
187
188 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
189
190         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
191           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
192           ArgValuetypeAddrInIReg instead.
193
194         Contributed under MIT/X11 license.
195
196 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
197
198         * mini-codegen.c (get_register_spilling): Fix a warning.
199
200 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
201
202         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
203         for types which the initialization fails. Raises the provided exception
204         at the right stop after cleanup.
205
206 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
207
208         * aot-compiler.c: Free most of the memory allocated during compilation.
209
210         * mini.c (mini_parse_debug_options): Fix a leak.
211         
212         * mini.c (mini_method_compile): Don't add the method to the jit info tables
213         during aot compilation.
214
215 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
216
217         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
218         it has too much register pressure.
219
220 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
221
222         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
223
224 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
225
226         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
227         on x86.
228
229         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
230         on amd64 similar to the way it is done on arm.
231
232         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
233
234         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
235         consistency, normalize error messages, avoid loading aot-only modules in
236         normal mode.
237
238         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
239         for consistency.
240
241         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
242
243 2008-07-11  Martin Baulig  <martin@ximian.com>
244
245         * debug-debugger.h
246         (MonoDebuggerInfo): Add `interruption_request'.
247
248 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
249
250         * aot-compiler.c (emit_plt): Remove some dead code.
251
252         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
253
254         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
255         return the plt info offset belonging to a given plt entry.
256
257         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
258         mono_aot_get_plt_info_offset.
259         
260         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
261         similar to the amd64 code by makeing jumps through a separate jump table 
262         instead of embedding the jump addresses into the code.
263
264 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
265
266         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
267         method.
268
269 2008-07-10  Martin Baulig  <martin@ximian.com>
270
271         * mini.c (mini_method_compile): Disable generics sharing when
272         running in the debugger.
273
274 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
275
276         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
277
278         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
279         the local register allocator from running out of registers on x86 when 
280         using aot.
281
282 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
283
284         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
285         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
286         C4146.
287
288         Contributed under MIT/X11 license.
289
290 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
291
292         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
293         speed up the assembler.
294
295 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
296
297         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
298         support.
299
300         * mini.c: Move the soft float handling macros a bit earlier, add 
301         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
302         place.
303
304         * mini.h: Add prototype for mono_arch_fixup_jinfo.
305
306         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
307         read-only to help catch code allocation requests.
308         
309         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
310         and turn it off when using --aot-only or when compiling with --aot=full.
311
312         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
313         jump table for switches from the normal domain mempool, not the code
314         manager.
315
316         * mini-trampolines.c (get_unbox_trampoline): New function to return an
317         unbox trampoline which handles aot-only mode too.
318
319         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
320         an AOTed unbox trampoline.
321
322         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
323
324 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
325
326         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
327         ""
328
329         Contributed under MIT/X11 license.
330
331 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
332
333         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
334           the unwind information for the method at the end of the allocated block.
335           
336         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
337           MonoCompileArch to hold the unwind info for SEH on Winx64
338         
339         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
340           frame pointer info for the method being compiled.
341           
342         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
343           the call to mono_exception_from_token.
344           
345         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
346           storing the method prolog information in a format that the Winx64 SEH can understand.  This
347           information is stored a the end of the method block because it is all 32-bit offset based.
348
349         Contributed under MIT/X11 license.
350
351 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
352
353         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
354
355         * wapihandles.c: Fix warnings.
356
357         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
358         mode.
359
360         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
361         mono_jit_compile_method in aot-only mode since that calls the type 
362         initializer.
363         
364         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
365         get_delegate_invoke_impl in aot-only mode.
366
367         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
368
369 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
370
371         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
372
373         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
374         is on by default.
375
376         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
377
378         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
379         init trampoline from the AOT file as well.
380
381         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
382         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
383         code.
384
385         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
386         mono_init.
387
388         * exceptions-amd64.c: Add _full variants for the remaining exception code
389         creation functions as well, allow emission of relocatable code, remove
390         caching since that is now done by the caller.
391
392         * mini-exceptions.c: Add _full variants for the remaining exception code
393         creation functions as well, add aot-only support.
394
395         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
396         if we can determine a proper token for them.
397         (add_wrappers): Add a few more wrappers.
398         (emit_method_code): Remove some dead code.
399         (emit_trampolines): Emit exception code too.
400
401         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
402
403         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
404         mono_array_new_va which avoids varargs.
405
406         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
407
408         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
409         mono_arch_create_specific_trampoline () in all places.
410
411         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
412         a bit so it can be used for other things as well.
413         
414         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
415         on demand as well.
416
417         * exceptions-amd64.c: Rename the caching from the exception code creation
418         functions, it is done by the caller instead.
419         
420         * exceptions-amd64.c: Change the signature of the exception code creation 
421         functions to allow the creation of relocatable code later.
422
423         * mini-exceptions.c: Add a set of functions to query the various 
424         runtime-generated exception functions.
425
426         * mini.c mini-exceptions.c: Use the newly added functions instead of the
427         mono_arch_.. () functions.
428         
429 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
430
431         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
432
433         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
434
435         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
436         (mini_get_vtable_trampoline): Ditto.
437
438         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
439         code in the AOT case by returning the code size and a list of relocations to
440         the caller.
441
442         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
443
444 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
445
446         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
447           clean the stack.
448
449         Contributed under MIT/X11 license.
450
451 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
452
453         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
454         so the buffer size can be computed correctly. Fixes #404735.
455
456         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
457         normally as cfg->debug_info is already freed.
458
459 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
460
461         * mini-amd64.c: For calls returning vtypes in registers, don't store
462         the return address on the stack, instead allocate a separate local for
463         it. Fixes #404729.
464
465 2008-07-05  Mark Probst  <mark.probst@gmail.com>
466
467         * mini-trampolines.c, mini.h: Add an argument to
468         mono_create_jit_trampoline_in_domain() for turning off the adding
469         of the sync wrapper.
470
471         * mini.c: Use the JIT trampoline without sync instead of
472         ldftn_nosync in static RGCTX invoke wrappers so that the call can
473         be patched.
474
475 2008-07-04  Mark Probst  <mark.probst@gmail.com>
476
477         * driver.c: Turn on GSHARED optimization by default.
478
479 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
480
481         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
482         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
483
484         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
485         create a variant of the generic trampoline code callable from AOTed trampolines.
486
487         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
488         trampoline code callable from AOTed trampolines.
489
490         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
491
492 2008-07-04  Mark Probst  <mark.probst@gmail.com>
493
494         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
495         pass-through manner.
496
497         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
498         and don't fail sharing for them anymore.
499
500         * mini-exceptions.c: Handle exceptions in shared generic methods.
501
502         * generic-sharing.c: When checking the context of a generic
503         method, also check its class's context.  Don't treat wrappers as
504         sharable.
505
506         * mini-trampolines.c: Some code factored out to
507         metadata/generic-sharing.c.  Handle the MRGCTX case.
508
509         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
510         we must deal with the method being of another instantiation of the
511         class.  Add static rgctx invoke wrappers to generic methods.
512
513 2008-07-04  Mark Probst  <mark.probst@gmail.com>
514
515         * mini.c: Provide all jit infos of generic shared methods with a
516         generic jit info.
517
518         * mini-exceptions.c: Handle the new situation that a generic info
519         might be available, but not info about the this/vtable/mrgctx
520         variable.
521
522 2008-07-03  Mark Probst  <mark.probst@gmail.com>
523
524         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
525         generic methods.
526
527 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
528
529         * dominators.c (check_dominance_frontier): Fix a warning.
530
531         * mini.h: Add some missing prototypes.
532
533         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
534
535         * driver.c (mono_jit_init_version): Correct the comments since the first
536         argument should be the name of the root domain, not a filename.
537
538         * aot-runtime.c (make_writable): Error out if this is called while running
539         with --aot-only.
540         (load_aot_module): Ditto.
541
542         * aot-compiler.c: Really fix the computation of method indexes.
543
544         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
545         optimizations as this is no longer called frequently.
546
547         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
548         method and the invoke impl code and pass it to the delegate trampoline instead of
549         just the delegate class.
550
551 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
552
553         * aot-compiler.c: Fixup the computation of method indexes.
554         (add_wrappers): Create the base methods of the runtime invoke wrappers using
555         the method builder infrastructure.
556
557         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
558         has no header.
559
560         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
561         mode, load the method right away instead of creating a trampoline.
562
563         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
564
565         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
566         some checks a bit.
567
568 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
569
570         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
571         (mono_aot_load_method): Use method_index instead of method->token.
572
573         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
574         can handle icalls etc. properly.
575
576         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
577
578         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
579
580         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
581         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
582         JIT_ICALL_ADDR patch type.
583
584         * patch-info.h: Add JIT_ICALL_ADDR patch type.
585
586         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
587         request flag.
588         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
589
590         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
591
592 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
593
594         * mini.c: Use domain->jit_code_hash_lock for controlling access to
595         domain->jit_code_hash.
596
597 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
598
599         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
600
601 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
602
603         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
604         get_this_arg_from_call, let it compute it when needed.
605
606         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
607         gsctx from code only when needed.
608
609         * mini-trampolines.c (get_generic_context): Rename this to 
610         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
611         it can be called by the arch backends.
612
613         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
614
615 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
616
617         * driver.c (mono_main): Add experimental --aot-only command line option.
618
619         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
620         set.
621
622 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
623
624         * driver.c (DllMain): Remove mono_module_handle.
625
626         Contributed under MIT/X11 license.
627
628 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
629
630         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
631         for emitting methods which are not in the source assembly. Detect and report
632         failure of assembling+linking.
633         
634         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
635
636         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
637
638 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
639
640         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
641
642 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
643
644         * mini.h: Remove some obsolete prototypes.
645
646         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
647
648 2008-06-24  Mark Probst  <mark.probst@gmail.com>
649
650         * mini.c (get_object_generic_inst): Variable-sized arrays are not
651         supported by Visual Studio, so use alloca().
652
653 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
654
655         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
656         Fixes #402585.
657
658 2008-06-23  Mark Probst  <mark.probst@gmail.com>
659
660         * mini.c: Fail sharing of a generic method if it contains an open
661         catch clause (because we don't pass MRGCTXs yet).
662
663 2008-06-23  Mark Probst  <mark.probst@gmail.com>
664
665         * mini.c: When compiling a method with generic sharing, insert the
666         method instantiated with an all-Object generic context into the
667         jit info table, instead of the context of the first instantiation
668         of the method we happen to compile.
669
670 2008-06-18  Martin Baulig  <martin@ximian.com>
671
672         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
673         `major_version' and `minor_version'.
674
675 2008-06-17  Mark Probst  <mark.probst@gmail.com>
676
677         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
678         mono_method_is_generic_sharable_impl() takes an additional
679         argument specifying whether to treat type variables as reference
680         types.
681
682 2008-06-17  Mark Probst  <mark.probst@gmail.com>
683
684         * mini.h: Removed obsolete prototypes.
685
686 2008-06-17  Mark Probst  <mark.probst@gmail.com>
687
688         * mini.c: Don't fail generic sharing for initobj and sizeof - we
689         already handle them.
690
691 2008-06-17  Mark Probst  <mark.probst@gmail.com>
692
693         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
694         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
695         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
696         tramp-x86.c: Added a MonoGenericContext* argument to
697         mono_arch_get_unbox_trampoline() so that it can call other
698         functions which require it.
699
700 2008-06-17  Mark Probst  <mark.probst@gmail.com>
701
702         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
703         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
704         mono_arch_get_this_arg_from_call() takes a
705         MonoGenericSharingContext* as well.
706
707 2008-06-17  Mark Probst  <mark.probst@gmail.com>
708
709         * mini.c: Factor out code for emitting unbox into emit_unbox() and
710         implement generic sharing of unbox.
711
712 2008-06-17  Mark Probst  <mark.probst@gmail.com>
713
714         * mini.c: Don't compute the vtable to determine whether a field is
715         special static, because it might not work for open types.
716
717 2008-06-17  Mark Probst  <mark.probst@gmail.com>
718
719         * mini.c: Removed the unused token_type and token_source arguments
720         from get_runtime_generic_context_ptr().
721
722 2008-06-17  Marek Habersack  <mhabersack@novell.com>
723
724         * mini.c (ADD_BINOP): fix the build
725
726 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
727
728         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
729         a widening op.
730
731 2008-06-16  Mark Probst  <mark.probst@gmail.com>
732
733         * mini.h: Removed class relations enum that's not used anymore.
734
735 2008-06-16  Mark Probst  <mark.probst@gmail.com>
736
737         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
738
739         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
740         the lazy fetch trampoline access code.
741
742 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
743
744         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
745
746 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
747
748         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
749
750         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
751
752         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
753
754 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
755
756         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
757         intrinsics.
758
759         * mini-ops.h: Add MIN/MAX_UN opcodes.
760
761         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
762         intrinsics.
763
764         * basic-math.cs: Add more min/max tests.
765
766         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
767
768 2008-06-13  Mark Probst  <mark.probst@gmail.com>
769
770         * mini.c: Small fix in the prologue of emit_castclass.
771
772 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
773
774         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
775
776         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
777         do not work even for unsigned types. Fixes #400014.
778
779         * basic-math.cs: Add regression tests for unsigned Min/Max.
780
781 2008-06-13  Mark Probst  <mark.probst@gmail.com>
782
783         * mini.c: Added additional context_used argument to several
784         functions, which will be needed for sharing generic methods.  Use
785         GET_RGCTX macro wherever appropriate.  Declare only one
786         context_used in mono_method_to_ir().
787
788 2008-06-13  Mark Probst  <mark.probst@gmail.com>
789
790         * mini.c, generic-sharing.c: Removed generic class relations.
791
792         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
793         functions due to MRGCTX changes.
794
795 2008-06-13  Mark Probst  <mark.probst@gmail.com>
796
797         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
798         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
799         with calculated IMT.
800
801         * mini.c: Generic sharing of calls via generic interfaces.
802
803         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
804         generic method with non-constant MonoGenericContext*.  Instead,
805         the context is taken out of the method itself.
806
807 2008-06-13  Mark Probst  <mark.probst@gmail.com>
808
809         * mini.c: Generic sharing of ldvirtftn.
810
811 2008-06-13  Mark Probst  <mark.probst@gmail.com>
812
813         * mini.c: Generic sharing of ldftn.
814
815 2008-06-13  Mark Probst  <mark.probst@gmail.com>
816
817         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
818
819 2008-06-13  Mark Probst  <mark.probst@gmail.com>
820
821         * mini.c: Generic sharing of the special case of ldtoken followed
822         by a call to GetTypeFromHandle.
823
824 2008-06-13  Mark Probst  <mark.probst@gmail.com>
825
826         * mini.c: Generic sharing of box for nullable types.
827
828 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
829
830         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
831         are passed on the stack. Fixes #324807.
832
833 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
834
835         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
836         for the ArgValuetypeAddrInIReg case.
837
838         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
839         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
840
841         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
842         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
843         local variable and pass the local variable by reference to the called method.
844           
845         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
846         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
847
848         Contributed under MIT/X11 license.
849
850 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
851
852         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
853
854         * debug-mini.c (mono_debug_print_vars): Release memory after printing
855         everything.
856
857 2008-06-10  Martin Baulig  <martin@ximian.com>
858
859         * debug-mini.c
860         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
861
862 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
863
864         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
865         possible error when no arguments are passed.
866
867         Contributed under MIT/X11 license.
868
869 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
870
871         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
872         where the file name is NULL.
873
874 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
875
876         * mini.c: Fix s390 build.
877
878 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
879
880         * trace.c (mono_trace_parse_options): Fix warnings.
881
882         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
883
884 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
885
886         * mini.c (remove_block_if_useless): Avoid printing the method name.
887         
888         * mini.c: Remove needless setting of ins->cil_code which is now done by 
889         MONO_INST_NEW.
890
891         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
892         LMF. Not yet used.
893
894         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
895         translated code after it has been patched.
896
897 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
898
899         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
900         avoid problems during code patching on SMP systems.
901         (emit_call): Avoid adding a patch info which is already added by 
902         emit_call_body.
903         (mono_arch_emit_exceptions): Ditto.
904
905 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
906
907         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
908         MONO_TYPE_ISSTRUCT already checks for it.
909
910 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
911
912         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
913           structs with floats on Winx64 the float registers are not used.  
914           The integer registers are always used..
915         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
916           only one register will be used and only if the size of the struct 
917           is 1,2,4, or 8 bytes.
918
919         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
920           to work for Winx64.
921
922         Contributed under MIT/X11 license.
923
924 2008-06-05  Martin Baulig  <martin@ximian.com>
925
926         * debug-debugger.c (debugger_lookup_class): Also call
927         mono_class_setup_methods() here; we're only called from RTI.
928
929 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
930
931         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
932         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
933         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
934         Post-process object files and add dtrace-generated object, if necessary.
935
936         Contributed under MIT/X11 license.
937
938 2008-06-04  Mark Probst  <mark.probst@gmail.com>
939
940         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
941         element class.
942
943         * mini.c: Generic sharing for unbox.any and castclass.
944
945 2008-06-04  Mark Probst  <mark.probst@gmail.com>
946
947         * mini.c: Ignore tailcall prefix in shared generic code and when
948         doing calls which require a vtable/rgctx argument.
949
950 2008-06-04  Mark Probst  <mark.probst@gmail.com>
951
952         * mini.c: Don't free the JIT info.
953
954         * driver.c: Changes in the JIT info table testing code.
955
956 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
957
958         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
959         interruption. Fix some warnings.
960
961         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
962         interruption_checkpoint.
963
964 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
965
966         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
967         from embedding applications.
968
969 2008-06-02  William Holmes  <billholmes54@gmail.com>
970
971         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
972           reserving 32 bytes on the stack when making calls. 
973
974         Contributed under MIT/X11 license.
975
976 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
977
978         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
979         the linear IL branch.
980
981         * driver.c: Print out more information for --version on arm.
982
983 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
984
985         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
986         bb_exit instead, since out of line bblocks might not actually be emitted
987         out-of-line.
988         
989         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
990         maximum epilog size for out of line bblocks if tracing is enabled.
991
992         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
993
994 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
995
996         * arrays.cs: Regression tests for allocating arrays with negative sizes.
997
998 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
999
1000         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
1001         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
1002         opcodes.
1003
1004 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
1005
1006         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
1007         the 'value' to store is a constant.
1008
1009         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
1010
1011         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
1012         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
1013
1014 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
1015
1016         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
1017         for accessing method->generic_container.
1018
1019 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
1020
1021         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
1022         
1023         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
1024
1025         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
1026
1027         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
1028         fails.
1029
1030 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
1031
1032         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
1033
1034         * mini.c: Handle the case when mono_class_vtable () fails.
1035
1036 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
1037         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
1038         the stat profiler.
1039
1040 2008-05-22  Mark Probst  <mark.probst@gmail.com>
1041
1042         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
1043         together with domain sharing.
1044
1045 2008-05-22  Mark Probst  <mark.probst@gmail.com>
1046
1047         * mini.c: Treat callvirts to final methods like non-virtual calls
1048         when doing generic sharing, i.e. look them up in the runtime
1049         generic context.
1050
1051 2008-05-22  Mark Probst  <mark.probst@gmail.com>
1052
1053         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
1054         with computed types (for generic sharing).
1055
1056         * mini.c: Generic sharing for mkrefany and refanyval.
1057
1058 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
1059
1060         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
1061         possible.
1062
1063         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
1064         the generic sharing code.
1065         
1066         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
1067         when needed.
1068
1069 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
1070
1071         * mini.h: Remove the declaration of mono_aot_init_vtable ().
1072
1073 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
1074
1075         * driver.c: updated copyright date
1076
1077 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
1078
1079         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
1080         needed.
1081
1082 2008-05-19  Martin Baulig  <martin@ximian.com>
1083
1084         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
1085         pointing to the new `_mono_debug_using_mono_debugger' variable.
1086
1087         * driver.c
1088         (mono_main): Check mono_debug_using_mono_debugger() rather than
1089         the `MONO_INSIDE_MDB' environment variable to check whether we're
1090         inside the debugger.
1091
1092 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
1093
1094         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
1095         argument.
1096
1097 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
1098
1099         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
1100
1101         * mini.c: Added mini_assembly_can_skip_verification. This
1102         function checks if the assembly requested to skip verification. 
1103         Fixes part of #387274.
1104
1105 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
1106
1107         * mini.c (mini_get_method): Disable the check for open generic classes when
1108         using generic sharing.
1109
1110         * generics.cs: Add a test #387034.
1111
1112         * mini.c (mini_get_method): Check whenever the method class is an open generic
1113         type, and return NULL in that case, causing a verification error. Fixes
1114         #384123.
1115
1116 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
1117
1118         * driver.c (mono_main): Revert r102623. The right
1119         thing to do is to enable the verifier under verifiable
1120         unless a --security flag was passed.
1121
1122         We need this non-trivial behavior for --verify-all otherwise
1123         mcs-compileall won't be able to use it. As it needs everything to
1124         be verified under validil.
1125
1126 2008-05-06  Martin Baulig  <martin@ximian.com>
1127
1128         Fix #383749.
1129
1130         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
1131         (mono_debugger_thread_cleanup): Likewise.
1132         (mono_debugger_extended_notification): Likewise.
1133
1134 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
1135
1136         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
1137         against both inflated and non-inflated methods. We need to check against the
1138         generic definition for cases where the instantiated method is not visible.
1139         We need to check against the inflated types for cases where the instantiation
1140         changes any super type. This fixes #382986.
1141
1142         Note that this doesn't need to be applied to other parts of mono_method_to_ir
1143         that check for visibiliy as generic params only appears as the type subject
1144         of tokens on call opcodes. Field manipulation and ldftn must always
1145         target an exact type.
1146
1147 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
1148
1149         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
1150         if no related --security flag is passed.
1151
1152 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
1153
1154         * mini-arch.h: Prepare support for ppc64.
1155
1156         Contributed under MIT/X11 license.
1157
1158 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
1159
1160         * aot-runtime.c: Prepare support for ppc64.
1161
1162         Contributed under MIT/X11 license.
1163
1164 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
1165
1166         * mini-ops.h: Prepare support for ppc64.
1167
1168         Contributed under MIT/X11 license.
1169
1170 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
1171
1172         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
1173
1174         Contributed under MIT/X11 license.
1175
1176 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
1177
1178         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
1179         assemblies, since aot_name is not a full path, causing us to load MS.NET 
1180         assemblies on windows.
1181
1182 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
1183
1184         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
1185         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
1186         * main.c: Use UTF-8 encoded command line instead of Windows default code
1187         page on Windows to support Unicode.
1188         * driver.c (DllMain): New function for mixed-mode assembly support.
1189         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
1190         export __stdcall functions without decoration.
1191
1192         Contributed under MIT/X11 license.
1193
1194 2008-04-28  Mark Probst  <mark.probst@gmail.com>
1195
1196         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
1197         saving it very early.
1198
1199 2008-04-28  Mark Probst  <mark.probst@gmail.com>
1200
1201         * mini.h, mini.c: Lots of code for accessing the old RGCTX
1202         deleted.  The only way to access the new RGCTX is via the
1203         trampline.
1204
1205         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
1206         vtable instead of the RGCTX to static methods.
1207
1208         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
1209         accessing the new RGCTX.
1210
1211         * generic-sharing.c: There is no separation between self, type
1212         arguments and other types in the RGCTX anymore.
1213
1214 2008-04-25  Jonathan Chambers <joncham@gmail.com>
1215
1216         * mini-amd64.c (add_general): Remove previous stack adjustment.
1217         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
1218         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
1219         for 32 bytes of stack space reserved for all calls.
1220         
1221         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
1222         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
1223         adjustment.
1224         
1225         Code contributed under MIT/X11 license.
1226
1227 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
1228
1229         * mini.c (mini_method_verify): Only verify non-inflated methods, check
1230         against the root definition, peeling out method and type instantiations.
1231         Cache verify success results, code that fails verification is still
1232         checked multiple times.
1233
1234 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
1235
1236         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
1237
1238 2008-04-23  Jonathan Chambers <joncham@gmail.com>
1239
1240         * mini-amd64.c (add_general): Always increment stack on Win64.
1241         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
1242         on Win64.
1243         
1244         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
1245         stack based argument handling on Win64.
1246         
1247         Code contributed under MIT/X11 license.
1248
1249 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
1250
1251         * Makefile.am (version.h): Add support for git-svn.
1252
1253 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
1254
1255         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
1256         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
1257         avoiding allocations and libc functions which might deadlock.
1258         
1259         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
1260         'no-gdb-backtrace' option is set.
1261
1262         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
1263
1264         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
1265
1266 2008-04-21  Martin Baulig  <martin@ximian.com>
1267
1268         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
1269         and `get_lmf_addr'; `notification_address' is no longer a pointer.
1270
1271 2008-04-21  Martin Baulig  <martin@ximian.com>
1272
1273         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
1274         `thread_vtable', `event_handler_ptr' and `event_handler'.
1275
1276 2008-04-21  Martin Baulig  <martin@ximian.com>
1277
1278         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
1279         allows delayed initialization of the `executable_code_buffer' when
1280         attaching.
1281
1282 2008-04-21  Martin Baulig  <martin@ximian.com>
1283
1284         * mini.h (mono_debugger_create_notification_function): Removed.
1285         * tramp-*.c (mono_debugger_create_notification_function): Removed.
1286
1287         * mdb-debug-info64.s
1288         (MONO_DEBUGGER__notification_function): Added this in the .text section.
1289
1290         * mdb-debug-info32.s
1291         (MONO_DEBUGGER__notification_function): Added this in the .text section.
1292
1293         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
1294         currently only works on x86 and x86_64, so don't create it on ppc.
1295
1296 2008-04-21  Martin Baulig  <martin@ximian.com>
1297
1298         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
1299
1300         * mini.c
1301         (mini_method_compile): In the fp elimination check, check
1302         `debug_options.mdb_optimizations' in addition to
1303         mono_debug_using_mono_debugger().       
1304
1305         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
1306         disable some JIT optimizations which are only disabled when
1307         running inside the debugger.
1308         Added `--help-debug' option to describe the debugging options.
1309         (parse_debug_options): New static function to parse the `--debug'
1310         options, so we can easily add more stuff in future.
1311
1312 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
1313
1314         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
1315         the method has no body.
1316
1317 2008-04-19  Jonathan Chambers <joncham@gmail.com>
1318
1319         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
1320         assembly is not allowed in MSVC 64-bit compiler. 
1321         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
1322         as we get floating point exceptions everywhere.
1323         
1324         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
1325         correctly align arguments for call to throw_exception.
1326         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
1327         
1328         Code contributed under MIT/X11 license.
1329
1330 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
1331
1332         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
1333
1334 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
1335
1336         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
1337
1338         * mini-amd64.c (NEW_INS): Set cil_code.
1339
1340         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
1341         from mini-amd64.c so all debugger related logic is in one place.
1342
1343         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
1344         later won't have a random ip assigned to them.
1345
1346 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
1347
1348         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
1349         the arch specific function initializes code_size.
1350         (mono_create_delegate_trampoline): Ditto.
1351
1352         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
1353         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
1354         platforms.
1355
1356         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
1357         running under the debugger.
1358
1359         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
1360         debugger.
1361
1362         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
1363         debugger. Also move the disabling of optimizations here from driver.c.
1364         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
1365         debugger.
1366
1367         * mini.h (MonoCompile): Add a few new flags.
1368
1369 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
1370
1371         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
1372         so the cil_code field of created MonoInst's is properly set.
1373         (mini_select_instructions): Ditto.
1374
1375         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
1376         (MONO_INST_NEW_CALL): Ditto.
1377
1378         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
1379         in many places so the ins->cil_code field is properly initialized.
1380
1381         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
1382         place.
1383
1384 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
1385
1386         * mini.c (mini_method_compile): Print a different message when compiling a 
1387         shared method.
1388         
1389         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
1390         > 1.
1391
1392 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
1393
1394         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
1395         SSE2 instructions.
1396
1397         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
1398         
1399 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
1400
1401         * mini.c (handle_stack_args): Make this return void since its return value was
1402         never used. Also set cfg->unverifiable for invalid IL instead of calling
1403         G_BREAKPOINT ().
1404
1405 2008-04-10  Mark Probst  <mark.probst@gmail.com>
1406
1407         * mini.c: Make sure "this" is live in catch clauses with type
1408         variables in shared generic code.
1409
1410 2008-04-08  Mark Probst  <mark.probst@gmail.com>
1411
1412         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
1413         generic_class_is_reference_type() to ensure the proper behaviour
1414         when sharing generic code and the type in question is a type
1415         argument.
1416
1417 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
1418
1419         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
1420         race conditions when printing thread dumps. Fixes #377738.
1421
1422 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
1423         
1424         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
1425         shows up when both MonoInst arguments can cause aliasig.
1426         There is likely no way in the current JIT to trigger this problem, but
1427         it showed up in the development of generics sharing, when in a new
1428         opcode both args of an OP_GROUP can be aliases (addresses of a local).
1429         When the generics sharing code will be committed, its tests will be
1430         valid also for this bug.
1431
1432 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
1433
1434         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
1435         PATCH_INFO_METHOD.
1436
1437         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
1438         NULL.
1439
1440 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
1441
1442         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
1443         use a more detailed exception message for InvalidCastException.
1444
1445         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
1446
1447         * driver.c (mono_main): Add --debug=casts option to turn on better 
1448         InvalidCastException message details.
1449
1450         * mini.c (mini_get_debug_options): New helper function to return the address of
1451         the debug_options variable.
1452
1453         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
1454         the jit_tls TLS variable.
1455
1456         * mini.c (mono_jit_tls): New TLS variable.
1457
1458         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
1459         option is used.
1460
1461 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
1462
1463         * mini.h: Removed verifer related stuff. This code was moved to verify.c
1464
1465         * mini.c: Removed verifer related stuff, code moved to verify.c.
1466
1467         * driver.c: Using code from verify.c instead of mini.c.
1468
1469 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
1470
1471         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
1472         longer valid.
1473
1474 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
1475
1476         * mini.c (check_for_method_verify): Enabling verification of
1477         corlib if mono_verify_all is set. Bugs in the verifier preventing that
1478         have been fixed.
1479
1480 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
1481
1482         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
1483         caller saved registers as well.
1484         
1485         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
1486         saved registers as well.
1487
1488 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
1489
1490         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
1491
1492         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
1493         code.
1494
1495 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
1496
1497         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
1498         to get_call_info.
1499         (get_call_info): Take a gsctx argument instead of 'cfg'.
1500
1501 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
1502
1503         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
1504         mono_verify_all is set.
1505
1506         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
1507
1508         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
1509
1510 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
1511
1512         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
1513         an exception.
1514
1515         * driver.c mini.c mini.h: Add a --verify-all development option to test the
1516         verifier and the code generated by the compiler.
1517
1518 2008-03-25  Mark Probst  <mark.probst@gmail.com>
1519
1520         * mini.c: Generic sharing of the non-nullable case of the box
1521         instruction.
1522
1523 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
1524
1525         * inssel.brg: Fix the build.
1526
1527         * iltests.il.in: Add a test for lconv.ovf.u8.un.
1528
1529 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
1530
1531         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
1532         Array:Address. Fixes #372410.
1533
1534         * iltests.il.in: New tests for readonly prefix.
1535
1536 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
1537
1538         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
1539         mini-trampolines.c.
1540
1541         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
1542         mini-exceptions.c.
1543
1544         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
1545         
1546         * mini.c (mono_decompose_op_imm): New helper function.
1547
1548         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
1549         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
1550         return value.
1551
1552         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
1553         mono_arch_output_basic_block. Fix warnings.
1554
1555         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
1556         for now.
1557
1558 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
1559
1560         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
1561         since the extra frame is now detected automatically inside the loop.
1562
1563         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
1564         opts which are now in mono_peephole_ins ().
1565         
1566         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
1567
1568         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
1569         frames and skip duplicate managed-to-native frames. Fixes #367665.
1570
1571         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
1572         opts which are now in mono_peephole_ins ().
1573         (mono_arch_peephole_pass_2): Ditto.
1574
1575         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
1576
1577         * mini-codegen.c (mono_peephole_ins): New helper function containing the
1578         arch independent peephole optimizations.
1579
1580         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
1581         opts which are now in mono_peephole_ins ().
1582
1583         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
1584         
1585         * mini-s390.c (mono_arch_output_basic_block): Fix build.
1586
1587         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
1588         pattern.
1589
1590         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
1591         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
1592         opcode. 
1593
1594 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
1595
1596         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
1597         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
1598         return value.
1599
1600         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
1601         mono_arch_output_basic_block. Fix warnings.
1602
1603 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
1604
1605         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
1606         conv.ovf.u.un.
1607
1608 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
1609
1610         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
1611         conv.ovf.u.un.
1612
1613         * iltests.il: Add new tests.
1614
1615 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
1616
1617         * mini.c: Removed Windows version macros.
1618
1619 2008-03-20  Mark Probst  <mark.probst@gmail.com>
1620
1621         * generic-sharing.c: Put reflection types in the extensible part
1622         of the runtime generic context.
1623
1624         * mini.c: Generic sharing of the GetTypeHandle special case of the
1625         ldtoken instruction.
1626
1627 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
1628
1629         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
1630
1631         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
1632         
1633         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
1634         consistency with the other version on the linear IR branch.
1635
1636         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
1637
1638         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
1639
1640         * iltests.il.in: Add new tests.
1641
1642 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
1643
1644         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
1645
1646         * iltests.il.in: Add new tests.
1647
1648 2008-03-19  Mark Probst  <mark.probst@gmail.com>
1649
1650         * mini.c: Two variables with the same name were declared in
1651         nesting contexts and one wasn't initialized.  Fixed.
1652
1653 2008-03-19  Mark Probst  <mark.probst@gmail.com>
1654
1655         * mini.c: Generic sharing of the initobj instruction.
1656
1657 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
1658
1659         * mini.c: make the test to optimize ldtoken from typeof() more
1660         precise.
1661
1662 2008-03-18  Mark Probst  <mark.probst@gmail.com>
1663
1664         * mini.c: Generic sharing of the initobj instruction for reference
1665         types.
1666
1667 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
1668
1669         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
1670         the mono_breakpoint_clean_code() code to perform bound checks.
1671
1672 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
1673
1674         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
1675         mono_arch_patch_callsite() to include the start of the managed method
1676         to be able to perform bound checks.
1677
1678 2008-03-17  Mark Probst  <mark.probst@gmail.com>
1679
1680         * mini.c: Generic sharing for the isinst instruction.
1681
1682 2008-03-17  Mark Probst  <mark.probst@gmail.com>
1683
1684         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
1685         inssel-long32-mips.brg: Added opcodes for doing indirect calls
1686         with the runtime generic context argument.
1687
1688         * mini.c: Share calls to several types of unsharable methods by
1689         putting the address of the method code in the runtime generic
1690         context and doing an indirect call.
1691
1692         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
1693         to switches.
1694
1695 2008-03-16  Mark Probst  <mark.probst@gmail.com>
1696
1697         * generic-sharing.c: Change due to a change in the runtime genric
1698         context API.
1699
1700 2008-03-15  Martin Baulig  <martin@ximian.com>
1701
1702         * tramp-x86.c
1703         (mono_arch_nullify_class_init_trampoline): Add call to
1704         mono_breakpoint_clean_code() to make things work when running
1705         inside the debugger.
1706
1707         * tramp-amd64.c
1708         (mono_arch_nullify_class_init_trampoline): Add call to
1709         mono_breakpoint_clean_code() to make things work when running
1710         inside the debugger.
1711
1712 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
1713
1714         * inssel-long.brg (reg): Fix 64 bit build.
1715
1716 2008-03-14  Mark Probst  <mark.probst@gmail.com>
1717
1718         * mini.c, mini.h: Share static generic code by passing it an
1719         implicit argument pointing to the runtime generic context.
1720
1721         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
1722         inssel-long32-mips.brg: New opcodes for calling shared static,
1723         which need to be passed the runtime generic context.
1724
1725         * mini-amd64.c, mini-x86.c: Save the runtime generic context
1726         argument on the stack in the prologue if needed.  New function for
1727         finding the runtime generic context argument from the registers
1728         saved by the trampoline.
1729
1730         * mini-amd64.h, mini-x86.h: Specify which register to use for the
1731         runtime generic context argument.
1732
1733         * tramp-amd64.c: Also restore the register used for the runtime
1734         generic context argument.
1735
1736         * mini-trampoline.c: Resolve shared static calls by consulting the
1737         runtime generic context via the new argument.
1738
1739         * generic-sharing.c: Add an argument to sharability-checking
1740         functions that specifies whether type variables should be treated
1741         as sharable type arguments.
1742
1743         * inssel-x86.brg: Removed a superfluous, buggy rule.
1744
1745         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
1746         to switches.
1747
1748 2008-03-14  Martin Baulig  <martin@ximian.com>
1749
1750         * debug-debugger.c (main_thread_handler): Call
1751         mono_runtime_run_main() without sending any notifications.
1752
1753         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
1754
1755 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
1756
1757         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
1758
1759 2008-03-14  Mark Probst  <mark.probst@gmail.com>
1760
1761         * tramp-x86.c: Fixed register restore offsets in the trampoline
1762         code for ECX and EDX.
1763
1764 2008-03-12  Geoff Norton  <gnorton@novell.com>
1765
1766         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
1767         different ucontext_t implementations.
1768         * exceptions-arm.c: Use the above defines to get exceptions working on 
1769         iPhone (based on a patch by Luke Howard lukeh@padl.com)
1770         * mini-arm.c: Implement iPhone icache support (based on a patch by
1771         Luke Howard lukeh@padl.com)
1772
1773 2008-03-12  Mark Probst  <mark.probst@gmail.com>
1774
1775         * mini.c: Enable generic sharing of calls to non-static
1776         non-interface non-generic non-value-type methods.
1777
1778         * mini-trampolines.c: Resolve calls from shared generic code.
1779
1780 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
1781
1782         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
1783
1784         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
1785
1786 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
1787
1788         * mini.c: some fixes for the AOT compiler.
1789
1790 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
1791
1792         * cpu-amd64.md: Add clob:1 to some float opcodes.
1793
1794 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
1795
1796         * mini.h: Added MiniVerifierMode enumeration.
1797
1798         * mini.c: Added mini_verifier_set_mode to control
1799         the usage of the new verifier.
1800
1801         * mini.c (mono_method): Integrated the new verifier.
1802
1803         * driver.c: Extended --security option with validil and
1804         verifiable options to activate the new verifier.
1805
1806 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
1807
1808         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
1809         optimization to ctors taking 0 or 2 arguments too.
1810
1811         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
1812         a bit.
1813
1814         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
1815
1816         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
1817
1818 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
1819
1820         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
1821         non-aot case as well.
1822
1823         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
1824
1825         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
1826         changes.
1827
1828         * aot-compiler.c (encode_patch): Ditto.
1829
1830         * mini.h (G_MININT32): Fix the definition of this.
1831
1832 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
1833
1834         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
1835
1836         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
1837
1838 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
1839
1840         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
1841         methods returning vtypes in registers.
1842         (mono_arch_allocate_vars): Ditto.
1843
1844         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
1845
1846         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
1847
1848         * generics.cs: Add a test from the linear IR branch.
1849
1850         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
1851
1852         * mini.c (inline_method): Cache failed inline attempts.
1853
1854 2008-03-04  Mark Probst  <mark.probst@gmail.com>
1855
1856         * mini.c: For shared methods of generic classes put the location
1857         of "this" into the MonoGenericJitInfo.
1858
1859         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
1860         register out of a MonoContext by register number.  Add the generic
1861         sharing context as an argument to mono_arch_find_this_argument().
1862
1863         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
1864         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
1865         for new arch function.
1866
1867         * mini-exception.c: Handle open exception clauses in shared
1868         generic code.
1869
1870         * mini-trampolines.c: Supply additional argument to
1871         mono_arch_find_this_argument().
1872
1873 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
1874
1875         * Makefile.am (regtests): Run the bench.exe tests last.
1876
1877 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
1878
1879         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
1880         a bit.
1881
1882 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
1883
1884         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
1885         with MS.
1886
1887         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
1888         
1889         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
1890
1891         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
1892         whose class has no cctor.
1893
1894         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
1895
1896 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
1897
1898         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
1899         unverified.
1900
1901 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
1902
1903         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
1904         to be in sync with the code on the linear IR branch.
1905
1906         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
1907
1908         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
1909
1910 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
1911
1912         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
1913
1914         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
1915
1916         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
1917
1918         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
1919
1920         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
1921         
1922         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
1923         body.
1924
1925 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
1926
1927         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
1928         OP_LOADR4_MEMBASE emission.
1929
1930         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
1931         (mono_spillvar_offset_float): Ditto.
1932
1933         * mini-mips.c (mono_arch_emit_prolog): Ditto.
1934
1935         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
1936         emission.
1937
1938         * basic-long.cs: Add regression tests for them.
1939
1940         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
1941         use.
1942         (mono_arch_allocate_vars): Fix representation of single-precision float
1943         argument.
1944         (mono_arch_output_basic_block): Ditto.
1945
1946         * inssel-mips.brg: Ditto, remove duplicate items.
1947
1948         * mini-mips.c (emit_load_volatile_arguments): New function to handle
1949         arguments of tail calls as on other platforms.
1950         (mono_arch_output_basic_block): Handle tail calls.
1951
1952         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
1953         register.
1954
1955         * objects.cs (test_5_pass_static_struct): Add test for it.
1956
1957         Contributed under MIT/X11 license.
1958
1959 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
1960
1961         * Makefile.am: Use gmcs for compiling the regression tests.
1962
1963         * *.2.cs *.2.il: Rename to *.cs and *.il.
1964
1965 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
1966
1967         * regalloc.h: Make the vassign array smaller.
1968
1969         * mini.c (mini_method_compile): Remove an unused field in cfg.
1970
1971         * mini-codegen.c: Add a bunch of micro optimizations.
1972
1973 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
1974
1975         * regalloc.h: Remove some unused fields.
1976
1977 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
1978
1979         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
1980
1981         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
1982
1983 2008-02-22  Mark Probst  <mark.probst@gmail.com>
1984
1985         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
1986
1987         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
1988         trampoline: Fetch an entry from the runtime generic context.  If
1989         it's NULL, jump to the actual trampoline to fill the runtime
1990         generic context.  Otherwise, return it.
1991
1992         * mini.c: Call the lazy fetch trampoline to get entries out of the
1993         runtime generic context.
1994
1995         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
1996         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
1997         tramp-sparc.c: Stubs for the lazy fetch trampoline.
1998
1999 2008-02-21  Mark Probst  <mark.probst@gmail.com>
2000
2001         * mini.c: Fetch data out of the extensible part of the runtime
2002         generic context instead of calling a helper function.
2003
2004         * generic-sharing.c: Some functions moved into
2005         metadata/generic-sharing.c.  Helper function for fetching other
2006         types now checks and asserts against extensible rgctx (just for
2007         debugging purposes - the helper function isn't called anymore
2008         unless for debugging).
2009
2010 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
2011
2012         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
2013         for tail calls up to the point that the tests in iltests.exe run. Also add a
2014         dummy CKFINITE implementation.
2015         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
2016         needed for trampoline LMF frames.
2017
2018         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
2019         trampoline LMF frames.
2020
2021 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
2022
2023         * mini.c (inline_method): clean any pending loader error when inlining fail.
2024         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
2025
2026 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
2027
2028         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
2029
2030         * aot-runtime.c (decode_patch_info): Ditto.
2031
2032         * mini.c (mono_resolve_patch_target): Ditto.
2033         
2034         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
2035         icall wrappers.
2036
2037         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
2038         
2039         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
2040         if it references an icall address.
2041
2042 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
2043
2044         * cpu-s390x.md: Remove some more unused opcodes.
2045         
2046         * cpu-s390x.md: Remove some unused opcodes.
2047
2048         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
2049         mono_op_imm_to_op ().
2050
2051         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
2052         instead of a switch statement.
2053         
2054         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
2055         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
2056
2057         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
2058         
2059         * mini-codegen.c: Remove unused mono_regstate2_... functions.
2060
2061         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
2062         -1.
2063
2064 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
2065
2066         * driver.c (mono_main): Improve error reporting when an assembly cannot be
2067         opened. Fixes #362607.
2068
2069         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
2070
2071         * iltests.il.in: Add a test for static methods in interfaces.
2072
2073 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
2074
2075         * genmdesc.c (build_table): Fix a crash on older glib versions.
2076
2077         * cpu-sparc.md: Remove some unused opcodes.
2078         
2079         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
2080         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
2081
2082         * cpu-amd64.md: Remove some unused opcodes.
2083
2084         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
2085         like the other opcodes.
2086
2087 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
2088
2089         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
2090
2091         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
2092
2093         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
2094         variables 'cfg' instead of 'm' for consistency.
2095
2096         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
2097
2098         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
2099         argument holding the vtype return address, to avoid the ambigious use of
2100         cfg->ret for this purpose.
2101
2102         * mini.c (NEW_RETLOADA): Use vret_addr if set.
2103
2104         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
2105         
2106         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
2107         new mono_print_ins () function which only takes one argument.
2108
2109 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
2110
2111         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
2112         macro arguments.
2113
2114 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
2115
2116         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
2117
2118         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
2119
2120         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
2121         opcodes and other small changes.
2122
2123         * mini-ops.h: Add some new opcodes from the linear IR branch.
2124
2125         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
2126
2127         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
2128         opcodes, use the REG_MEMBASE opcodes instead.
2129         
2130         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
2131         opcodes, use the REG_MEMBASE opcodes instead.
2132         
2133         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
2134         linear IR branch.
2135
2136         * mini.c (mono_op_imm_to_op): New helper function.
2137
2138         * mini-ops.h: Add some opcodes from linear IR branch.
2139
2140 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
2141
2142         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
2143         <tsv@solvo.ru>.
2144
2145 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
2146
2147         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
2148         OP_ICONV_TO_R4/R8.
2149
2150         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
2151
2152 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
2153
2154         * aot-compiler.c (emit_method_code): Add an assert.
2155
2156         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
2157         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
2158         methods.
2159
2160 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
2161
2162         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
2163         some load/store opcodes so they are consistent. 
2164         (mono_arch_emit_prolog): Simplify some code.
2165
2166         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
2167
2168         * objects.cs: Add tests for large argument offsets on ARM.
2169
2170         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
2171         stack offsets. Fixes #359651.
2172
2173         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
2174
2175         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
2176
2177         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
2178
2179         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
2180
2181         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
2182
2183         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
2184         rid of CEE_CONV_R_UN.
2185
2186         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
2187
2188 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
2189
2190         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
2191
2192         * mini.c (mono_normalize_opcodes): Add some more opcodes.
2193
2194         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
2195
2196         * cpu-amd64.md: Remove some unused opcodes.
2197
2198         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
2199
2200         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
2201
2202         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
2203         arch specific functions for its parts. Call the peephole pass after local
2204         regalloc so the prolog can compute a more accurate max_offset.
2205         
2206         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
2207         the corresponding OP_I/OP_L opcodes.
2208
2209         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
2210
2211         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
2212
2213 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
2214
2215         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
2216         as they are handled in mini.c.
2217
2218         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
2219         
2220         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
2221         case since it is handled in mini.c.
2222
2223         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
2224
2225         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
2226
2227         * *.c: Use the new opcodes in the IR and back end code.
2228
2229         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
2230
2231         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
2232
2233 2008-02-06  Mark Probst  <mark.probst@gmail.com>
2234
2235         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
2236         an assert because it has a race condition.
2237
2238 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
2239
2240         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
2241
2242         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
2243
2244         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
2245
2246         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
2247         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
2248
2249 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
2250
2251         * cpu-amd64.md (move): Correct the maximum size of move.
2252
2253 2008-02-05  Mark Probst  <mark.probst@gmail.com>
2254
2255         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
2256         the generic class init trampoline to return quickly if the class
2257         is already inited.
2258
2259 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
2260
2261         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
2262         issues where an 32 bit callsite cannot be patched by a 64 bit address.
2263
2264 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
2265
2266         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
2267         branch.
2268
2269 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
2270
2271         * objects.cs: Add some soft-float tests.
2272
2273         * mini.c: Fix a couple more soft-float issues.
2274
2275         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
2276
2277         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
2278         avoid a REX prefix.
2279
2280 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
2281
2282         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
2283         exception happens while compiling a virtual method.
2284
2285 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
2286
2287         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
2288         
2289         * mini-sparc.c: Fix build.
2290
2291         * mini-sparc.c (get_call_info): Add support for generic sharing.
2292
2293         * mini-exceptions.c: Add a FIXME.
2294
2295 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
2296
2297         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
2298         altstack handling code.
2299
2300         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
2301         
2302         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
2303
2304         * mini-s390.c: Add support for generic sharing.
2305
2306         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
2307         Fix CAS on s390.
2308         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
2309
2310         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
2311
2312         * mini-s390x.c: Add support for generic sharing.
2313         
2314         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
2315         Fix CAS on ia64.
2316         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
2317
2318         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
2319         can be used since it takes a 16 bit signed immediate.
2320
2321         * inssel-s390x.brg: Fix OP_SETRET.
2322
2323         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
2324
2325         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
2326
2327         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
2328
2329         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
2330
2331         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
2332         in one place.
2333
2334         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
2335         stuff.
2336
2337         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
2338         of the unused mono_arch_patch_delegate_trampoline stuff.
2339
2340 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
2341
2342         * basic-long.cs: Move the fp related tests to basic-float.cs.
2343
2344         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
2345
2346         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
2347
2348         * basic-calls.cs: Add a test for proper float argument passing.
2349
2350         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
2351         if the context corresponds to an exception received through a signal.
2352
2353         * exceptions.cs: Add a test for nullref handling at the start of a try
2354         clause.
2355
2356         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
2357
2358         * jit-icalls.c (mono_break): New JIT icall.
2359
2360         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
2361
2362         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
2363
2364 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
2365
2366         * cpu-*.md: Get rid of unused opcodes.
2367
2368         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
2369
2370         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
2371         by all platforms.
2372
2373         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
2374         define.
2375
2376         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
2377         the arch independent trampoline code in mini-trampolines.c.
2378
2379         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
2380
2381         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
2382
2383         * mini-s390.h: Remove an unused define.
2384         
2385         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
2386         the arch independent trampoline code in mini-trampolines.c.
2387
2388         * mini-arm.c (mono_arch_emit_prolog): Fix build.
2389
2390 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
2391
2392         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
2393
2394         * mini-s390.c (mono_arch_emit_prolog): Fix build.
2395
2396         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
2397
2398         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
2399
2400         * cpu-amd64.md: Use smaller sizes for int opcodes.
2401
2402         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
2403
2404         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
2405         objects.cs.
2406
2407         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
2408         debugging.
2409
2410         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
2411         instead of though a pointer to save an indirection when accessing elements of
2412         the array.
2413
2414         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
2415         some typos.
2416         (NOT_IMPLEMENTED): New helper macro.
2417         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
2418         of a bb.
2419
2420         * *.c: Use the new helper macro.
2421
2422 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
2423
2424         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
2425
2426 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
2427
2428         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
2429         stack slots.
2430
2431 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
2432
2433         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
2434         profiling is enabled.
2435         
2436         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
2437         the end.
2438         (mono_arch_emit_prolog): Add more first bblock optimizations.
2439
2440         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
2441         in order if possible.
2442         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
2443         bblock, since the arguments are still in their original registers.
2444
2445         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
2446
2447 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
2448
2449         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
2450         as well.
2451
2452         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
2453         offset 0.
2454
2455         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
2456
2457         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
2458         process async exceptions received while in unmanaged code.
2459
2460         * mini.c (mini_init): Install a callback with the runtime which will be called
2461         when a thread receives an async exception while in unmanaged code.
2462
2463         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
2464
2465         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
2466
2467 2008-01-16  Wade Berrier  <wberrier@novell.com>
2468
2469         * cpu-g4.md:
2470         * cpu-arm.md:
2471         * cpu-s390x.md:
2472         fix build
2473
2474 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
2475
2476         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
2477         compilation with sun cc.
2478
2479         * cpu-*.md: Fix the build.
2480
2481         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
2482
2483         * mini-amd64.h: Add some comments to the MonoLMF structure.
2484
2485         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
2486         
2487         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
2488         in the LMF structure if possible. This saves two instructions in the
2489         managed->native wrappers.
2490
2491         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
2492
2493 2008-01-16  Mark Probst  <mark.probst@gmail.com>
2494
2495         * generic-sharing.c: New type argument lookup code which uses the
2496         runtime generic context template.
2497
2498 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
2499
2500         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
2501
2502         * mini-arm.c (add_general): Fix arm eabi parameter passing.
2503         (mono_arch_output_basic_block): Fix localloc implementation.
2504
2505         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
2506
2507         * mini-ia64.c (peephole_pass): Fix ia64 build.
2508
2509         * mini-amd64.c (peephole_pass): Fix a warning.
2510         
2511         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
2512         at a constant offset from sp/fp.
2513
2514         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
2515         instead of obtaining it from *lmf in the managed method case.
2516
2517 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
2518
2519         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
2520
2521 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
2522
2523         * mini.h (MonoInstList): New type.
2524         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
2525         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
2526         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
2527         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
2528         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
2529         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
2530         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
2531         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
2532         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
2533         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
2534         MONO_INST_LIST_FOR_EACH_ENTRY,
2535         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
2536         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
2537         mono_inst_list_first, mono_inst_list_last,
2538         mono_inst_list_next, mono_inst_list_prev): New instruction
2539         list handling interfaces.
2540         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
2541         list head 'ins_list'.
2542         (MonoInst): Replace next pointer with list head 'node'.
2543         (MonoCallInst): Make 'out_args' a MonoInstList.
2544         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
2545         (MonoCompile): Delete reverse_inst_list and
2546         reverse_inst_list_len.
2547         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
2548         mono_arch_lowering_pass, mono_arch_local_regalloc,
2549         mono_arch_output_basic_block, mono_arch_emit_prolog):
2550         Convert to new instruction lists.
2551         (insert_after_ins): Delete.
2552         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
2553         instruction lists.
2554         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
2555         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
2556         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
2557         mono_emulate_opcode, mono_emit_load_got_addr,
2558         inline_method, mono_method_to_ir, mono_print_bb_code,
2559         print_dfn, decompose_pass, nullify_basic_block,
2560         replace_out_block_in_code, remove_block_if_useless,
2561         merge_basic_blocks, move_basic_block_to_end,
2562         try_unsigned_compare, optimize_branches, mono_print_code,
2563         mini_select_instructions, remove_critical_edges): Likewise.
2564         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
2565         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
2566         mono_arch_output_basic_block, mono_arch_emit_prolog):
2567         Likewise.
2568         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
2569         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
2570         mono_arch_output_basic_block): Likewise.
2571         (inst_list_prepend, insert_after_ins): Delete.
2572         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
2573         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
2574         instruction lists.
2575         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
2576         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
2577         mono_arch_emit_prolog): Likewise.
2578         * cfold.c (mono_constant_fold): Likewise.
2579         * liveness.c (visit_bb, mono_analyze_liveness,
2580         optimize_initlocals): Likewise.
2581         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
2582         * graph.c (mono_draw_code_cfg): Likewise.
2583         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
2584         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
2585         mono_ssa_cprop): Likewise.
2586         * abcremoval (get_relations_from_previous_bb, process_block):
2587         Likewise.
2588         * local-propagation (mono_cprop_invalidate_values,
2589         mono_local_cprop_bb): Likewise.
2590         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
2591         peephole_pass, mono_arch_output_basic_block,
2592         mono_arch_emit_prolog): Likewise.
2593         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
2594         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
2595         mono_arch_emit_prolog): Likewise.
2596         (insert_after_ins): Delete.
2597         * aliasing.c (print_code_with_aliasing_information,
2598         mono_build_aliasing_information, mono_aliasing_deadce):
2599         Convert to new instruction lists.
2600         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
2601         peephole_pass, NEW_INS, mono_arch_lowering_pass,
2602         mono_arch_local_regalloc, mono_arch_output_basic_block):
2603         Likewise.
2604         (insert_after_ins): Delete.
2605         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
2606         peephole_pass, mono_arch_output_basic_block): Convert to
2607         new instruction lists.
2608         * mini-codegen (InstList, inst_list_prepend,
2609         insert_after_ins): Delete.
2610         (insert_before_ins, get_register_force_spilling,
2611         get_register_spilling, free_up_ireg, free_up_reg,
2612         create_copy_ins, create_spilled_store, alloc_int_reg,
2613         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
2614         to new instruction lists.
2615         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
2616         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
2617         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
2618         (insert_after_ins): Delete.
2619         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
2620         mono_arch_local_regalloc, mono_arch_output_basic_block,
2621         mono_arch_call_opcode): Convert to new instruction lists.
2622         (insert_after_ins): Delete.
2623         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
2624         peephole_pass, mono_arch_output_basic_block,
2625         mono_arch_emit_prolog): Convert to new instruction lists.
2626
2627 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
2628
2629         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
2630
2631         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
2632         Fixes #353182.
2633
2634         * Makefile.am (version.h): Make this work with non-bash shells.
2635
2636 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
2637
2638         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
2639
2640 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
2641
2642         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
2643         the InitializeArray optimization.
2644
2645 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
2646
2647         * mini.c driver.c: Don't include os/gc_wrapper.h.
2648
2649 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
2650
2651         * mini.c (print_jit_stats): Print GC statistics if available.
2652
2653 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
2654
2655         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
2656
2657 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
2658
2659         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
2660
2661 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
2662
2663         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
2664         
2665         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
2666
2667         * driver.c (mono_main): Ditto.
2668
2669 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
2670
2671         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
2672
2673         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
2674         in the vtable can't be encoded.
2675         (compile_method): Ditto.
2676
2677 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
2678
2679         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
2680         defined.
2681
2682         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
2683         lmf->rbp.
2684
2685         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
2686         the top LMF entry belongs to the current method.
2687
2688         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
2689
2690 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
2691
2692         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
2693         
2694         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
2695
2696         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
2697
2698         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
2699
2700         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
2701
2702         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
2703         implementation.
2704
2705         * basic-float.cs: Add an ulong->double cast test.
2706
2707 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
2708
2709         * mini.c (mono_method_to_ir): Fix a warning.
2710
2711 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
2712
2713         * mini-ops.h: Add OP_SWITCH.
2714
2715         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
2716         CEE_SWITCH in back-end code, use OP_SWITCH instead.
2717
2718 2007-12-11  Geoff Norton  <gnorton@novell.com>
2719
2720         * mini-s390x.c: Minor change to the MAX() define to allow
2721         it to compile with other gcc versions.
2722
2723 2007-12-11  Geoff Norton  <gnorton@novell.com>
2724
2725         * cpu-s390x.md:
2726         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
2727
2728 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
2729
2730         exceptions-arm.c (mono_arch_get_restore_context): Restore
2731         the frame pointer.
2732
2733         exceptions-arm.c (throw_exception): Save the frame pointer.
2734         This is a partial fix for #323747. Only the client side is
2735         fixed.
2736
2737 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
2738
2739         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
2740         was using an unrelated variable to log the class which
2741         needed the cctor to be called. This was crashing on arm.
2742
2743 2007-12-09  Robert Jordan  <robertj@gmx.net>
2744
2745         * mini-x86.c (mono_arch_emit_epilog):
2746         Consider all kinds of 64-bit types. Fixes #323114.
2747
2748 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
2749
2750         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
2751
2752 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
2753
2754         * mini-amd64.c (peephole_pass): Add a missing instruction check.
2755
2756 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
2757
2758         * mini.c: run type ctor before allocating an object, not only
2759         when running it's constructor method (fixes at least part of bug #342507).
2760
2761 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
2762         
2763         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
2764         
2765         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
2766         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
2767         function.
2768
2769         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
2770         mono_generic_class_init_trampoline () the same as it is done with the other
2771         trampolines.
2772
2773         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
2774         aot-runtime.c aot-compiler.c: Implement AOT support.    
2775
2776 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2777
2778         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
2779         build for archs which don't have the vtable trampoline defined
2780         yet.
2781
2782 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
2783
2784         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
2785
2786         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
2787
2788         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
2789
2790         * tramp-<ARCH>.c: Use the new helper function.
2791
2792 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2793
2794         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
2795         trampoline call, which takes a vtable argument.
2796
2797         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
2798         OP_TRAMPCALL_VTABLEs like other calls.
2799
2800         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
2801         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
2802         call.  Implemented a support function which fetches the vtable
2803         from a register set.
2804
2805         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
2806         Implemented a generic class init trampoline, using the
2807         OP_TRAMPCALL_VTABLE opcode.
2808
2809         * mini.c: Implemented static field access when sharing generic
2810         code.  This implies initing the class using the new
2811         OP_TRAMPCALL_VTABLE call.
2812
2813 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2814
2815         * mini.c: Don't compile methods with sharing enabled if their
2816         classes are disabled for sharing.
2817
2818 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
2819
2820         * inssel.brg: Add a missing sign extension to the GETCHR and array access
2821         opcodes. Fixes #346563.
2822
2823         * objects.cs: Add a new test.
2824
2825         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
2826
2827         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
2828         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
2829
2830 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
2831
2832         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
2833
2834 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
2835
2836         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
2837         code stream.
2838
2839 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
2840
2841         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
2842
2843         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
2844         optimization in the AOT case.
2845         
2846 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
2847
2848         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
2849         
2850         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
2851
2852         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
2853
2854         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
2855
2856         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
2857         is created by the inlined delegate ctor.
2858
2859         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
2860
2861         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
2862
2863 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
2864
2865         * cpu-x86.md: Fix the length of ckfinite.
2866
2867 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
2868
2869         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
2870         
2871         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
2872         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
2873
2874         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
2875
2876         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
2877         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
2878
2879 2007-11-28  Martin Baulig  <martin@ximian.com>
2880
2881         * mini-x86.c
2882         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
2883         after creating the trampoline.
2884
2885 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
2886
2887         * aot-runtime.c (load_aot_module): Check runtime version if needed.
2888
2889         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
2890         the same version.
2891
2892         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
2893         instead of the calling method to help AOT.
2894
2895         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
2896
2897 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
2898
2899         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
2900         is defined.
2901
2902 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
2903
2904         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
2905         
2906         * aot-compiler.c (compile_method): Correct check for generic method definitions.
2907         (encode_method_ref): No need to handle generic method definitions specially.
2908
2909         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2910
2911         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
2912         decode_klass_info.
2913
2914         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
2915         encode_klass_info.
2916         (compile_method): Enable generic sharing.
2917
2918 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
2919
2920         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
2921         (mini_method_compile): Add preliminary support for AOTing shared generic code.
2922
2923         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
2924         generic code.
2925
2926         * mini-trampolines.c: Fix a warning.
2927
2928         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
2929         NEW_PCONST.
2930         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
2931         (generic_class_is_reference_type): Remove unused function.
2932
2933         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
2934         in the generic vtable trampoline case.
2935
2936         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
2937         
2938         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
2939         return an AOT method based on a vtable slot.
2940
2941         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
2942
2943         * mini.c (mini_get_vtable_trampoline): Export this.
2944
2945 2007-11-22  Martin Baulig  <martin@ximian.com>
2946
2947         * debug-debugger.h
2948         (MonoDebuggerInfo): Move `debugger_version' up.
2949
2950 2007-11-22  Martin Baulig  <martin@ximian.com>
2951
2952         * mini-amd64.c
2953         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
2954
2955         * mini-trampolines.c
2956         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
2957         after compiling the method.
2958
2959 2007-11-20  Martin Baulig  <martin@ximian.com>
2960
2961         * debug-mini.c
2962         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
2963         (mono_debugger_remove_breakpoint): Likewise.
2964         (mono_debugger_check_breakpoints): Likewise.
2965
2966         * debug-debugger.c: Implement the new breakpoint interface here.
2967
2968 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
2969
2970         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
2971         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
2972
2973         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
2974
2975 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
2976
2977         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
2978
2979         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
2980         mini.c.
2981
2982         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
2983         mini.c.
2984
2985         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
2986         returning a vtype in a register.
2987
2988         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
2989         here from the arch specific code.
2990
2991         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
2992         mini.c.
2993
2994         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
2995         (mono_arch_emit_prolog): Increment maximum prolog size.
2996
2997         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
2998         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
2999
3000         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
3001         MonoGenericSharingContext.
3002
3003         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
3004         MonoGenericSharingContext. Allocate memory from the cfg mempool.
3005
3006 2007-11-15  Mark Probst  <mark.probst@gmail.com>
3007
3008         * mini.c, mini.h, generic-sharing.c: Functions for producing code
3009         which extract fields out of the runtime generic context.  Full
3010         sharing of the NEWARR opcode.
3011
3012 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3013
3014         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
3015         --enable-minimal=ssa.
3016
3017 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
3018
3019         * mini-trampolines.c (mono_delegate_trampoline): Update after 
3020         mono_marshal_get_delegate_invoke () signature change.
3021
3022 2007-11-13  Mark Probst  <mark.probst@gmail.com>
3023
3024         * mini.c: Removed the shared context in favor of the generic
3025         sharing context.  Allocate the MonoJitInfo structure with room for
3026         the generic sharing context if it's needed.
3027
3028         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
3029         domain-internals.h now.
3030
3031         * mini-x86.c: Pass the generic sharing context to get_call_info ().
3032
3033         * generic-sharing.c: Several changes for working without a shared
3034         context and instead operating on open types instead.
3035
3036 2007-11-12  David S. Miller  <davem@davemloft.net>
3037
3038        * inssel-sparc.brg: Fix double instruction emit.
3039
3040 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
3041
3042         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
3043         Get/Set/Address methods.
3044         
3045         * mini.c debug-debugger.c mini-trampolines.c: Update after 
3046         mono_marshal_get_delegate_invoke signature change.
3047
3048 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
3049
3050         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
3051         This can happens with dynamic methods. Fixes the other bug in #322722.
3052
3053 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
3054
3055         * tramp-arm.c (mono_arch_patch_callsite): Support patching
3056         BX call sequence.
3057
3058         * mini-arm.c (arm_patch): Implement patching of BX call
3059         sequence. Fixes one of the bugs in #322722.
3060
3061 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
3062
3063        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
3064        under Linux.  We only need to flush every 32-byte cache line.    
3065
3066 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
3067
3068         * mini.c:
3069         move_basic_block_to_end: Add branches when needed, eventually creating
3070         a new BB.
3071         optimize_branches: added a parameter that tells if it's ok to create
3072         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
3073         and avoid calling move_basic_block_to_end when it's not ok.
3074         Fixes bug 318677.
3075
3076 2007-11-07  Mark Probst  <mark.probst@gmail.com>
3077
3078         * mini.c: Abort inlining call to InitializeArray if something
3079         looks wrong.  Let the icall handle it, which now has proper safety
3080         checks.
3081
3082 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
3083
3084         * mini.c (mono_spill_call): add support for soft-float.
3085
3086         * mini.c (mono_method_to_ir): add support for soft-float
3087         to inlined functions that return float.
3088
3089         * mini.c (mono_method_to_ir): add support for soft-float
3090         to cee_stsfld opcode on float fields.
3091
3092 2007-11-05  Geoff Norton  <gnorton@novell.com>
3093
3094         * mini-x86.h: Fix the structure access for X86 Leopard.
3095
3096
3097 2007-11-05  Martin Baulig  <martin@ximian.com>
3098
3099         * mini-trampolines.c
3100         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
3101         after compiling the method to notify the debugger.
3102
3103 2007-11-05  Martin Baulig  <martin@ximian.com>
3104
3105         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
3106
3107 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
3108
3109         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
3110         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
3111
3112 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
3113
3114         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
3115         native-to-managed wrappers.
3116         
3117 2007-11-01  Geoff Norton  <gnorton@novell.com>
3118
3119         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
3120         members.
3121
3122 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
3123
3124         * mini.c, mini-x86.c: when getting back from unmanaged code
3125         to managed via a marshaled delegate we also need to set the
3126         right domain.
3127
3128 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3129
3130         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
3131         for amd64.
3132
3133 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3134
3135         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
3136         let the debugger or other external agents to tell the JIT when
3137         a sw breakpoint has been inserted in the code that the JIT needs
3138         to be able to inspect.
3139
3140 2007-10-31  Martin Baulig  <martin@ximian.com>
3141
3142         * debug-debugger.h
3143         (MonoDebuggerInfo): Remove `runtime_class_init'.
3144
3145 2007-10-30  Martin Baulig  <martin@ximian.com>
3146
3147         * debug-mini.h
3148         (mono_debugger_thread_created): Added `MonoThread *' argument.
3149         (mono_debugger_extended_notification): New public method.
3150         (mono_debugger_trampoline_compiled): New public method.
3151
3152         * debug-mini.c
3153         (MonoDebuggerThreadInfo): Added `thread' and
3154         `extended_notifications' fields.
3155
3156         * debug-debugger.c
3157         (debugger_executable_code_buffer): New static variable.
3158
3159         * debug-debugger.h
3160         (MonoDebuggerInfo): Added `executable_code_buffer',
3161         `executable_code_buffer_size', `breakpoint_info_area',
3162         `breakpoint_table' and `breakpoint_table_size'.
3163
3164 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
3165
3166         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
3167         that IP  either is an unused value or the vtable pointer. IMT 
3168         calls use vtable + offset now. Reduced by almost half the size
3169         of IMT entries.
3170
3171 2007-10-26  Jonathan Chambers <joncham@gmail.com>
3172
3173         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
3174         defines to access param registers. Replace long usage with
3175         gsize as sizeof(long) != sizeof(void*) on Win64.
3176
3177         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
3178         on Win64. Fix intrinsic, use _AddressOfReturnAddress
3179         instead of non-existant _GetAddressOfReturnAddress.
3180
3181         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
3182         param registers. Save/restore %rdi and %rsi in MonoLMF.
3183
3184         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
3185         param registers. Modify (throw_exception) signature to take 
3186         %rdi and %rsi on Win64. 
3187
3188         Code is contributed under MIT/X11 license.
3189
3190 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3191
3192         * helpers.c: unlink debugging output files.
3193
3194 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
3195
3196         * mini.c: Move mono_create_ftnptr () to object.c.
3197
3198 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
3199
3200         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
3201         optional. This function can now be used to disassemble code generated
3202         outside the JIT such as trampolines and IMT thunks.
3203
3204         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
3205
3206         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
3207         vtable pointer from a ldr instruction.
3208
3209         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
3210         new IMT call sequence.
3211
3212         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
3213         call sequence for interface invocations.
3214
3215         * mini-arm.c (mono_arch_emit_imt_argument): added, required
3216         for imt support. This function is empty since IMT on ARM requires no
3217         special handling on the IR side.
3218
3219         * mini-arm.c (mono_arch_find_imt_method): added, required for
3220         imt support.
3221
3222         * mini-arm.c (mono_arch_find_this_argument): added, required
3223         for imt support.
3224
3225         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
3226         a ldr instruction to load a value stored in the code stream.
3227
3228         * mini-arm.c (mono_arch_build_imt_thunk):added, required
3229         for imt support.
3230
3231
3232 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
3233
3234         * mini.c (mini_init): Install the jump trampoline callback.
3235
3236 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3237
3238         * mini-trampolines.c: handle synchronized methods with the common
3239         vtable trampoline (bug #335601).
3240
3241 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
3242
3243         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
3244
3245         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
3246         64 bit platforms.
3247
3248         * mini-ia64.h mini-ia64.c: Add support for IMT.
3249
3250         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
3251         prolog. Fixes #331958.
3252
3253 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
3254
3255         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
3256
3257 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3258
3259         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
3260         trampoline.
3261
3262 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3263
3264         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
3265         trampoline.
3266
3267 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
3268
3269         * mini-x86.c, mini-x86.h: x86 support for the common vtable
3270         trampoline.
3271
3272 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
3273
3274         * mini-trampolines.c: changed the magic rampoline to understand
3275         the common vtable trampoline method: the method to invoke is
3276         determined by the vtable displacement of the call.
3277
3278 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3279
3280         * mini.c, mini.h: register the common vtable trampoline if the
3281         architecture supports it.
3282
3283 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3284
3285         * cpu-amd64.md: use the correct max length for tls_get.
3286
3287 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
3288
3289         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
3290         CEE_STELEM_ANY. Fixes #333696.
3291
3292 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
3293
3294         * exceptions-x86.c: provide more graceful handling of the case where
3295         we followed a bogus function pointer from managed code (bug #332866).
3296
3297 2007-10-11  Mark Probst  <mark.probst@gmail.com>
3298
3299         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
3300         replaces the generic_shared flag and will carry more information
3301         in the future.
3302
3303         * generic-sharing.c: Added mini_type_stack_size() which allows
3304         allows open types if given a generic sharing context.
3305         mini_get_basic_type_from_generic() takes a
3306         MonoGenericSharingContext* instead of a MonoCompile* now.
3307
3308         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
3309         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
3310         mini-sparc.c, mini-x86.c: Trivial changes required by the two
3311         changes above.  Just passing arguments through to the right
3312         places.
3313
3314 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
3315
3316         * mini-arm.c: unify the call emission to emit_code_seq().
3317
3318 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
3319
3320         * tramp-arm.c: reduced the trampoline size.
3321
3322 2007-10-10  Mark Probst  <mark.probst@gmail.com>
3323
3324         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
3325         variable handling out of arch-specific code.
3326
3327 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
3328
3329         * mini-arm.c: implemented fast delegate dispatch.
3330
3331 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
3332
3333         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
3334         that fp elimination is turned off if the space required by locals is too
3335         big. Fixes #331958.
3336
3337 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3338
3339         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
3340         ARM to the new style trampoline.
3341
3342 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
3343
3344         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
3345
3346         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
3347
3348 2007-10-09  Martin Baulig  <martin@ximian.com>
3349
3350         * debug-debugger.h
3351         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
3352         `field_info_offset_offset'.     
3353
3354 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
3355
3356         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
3357         removed more internal usage of the r11 register and made it available
3358         to the register allocator.
3359
3360 2007-10-08  Mark Probst  <mark.probst@gmail.com>
3361
3362         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
3363         when sharing generics and treat type variables as references.
3364
3365 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
3366
3367         * mini-ppc.c: started removing the internal uses of register r11
3368         to eventually allow the register allocator to manage it as an
3369         additional available register.
3370
3371 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
3372
3373         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
3374
3375 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
3376
3377         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
3378         specific trampolines as they are not performance critical as a jump
3379         target (maybe align as before only for AOT code?). This saves about
3380         200 KB of native code on x86 for monodevelop startup.
3381
3382 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
3383
3384         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
3385         monodevelop startup.
3386
3387 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
3388
3389         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
3390
3391         * mini-sparc.h mini-sparc.c: Implement IMT support.
3392
3393         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
3394         its smaller and doesn't clobber sparc_g1.
3395
3396         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
3397
3398 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
3399
3400         * mini-ppc.c: optimized the size of the IMT thunks a bit.
3401
3402 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
3403
3404         * mini-ppc.c: implemented fast delegate invocation.
3405
3406 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
3407
3408         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
3409
3410 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
3411
3412         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
3413         code to the new style trampoline in preparation for IMT support.
3414
3415 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
3416
3417         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
3418         systems already. This also reduces the specific trampiline sizes and
3419         prepares for the use of r12 as the IMT identifier register.
3420
3421 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3422
3423         * mini-mips.h: endianess fix (simplified from a patch by
3424         Thomas Kunze <thommy@tabao.de>, bug #323737).
3425
3426 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
3427
3428         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
3429         to access ucontext fields and enable netbsd support
3430         (partially from Magnus Henoch <mange@freemail.hu>).
3431
3432 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3433
3434         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
3435         use the preprocessor from the CPP env var if it is set.
3436
3437 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
3438
3439         * mini-trampolines.c: fixed an assertion and moved it earlier in the
3440         code, before interface_offset gets used.
3441
3442 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
3443
3444         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
3445         mono_class_setup_vtable () before accessing klass->vtable.
3446
3447 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
3448
3449         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
3450         hackish.
3451
3452 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3453
3454         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
3455         IMT slots (this saves hundreds of KB of memory in programs like
3456         IronPython and Monodevelop).
3457
3458 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
3459
3460         * mini.c: print the delegate counter.
3461
3462 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
3463
3464         * mini-x86.c: make it easier to enable the debugging code for IMT
3465         slots.
3466
3467 2007-09-28  Martin Baulig  <martin@ximian.com>
3468
3469         * debug-debugger.h
3470         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
3471         `mono_method_klass_offset' and `mono_method_token_offset'.
3472
3473 2007-09-20  Mark Probst  <mark.probst@gmail.com>
3474
3475         * mini.c: First generics sharing implementation.  Can only share
3476         in very simple cases.  If sharing doesn't work it falls back to
3477         dedicated compilation.
3478
3479         * mini.h: Flag in MonoCompile to specify whether generic
3480         compilation is shared.  Flags enum for marking which generic inst
3481         of a context is used.  Prototypes for helper functions.
3482
3483         * generic-sharing.c: Helper functions for generic method sharing.
3484
3485         * optflags-def.h: Optimization flag (gshared) for enabling generic
3486         method sharing added.
3487
3488         * Makefile.am: generic-sharing.c added.
3489
3490 2007-09-19 Daniel Nauck <dna@mono-project.de>
3491
3492         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
3493
3494 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
3495         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
3496         fixes bug 325507.
3497
3498 2007-09-19  Martin Baulig  <martin@ximian.com>
3499
3500         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
3501         mono_debug_cleanup() is now part of mono_cleanup().
3502
3503 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
3504
3505         * driver.c (mono_main): Fix a warning.
3506
3507 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
3508
3509         * aot-compiler.c: Optimize various parts when processing large assemblies.
3510         Fixes ##325568.
3511
3512         * mini.c (mono_patch_info_hash): Improve hash function.
3513
3514 2007-09-14  Jonathan Chambers <joncham@gmail.com>
3515
3516         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
3517         
3518         Code is contributed under MIT/X11 license.
3519
3520 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
3521
3522         * mini.c (mini_init): Fix a leak.
3523
3524         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
3525
3526 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3527
3528         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
3529
3530 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
3531
3532         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
3533
3534 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
3535
3536         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
3537         variance tests.
3538
3539         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
3540
3541         * mini.c (handle_alloc): Enable managed allocators in AOT code.
3542
3543         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
3544
3545         * aot-runtime.c (decode_patch_info): Ditto.
3546
3547 2007-09-12  Jonathan Chambers <joncham@gmail.com>
3548
3549         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
3550         static case. Cache delegates in architecture specific code, 
3551         based on number of parameters.
3552         
3553         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
3554         in architecture specific code, based on number of parameters.
3555         
3556         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
3557         caching happen in architecture specific code now.
3558         
3559         Code is contributed under MIT/X11 license.
3560
3561 2007-09-12  Jonathan Chambers <joncham@gmail.com>
3562
3563         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
3564         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
3565         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
3566
3567         Code is contributed under MIT/X11 license.
3568
3569 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
3570         * mini.c: (mono_thread_abort) Fixed bug #82416.
3571
3572 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
3573
3574         * mini.: hook the new managed GC allocation feature into the JIT.
3575
3576 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
3577
3578         * mini.c: implementation for the new runtime tls opcode.
3579
3580 2007-09-11  Martin Baulig  <martin@ximian.com>
3581
3582         * debug-debugger.h
3583         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
3584         `mono_method_inflated_offset'.
3585
3586 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
3587
3588         * driver.c mini.h mini.c: Add a new devel command line option for injecting
3589         async exceptions into a method.
3590
3591         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
3592         purpose of testing whenever the unwinder works at every instruction.
3593
3594 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
3595
3596         * mini.c: check accessibility of method used in ldftn (fixes
3597         bug #82635).
3598
3599 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
3600
3601         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
3602
3603         * inssel.brg: Fix a warning.
3604
3605 2007-09-03  Martin Baulig  <martin@ximian.com>
3606
3607         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
3608         now takes the `main_method' as argument.
3609
3610 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
3611
3612         * cpu-sparc.md (endfilter): Add missing src1:i argument.
3613
3614 2007-08-30  Jonathan Chambers <joncham@gmail.com>
3615
3616         * driver.c: include the cil-coff.h header on Windows.
3617         
3618         Code is contributed under MIT/X11 license.
3619
3620 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
3621
3622         * mini.c, driver.c: don't include the cil-coff.h header.
3623
3624 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
3625
3626         * mini.c: flag places that needs fixes fo soft-float support.
3627
3628 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
3629
3630         * mini.h, inssel-float.brg: fix soft-float constant loads on big
3631         endian systems (partially from Dean Jenkins, bug #81924).
3632
3633 2007-08-28  Mark Probst  <mark.probst@gmail.com>
3634
3635         * mini.c (check_linkdemand): Remove embedded reference object in
3636         call to LinkDemandSecurityException.
3637         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
3638         with an IntPtr instead of a reference object.
3639
3640 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
3641
3642         * mini.c (handle_initobj): Handle alignment properly.
3643
3644         * inssel.brg (mini_emit_memset): Ditto. 
3645
3646         * inssel.brg (mini_emit_memcpy): Ditto. 
3647
3648         * inssel-sparc.brg: Ditto.              
3649
3650         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
3651
3652 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
3653
3654         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
3655         exceptions raised in unmanaged code. Fixes part of #82594.
3656
3657 2007-08-24  Mark Probst  <mark.probst@gmail.com>
3658
3659         * mini.c (mono_method_to_ir), declsec.c
3660         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
3661
3662 2007-08-22  Martin Baulig  <martin@ximian.com>
3663
3664         * debug-mini.h
3665         (MonoDebuggerThreadInfo): New typedef.
3666         (mono_debugger_thread_table): New global variable.
3667         (mono_debugger_thread_created): New public function.
3668         (mono_debugger_thread_cleanup): New public function.
3669
3670         * debug-debugger.h
3671         (MonoDebuggerInfo):
3672         - removed `get_current_thread' and `lookup_assembly'.
3673         - removed `data_table'.
3674         - added `thread_table'.
3675
3676         * mini.c
3677         (mono_thread_start_cb): Call mono_debugger_thread_created().
3678         (mono_thread_attach_cb): Likewise.
3679         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
3680         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
3681         initial domain.
3682
3683         * driver.c (mono_main): Move mono_debug_init() up, before calling
3684         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
3685
3686 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3687
3688         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
3689         together when passing several arguments of type double (gives a small
3690         speedup and saves a few bytes of generated code).
3691
3692 2007-08-20  Jb Evain  <jbevain@novell.com>
3693
3694         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
3695
3696 2007-08-20  Jb Evain  <jbevain@novell.com>
3697
3698         * mini.c (mono_method_to_ir): throw MethodAccessException
3699         and FieldAccessException instead of InvalidProgramException.
3700
3701 2007-08-20  Mark Probst  <mark.probst@gmail.com>
3702
3703         * mini.c: CoreCLR security checks.
3704
3705         * mini.h: Removed MonoSecurityMode (moved to
3706         metadata/security-manager.h) and mono_security_mode global var
3707         (replaced by set/get functions in security-manager.h).
3708
3709         * driver.c: Added "core-clr-test" security mode for testing.  Used
3710         set-function for setting security mode.
3711
3712 2007-08-17  Mark Probst  <mark.probst@gmail.com>
3713
3714         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
3715         the new jit_info_table.
3716
3717         * driver.c: Test code for the new jit_info_table (enabled by the
3718         define MONO_JIT_INFO_TABLE_TEST).
3719
3720 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
3721
3722         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
3723         detection of call <REG> instruction sequence. Fixes build on freebsd.
3724
3725 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
3726
3727         * mini-exceptions.c: Fix a warning.
3728
3729 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
3730
3731         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
3732         stack overflow handling code on amd64 too.
3733
3734         * mini-exceptions.c (mono_setup_altstack): Make this use 
3735         mono_thread_get_stack_bounds ().
3736
3737         * mini-x86.h: Disable sigaltstack on solaris x86.
3738
3739 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
3740
3741         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
3742
3743 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
3744
3745         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
3746
3747 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
3748
3749         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
3750
3751         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
3752
3753 2007-08-03  Neale Ferguson <neale@sinenomine.net>
3754
3755         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
3756         due to alignment.
3757
3758 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
3759
3760         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
3761         to be emitted (bug #82281).
3762
3763 2007-08-01  Martin Baulig  <martin@ximian.com>
3764
3765         Merged the `debugger-dublin' branch.
3766
3767         * debug-debugger.h (MonoDebuggerInfo):
3768         Removed the `old_*' compatibility entries.
3769         Added `debugger_version' and `data_table'.
3770         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
3771         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
3772
3773         * debug-mini.c
3774         (MiniDebugMethodBreakpointInfo): Add `address_list'.
3775         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
3776         instead of a `gconstpointer'.
3777         (mono_debugger_insert_method_breakpoint): Return a
3778         `MonoDebugMethodAddressList *'.
3779
3780 2007-06-28  Martin Baulig  <martin@ximian.com>
3781
3782         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
3783
3784 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
3785
3786         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
3787         __builtin_frame_address () since it is broken on older gcc versions.
3788
3789 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
3790
3791         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
3792         on the stack overflow handling and made the managed stack overflows
3793         catchable in most cases using soft guard pages.
3794         * exceptions-x86.c: added code to restore the protection in the soft
3795         guard pages at the end of exception handling.
3796
3797 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
3798
3799         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
3800
3801 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3802
3803         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
3804         exception handling.
3805
3806 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3807
3808         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
3809         signal handling support until it has been ported to the new mechanism.
3810         * mini.c: fixed stack overflow detection and use the new
3811         architecture code  to handle signals on the altstack.
3812
3813 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
3814
3815         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
3816         stack overflows on the alt stack.
3817
3818 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
3819
3820         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
3821         stack overflows on the alt stack.
3822
3823 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
3824
3825         * exceptions-ppc.c: cleanup preparing for altstack support.
3826
3827 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3828
3829         * exceptions-arm.c: cleanup preparing for altstack support.
3830
3831 2007-07-27  Mark Probst  <mark.probst@gmail.com>
3832
3833         * mini.c (print_jit_stats): Output hazard pointer stats.
3834
3835 2007-07-26  Mark Probst  <mark.probst@gmail.com>
3836
3837         * driver.c, mini.c: Replaced security mode flags with a single
3838         enum variable.
3839
3840 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3841
3842         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
3843
3844 2007-07-25  Mark Probst  <mark.probst@gmail.com>
3845
3846         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
3847         (which doesn't do anything yet) for activating Core CLR
3848         (Silverlight) security.
3849
3850 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
3851
3852         * mini-codegen.c: work around a possible gcc bug on arm.
3853
3854 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
3855
3856         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
3857         message for platforms that don't support AOT compilation.
3858
3859 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
3860
3861         * mini.h, mini.c, driver.c: temporary smcs hack.
3862
3863 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
3864
3865         * mini-arm.h, mini-arm.c: arm EABI fixes.
3866
3867 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
3868
3869         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
3870         case.
3871
3872         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
3873         trampolines taking a method argument.
3874
3875         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
3876
3877         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
3878         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
3879
3880         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
3881         JIT compilation throws an exception. Fixes #82050.
3882
3883 2007-07-19  Mark Probst  <mark.probst@gmail.com>
3884
3885         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
3886         with the MONO_EXCEPTION_ defines.
3887
3888 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
3889
3890         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
3891         #82117.
3892         
3893         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
3894         the cause of an assertion.
3895
3896 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
3897
3898         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
3899         removed.
3900
3901 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
3902
3903         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
3904         assert. Should fix #82103.
3905
3906 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
3907
3908         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
3909         here too. Fixes #82095.
3910
3911         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
3912         addresses.
3913
3914         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
3915
3916         * mini-amd64.h: Enable IMT for amd64.
3917         
3918         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
3919
3920 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
3921
3922         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
3923
3924 2007-07-12  Mark Probst  <mark.probst@gmail.com>
3925
3926         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
3927         as soon as check_linkdemand sets an exception_type.
3928
3929 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
3930
3931         * mini-x86.c: fixed offsets for IMT call sequence.
3932         * mini-x86.h: enable IMT again.
3933
3934 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
3935
3936         * trace.c (mono_trace_enter_method): Decode MonoType too.
3937
3938         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
3939
3940         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
3941
3942         * mini-amd64.c: Add preliminary IMT implementation.
3943         
3944 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
3945
3946         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
3947         understand the new IMT-base interface invocation (thanks to
3948         Daniel Nauck for the report and the remote debugging session).
3949
3950 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
3951
3952         * mini-x86.c: size and speed optimizations for the IMT bsearch.
3953
3954 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
3955
3956         * Makefile.am (aotcheck): Make this actually use the AOTed code.
3957
3958 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
3959
3960         * mini-trampolines.c: implement AOT IMT support.
3961         * mini-x86.h: enable IMT support for wider testing.
3962
3963 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3964
3965         * inssel.brg (emit_imt_argument): Add aot support here.
3966
3967         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
3968
3969 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3970
3971         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
3972         of the IMT implementation, partially from massi, with my
3973         implementation of the bsearch sequence. Disabled by default until
3974         the AOT code is implemented.
3975
3976 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3977
3978         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
3979
3980         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
3981
3982 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3983
3984         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
3985         arch-independent IMT JIT code from Massimiliano
3986         Mantione (massi@ximian.com) with small cleanups from me.
3987
3988 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3989
3990         * Makefile.am: fix svn invocation to get the svn revision to be
3991         independent of the local language (build fix).
3992
3993 2007-07-09  Mark Probst  <mark.probst@gmail.com>
3994
3995         * mini.c (inline_method): Reset cfg->exception_type if the
3996         inlining is aborted.  Fixes: 82049.
3997
3998 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
3999
4000         * mini.c: remove assert from exception handling code when exception_ptr
4001         is not set.
4002
4003 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
4004
4005         * mini.c (mono_codegen): Add an assert.
4006
4007         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
4008         enter and leave code.
4009         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
4010
4011 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4012
4013         * mini-ppc.c: fixed memory corruption for localloc(0)
4014         (bug #81852).
4015
4016 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
4017         
4018         * mini.c: Fix warnings.
4019
4020 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
4021
4022         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
4023         to emit better double->int conversions.
4024
4025 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4026
4027         * mini.c: the provided Min/Max optimizations are valid for unisgned
4028         ints.
4029
4030 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
4031
4032         * 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
4033
4034 2007-06-28  Miguel de Icaza  <miguel@novell.com>
4035
4036         * mini.c (mono_running_on_valgrind): Add support for reporting the
4037         method and  its boundaries to valgrind.
4038
4039 2007-06-28  Martin Baulig  <martin@ximian.com>
4040
4041         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
4042
4043 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
4044
4045         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
4046
4047         * generic.2.cs: Add new test case.
4048
4049 2007-06-25  Martin Baulig  <martin@ximian.com>
4050
4051         Merged the `debugger-dublin' branch.
4052
4053         * debug-mini.c
4054         (mono_debugger_insert_method_breakpoint): New public method.
4055         (mono_debugger_remove_method_breakpoint): Likewise.
4056         (mono_debugger_check_breakpoints): New static method.
4057         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
4058
4059         * debug-debugger.h (MonoDebuggerInfo):
4060         Renamed (to keep backward compatibility in the vtable):
4061         `insert_breakpoint' -> `old_insert_breakpoint'.
4062         `remove_breakpoint' -> `old_remove_breakpoint'.
4063         `create_string' -> `old_create_string'.
4064         `lookup_class' -> `old_lookup_class'.
4065         `lookup_type' -> removed; changed into a dummy field.
4066         `lookup_assembly' -> `old_lookup_assembly'.
4067         Added (same functionality, but different signature):
4068         `create_string', `lookup_class', `lookup_assembly'
4069         Added new:
4070         `get_method_addr_or_bpt', `remove_method_breakpoint',
4071         `runtime_class_init'.
4072
4073         * debug-debugger.c: Merged the `debugger-dublin' branch.
4074
4075 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
4076
4077         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
4078         well.
4079         (peephole_pass): Likewise.
4080
4081 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
4082
4083         * driver.c: hopefully make setaffinity work also for ancient
4084         versions of linux.
4085
4086 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
4087
4088         * driver.c : win32 build fix.
4089
4090 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
4091
4092         * driver.c: check for the MONO_NO_SMP env var and bind to a single
4093         processor if it is set.
4094
4095 2007-06-21  Martin Baulig  <martin@ximian.com>
4096
4097         * debug-mini.h: New file.
4098
4099         * debug-mini.c
4100         (mono_debugger_insert_breakpoint_full): Moved here from
4101         ../metadata/mono-debug-debugger.c.
4102         (mono_debugger_remove_breakpoint): Likewise.
4103         (mono_debugger_breakpoint_callback): Likewise.
4104
4105 2007-06-15  Raja R Harinath  <rharinath@novell.com>
4106
4107         * jit-icalls.c (mono_helper_compile_generic_method): Update to
4108         changes in MonoGenericClass.
4109
4110 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
4111
4112         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
4113
4114 2007-06-14  Raja R Harinath  <rharinath@novell.com>
4115
4116         * jit-icalls.c (mono_helper_compile_generic_method): Update to
4117         removal of MonoGenericMethod.
4118
4119 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4120
4121         * mini-exceptions.c: hooks for the exception events profiling API.
4122
4123 2007-06-14  Randolph Chung  <tausq@debian.org>
4124
4125         * Makefile.ma: Add hppa target.
4126         * mini-arch.h: Include mini-hppa.h
4127         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
4128         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
4129         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4130
4131 2007-06-14  Randolph Chung  <tausq@debian.org>
4132
4133         * inssel.brg: Add rules for "chained" compare-branch operations so that
4134         a single compare op can affect multiple branches.  Adjust cost for
4135         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
4136         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
4137         cost for some rules so that they can more easily be overridden by
4138         per-arch rules (with fixes from lupus).
4139         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4140
4141 2007-06-13  Randolph Chung  <tausq@debian.org>
4142
4143         * mini-ops.h: Reorder branch ops so that they match the order of the
4144         corresponding CEE_* ops.  The code expects them this way.
4145         Add new ops for HPPA target.
4146         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4147
4148 2007-06-13  Randolph Chung  <tausq@debian.org>
4149
4150         * mini-exceptions.c: Handle cases where the stack grows towards
4151         larger addresses.
4152         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4153
4154 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
4155
4156         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
4157         counter.
4158         * driver.c: explain where a non-matching corlib is found.
4159
4160 2007-06-13  Mark Probst  <mark.probst@gmail.com>
4161
4162         * mini.c (print_jit_stats): Output dynamic code allocation stats.
4163
4164 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
4165
4166         * mini-exceptions.c: Generate a method profile leave event during
4167         an exception to ensure that the profiler gets notified.
4168
4169 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
4170
4171         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
4172         branch.
4173
4174         * cpu-amd64.md: Add long_and/or/xor opcodes.
4175
4176 2007-06-06  Wade Berrier  <wberrier@novell.com>
4177
4178         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
4179         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
4180         length of instruction shr_imm (expected 8, got 10)
4181
4182 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
4183
4184         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
4185
4186 2007-06-06  Mark Probst  <mark.probst@gmail.com>
4187
4188         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
4189         MonoInternalHashTable again (fixed bug in the internal hash table
4190         code).
4191
4192 2007-06-06  Mark Probst  <mark.probst@gmail.com>
4193
4194         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
4195         Have to figure out what makes it crash the SWF regression.
4196
4197 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
4198
4199         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
4200
4201 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4202
4203         * mini.c: optimize out the type check when storing null in a
4204         reference array.
4205
4206 2007-06-04  Mark Probst  <mark.probst@gmail.com>
4207
4208         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
4209         MonoInternalHashTable.
4210
4211 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
4212
4213         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
4214         signed integer methods.
4215
4216 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
4217
4218         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
4219         permanently since the current approach doesn't work.
4220
4221 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
4222
4223         * inssel.brg (stmt): Only call delegate->invoke_impl if 
4224         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
4225
4226 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
4227
4228         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
4229         the sreg2==rdx case.
4230         
4231         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
4232         account if it contains a rex prefix.
4233         (peephole_pass): Handle OP_FMOVE as well.
4234
4235 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
4236
4237         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
4238         as it causes regressions.
4239
4240 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
4241
4242         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
4243         static case as well.
4244
4245         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
4246
4247         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
4248         (mono_arch_get_this_arg_from_call): Ditto.
4249
4250         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
4251
4252         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
4253         invoke_impl field.
4254
4255         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
4256         (mono_arch_get_this_arg_from_call): Ditto.
4257
4258         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
4259         
4260         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
4261         try to create optimized invoke code and use that for further invocations. 
4262         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
4263
4264         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
4265
4266 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
4267
4268         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
4269         sealed classes or methods.
4270         *devirtualization.cs: tests for the new optimization
4271
4272 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
4273
4274         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
4275         by the update_volatile () function.
4276
4277 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
4278
4279         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
4280         require it.
4281
4282         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
4283
4284 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
4285
4286         * mini.c: Add configure checks for header files.
4287         * mini-x86.c: Add configure checks for header files.
4288         * trace.c: Add configure checks for header files.
4289         * aot-runtime.c: Add configure checks for header files.
4290         * aot-compiler.c: Add configure checks for header files.
4291         * driver.c: Add configure checks for header files.
4292         * mini-codegen.c: Add configure checks for header files.
4293         
4294         Code is contributed under MIT/X11 license.
4295
4296 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
4297
4298         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
4299         icompare_imm -128 + op_iclt. Fixes #81703.
4300
4301 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
4302
4303         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
4304
4305 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
4306
4307         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
4308         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
4309         so that all isinst checks now use "interface_bitmap".
4310
4311 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
4312
4313         * cpu-amd64.md (jmp): Fix a warning.
4314
4315         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
4316
4317         * basic.cs: Add new regression test.
4318
4319         * basic.cs: Remove test which is now in basic-long.cs.
4320
4321         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
4322
4323         * basic-long.cs: Add new test.
4324         
4325 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
4326
4327         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
4328
4329 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
4330
4331         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
4332
4333         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
4334         places.
4335         
4336         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
4337         throwing code a bit.
4338
4339         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
4340         the exception throwing code a bit.
4341
4342         * mini-x86.c (get_call_info): Allocate result from a mempool.
4343
4344 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
4345
4346         * aot-compiler.c (find_typespec_for_class): Fix the assert.
4347
4348         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
4349
4350         * mini.h (MonoCompile): Add 'token_info_hash' field.
4351
4352         * mini.c: Save token->method associations during compilation so the AOT 
4353         compiler can use it.
4354         
4355         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
4356         which reference generic classes and methods.
4357
4358 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
4359
4360         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
4361
4362         * aot-compiler.c (compile_method): Fix a typo in a comment.
4363
4364         * aot-runtime.c (decode_cached_class_info): Skip generic types.
4365
4366         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
4367         everything generic.
4368
4369         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
4370
4371 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
4372
4373         * mini.h (MonoCompile): Add 'args' field.
4374
4375         * mini.c (mono_compile_create_vars): Store variables representing the arguments
4376         into cfg->args.
4377
4378         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
4379
4380 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
4381
4382         * mini.c (mono_compile_get_interface_var): Remove this unused function.
4383
4384         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
4385
4386         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
4387         opcodes for some opcodes.
4388
4389         * mini.h *.brg *.c: Use the new opcodes.
4390
4391 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
4392
4393         * mini.h: Bumped aot revision.
4394
4395         * inssel.brg: modified code generation of type checks for interfaces
4396         to use the new "MonoClass.interface_bitmap" instead of the old
4397         "MonoClass.interface_offsets".
4398
4399 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
4400
4401         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
4402
4403 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
4404
4405         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
4406         64 bit platforms.
4407
4408 2007-04-27  Neale Ferguson <neale@sinenomine.net>
4409
4410         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
4411
4412 2007-04-27  Wade Berrier  <wberrier@novell.com>
4413
4414         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
4415         mini.h) to fix build.
4416
4417 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
4418
4419         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
4420         
4421         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
4422         causes the corlib unit tests to fail.
4423
4424 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
4425
4426         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
4427
4428         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
4429
4430         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
4431         opcodes to the comparison relations.
4432
4433         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
4434         opcodes to their types.
4435         
4436         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
4437
4438         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
4439         it in cfg->arch.cinfo.
4440
4441         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
4442
4443         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
4444         cfg->cil_offset_to_bb.
4445
4446 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
4447
4448         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
4449         created becase of initlocals.
4450
4451 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
4452
4453         * mini-alpha.c cpu-alpha.md: More alpha port work from 
4454         Sergey Tikhonov <tsv@solvo.ru>.
4455
4456 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
4457
4458         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
4459
4460 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
4461
4462         * cpu-s390.md (break): Correct the length of break instruction.
4463
4464 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4465
4466         * mini.c: fix a couple of soft-float issues and comments.
4467
4468 2007-04-15  Miguel de Icaza  <miguel@novell.com>
4469
4470         * trace.c (is_filenamechar): - is also a filename char.
4471
4472 2007-04-15  Neale Ferguson <neale@sinenomine.net>
4473
4474         * mini-s390.c: Correct checking for enum type in return value processing.
4475
4476 2007-04-14  Raja R Harinath  <rharinath@novell.com>
4477
4478         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
4479         (version.h): Makefile is in the build directory.
4480
4481 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
4482
4483         * mini-amd64.h: fix for assertion failure on Solaris/amd64
4484
4485 2007-04-11  Martin Baulig  <martin@ximian.com>
4486
4487         * mini.c (can_access_member): Fix handling of generic classes;
4488         fixes #81259.
4489
4490 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
4491
4492         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
4493
4494 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
4495
4496         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
4497
4498 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
4499
4500         * mini-codegen.c: make sure the right spill amount is
4501         used for fp or integer registers (fixes the float_sub_spill() on ppc).
4502
4503 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
4504
4505         * mini-ppc.c: fixes for the fp_branch_nan test.
4506
4507 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
4508
4509         * basic.cs: Comment out new test which still fails on ia64.
4510
4511 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4512
4513         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
4514
4515 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
4516
4517         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
4518
4519 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
4520
4521         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
4522         on 64 bit machines. Fixes part of #80738.
4523
4524         * basic.cs: Add regression test.
4525
4526 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
4527
4528         * inssel.brg basic.cs: Revert previous change to fix build.
4529
4530         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
4531         platforms.
4532         
4533         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
4534
4535         * basic.cs: Add new regression test.
4536
4537 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
4538
4539         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
4540         many arguments.
4541
4542 2007-03-16  Neale Ferguson <neale@sinenomine.net>
4543
4544         * cpu-s390x.md: Correct length of break instruction.
4545
4546 2007-03-16  Neale Ferguson <neale@sinenomine.net>
4547
4548         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
4549         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
4550
4551 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
4552
4553         * *.c: Begin WIN64 port.
4554         * mini.c:  Use correct register in profiler.
4555         * mini-amd64.c: No inline assembly on Win64.
4556         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
4557         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
4558         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
4559         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
4560         mono_arch_ip_from_context for Win64.
4561         
4562         Contributed under MIT/X11 license.
4563
4564 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
4565
4566         * exceptions-amd64.c (seh_handler): Ditto.
4567
4568         * exceptions-x86.c (seh_handler): Fix a memory leak.
4569
4570 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
4571
4572         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
4573         mini-s390x.c: fixed peephole optimizations to deal
4574         correctly with 1 and 2 byte reload avoidance.
4575
4576 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
4577
4578         * cpu-s390.md, cpu-s390x.md: update localloc length.
4579
4580 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
4581
4582         * cpu-g4.md: added missing descriptions.
4583
4584 2007-03-14  Miguel de Icaza  <miguel@novell.com>
4585
4586         *  Makefile.am: Add support so the tail tests are not executed on
4587         PowerPC as that is a known limitation of the PowerPC port.
4588
4589 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
4590
4591         * runmdesc.bat:  Move to msvc directory.
4592         
4593 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
4594
4595         * runmdesc.bat:  Run executable that was produced by the current
4596         target and sent via an argument.
4597         
4598 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
4599
4600         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
4601         #81102.
4602
4603         * generics.2.cs: Add regression test.
4604
4605 2007-03-09  Wade berrier  <wberrier@novell.com>
4606
4607         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
4608
4609 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
4610
4611         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
4612         AOT code depends on this.
4613
4614 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
4615
4616         * mini.c: more precise tracking of types in the eval stack
4617         (part of fix for bug #81044).
4618
4619 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
4620
4621         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
4622
4623         * aot-compiler.c (encode_patch): Remove an obsolete comment.
4624
4625 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
4626
4627         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
4628
4629         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
4630
4631 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
4632
4633         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
4634         a pointer on 64 bit systems. Fixes #80190.
4635
4636         * iltests.il: Add new regression test.
4637
4638 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
4639
4640         * mini.c: inline a constant for Environment.IsRunningOnWindows.
4641
4642 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
4643
4644         * trace.c: Remove an erroneous alignemnt check when tracing.
4645           Fixes --trace on OSX86.
4646
4647 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
4648
4649         * mini-$(arch).h: initialize SP in context for all the archs.
4650
4651 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
4652
4653         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
4654         regressions in the thread tests.
4655
4656 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
4657
4658         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
4659         - fixed implementation of LOCALLOC opcode
4660         - implemented non-un compare for floats
4661         - code cleanup
4662         - implementation of FDIV and CKFINITE opcodes
4663         - fixes for latest mono updates
4664         - additional arch opcodes
4665
4666 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
4667
4668         * Makefile.am: simplify and merge rules for cross-compilation.
4669
4670 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
4671
4672         * local-propagation.c: Actually *apply* the fix for bug 80591...
4673
4674 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
4675
4676         * mini-exceptions.c: backuot part of the last change
4677         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
4678
4679 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
4680         * inssel.brg: Fix bug 59286.
4681
4682
4683 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
4684
4685         * mini-exceptions.c: patch from Zoltan to correctly check for
4686         stack boundaries (using the stack register, not the frame register),
4687         fixes bugs #80724, #79717.
4688
4689 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
4690
4691         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
4692         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
4693
4694         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
4695         presence of frame pointer elimination.
4696
4697 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
4698         
4699         * mini-x86.h: NetBSD UCONTEX_REG defines.
4700
4701 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
4702
4703         * inssel-amd64.brg: Fix amd64 build.
4704
4705 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
4706
4707         * mini.h: remove extern to workaround what looks likes gcc bug 26905
4708         on amd64.
4709
4710 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
4711
4712         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
4713         ends.
4714
4715         * mini-<ARCH>.c: Use mono_is_regsize_var ().
4716
4717 2007-01-30 Mark Mason <mason@broadcom.com>
4718
4719            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
4720            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
4721            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
4722            beginning support for CEE_JMP [not quite working yet]
4723            * tramp-mips.c: LMF handling now works
4724         
4725 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
4726
4727         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
4728
4729         * mini.h (NULLIFY_INS): New macro.
4730
4731 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4732
4733         * mini.c: statistical profiler fix for windows, patch
4734         from Tor Lillqvist (tml@novell.com).
4735
4736 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
4737         * local-propagation.c: Fix bug 80591.
4738
4739 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
4740
4741         * Makefile.am: put back the --export-dynamic option as with
4742         the previous gmodule flags (thanks to Robert Jordan).
4743
4744 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
4745
4746         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
4747
4748         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
4749         simplify and speed up the local register allocator. Also rename some fields
4750         like iassign->vassign.
4751         
4752         * regalloc.c: Remove some functions which are no longer used since their
4753         inlined version is in mini-codegen.c.
4754         
4755         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
4756
4757         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
4758
4759 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
4760
4761         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
4762         narrowing. Fixes #80622.
4763
4764         * iltests.il: Add new regresssion test. 
4765
4766 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
4767
4768         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
4769         debug-debugger.c, debug-debugger.h: warning fixes.
4770         * driver.c: updated copyright year and made it fit in one line.
4771
4772 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
4773
4774         * aot-runtime.c: updated to use mono-dl instead of gmodule.
4775
4776 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
4777
4778         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
4779
4780         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
4781
4782         * iltests.il: Add new test for bug #80507.
4783
4784 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
4785
4786         * mini-arm.h: use soft-float also on vfp for now.
4787
4788 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
4789
4790         * mini.c: fix some more soft-float issues.
4791
4792 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
4793
4794         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
4795
4796 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
4797         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
4798         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
4799         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
4800
4801 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
4802
4803         * mini-arm.c: typo fix.
4804
4805 2007-01-23  Neale Ferguson <neale@sinenomine.net>
4806
4807         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
4808
4809 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
4810
4811         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
4812         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
4813
4814         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
4815
4816         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
4817
4818         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
4819         
4820         * inssel.brg: Fix a warning.
4821
4822         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
4823
4824         * abcremoval.c ssa.c ssapre.c: Update after this change.
4825         
4826         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
4827
4828         * dominators.c (df_set): Use mono_bitset_union_fast.    
4829
4830 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
4831
4832         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
4833         mini-codegen.c: reduce relocations and memory usage for the cpu
4834         description.
4835
4836 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
4837
4838         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
4839
4840         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
4841         to reduce their size.
4842
4843 2007-01-19 Mark Mason <mason@broadcom.com>
4844
4845         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
4846         * mini-mips.c: more configuration macros, support long conditional branches, additional
4847         asserts, fix epilog instrumentation.
4848         * mini-mips.h: use standard stack walk
4849         * cpu-mips.md: increase size of div, rem and conditional branches
4850         
4851 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
4852
4853         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
4854         to cpu spec data.
4855
4856 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
4857
4858         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
4859         (compile_method): Ditto.
4860
4861         * aot-runtime.c (decode_klass_info): Ditto.
4862
4863         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
4864         needed by the code generated by inssel.brg. Also fix a warning.
4865
4866 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
4867
4868         * mini.c: deal with enums that become genericinsts by
4869         being nested in a generic class (bug #79956).
4870
4871 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
4872
4873         * mini.c: match the generic definition to check for
4874         private access with generic types (bug #78431).
4875
4876 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
4877
4878         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
4879         to make life easier for people cross-compiling that insist on not
4880         using scratchbox.
4881
4882 2007-01-17 Mark Mason <mason@broadcom.com>
4883
4884         * inssel-long.brg: patch to deal with mips missing flags
4885         * inssel-long32-mips.brg: implement overflow checks
4886         * insset-mips.brg: implement overflow checks
4887         * mini-mips.h: implement conditional exception handling
4888         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
4889           Remove unused code, minor cleanups.
4890         * exceptions-mips.c: minor cleanups
4891         * mini-ops.h: add mips conditional exception ops
4892         * cpu-mips.md: add mips conditional exception ops
4893
4894         
4895 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
4896
4897         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
4898         to deal with mips missing of flags.
4899
4900 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
4901
4902         * exceptions-ppc.c: execute fault handlers.
4903
4904 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
4905
4906         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
4907
4908 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
4909
4910         * mini.c: handle also floating point values in initialize_array.
4911
4912 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
4913
4914         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
4915         array initialization and make it conditional on the intrins option.
4916
4917 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
4918
4919         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
4920         relocations and put the patch info names close to the enum definition.
4921
4922 2007-01-15 Mark Mason <mason@broadcom.com>
4923
4924         * basic.cs, exceptions.cs: break up large tests to increase debugability.
4925
4926 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4927
4928         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
4929
4930 2007-01-12  Raja R Harinath  <rharinath@novell.com>
4931
4932         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
4933
4934 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
4935
4936         * Makefile.am: distribute the mips sources.
4937
4938 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4939
4940         * mini-codegen.h: handle bug #80489 here, by excluding ecx
4941         directly.
4942
4943 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
4944
4945         * cpu-x86.md: back out for now as this triggers other regressions.
4946
4947 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
4948
4949         * cpu-x86.md: force src1 and dest regpair for long shift instructions
4950         to eax:edx, so ecx can't get allocated to them (bug #80489).
4951
4952 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
4953
4954         * mini.c, mini-exceptions.c: enabled running fault handlers
4955         (bug #80469).
4956
4957 2007-01-03  Miguel de Icaza  <miguel@novell.com>
4958
4959         * driver.c: If nothing fail, do not use the string "failed",
4960         because it makes it very annoying to view test result logs on the
4961         web. 
4962
4963 2006-12-30  Miguel de Icaza  <miguel@novell.com>
4964
4965         * debug-debugger.c (mono_debugger_main): Rename "main" to
4966         "main_method" to prevent a warning.
4967
4968         Remove a warning for unused field.
4969
4970 2006-12-28  Martin Baulig  <martin@ximian.com>
4971
4972         * debug-debugger.c
4973         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
4974
4975 2006-12-22  Martin Baulig  <martin@ximian.com>
4976
4977         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
4978         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
4979         seperate `.mdb_debug_info' section, so we can access it from the
4980         debugger even if the binary is stripped.
4981
4982         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
4983         from the `.mdb_debug_info' here to prevent the linker from
4984         removing that section.
4985
4986         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
4987         mdb-debug-info64.s.
4988
4989 2006-12-19  Robert Jordan  <robertj@gmx.net>
4990
4991         * mini-x86: enable the code to return small structures in
4992         registers for FreeBSD as well. Fixes bug #80278.
4993         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
4994
4995 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4996
4997         * mini-x86.c: align the stack when calling the profiler
4998         function instrumenting the prolog (on OSX).
4999
5000 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
5001
5002         * mini.c: emit a break opcode where Debugger.Break () is called.
5003
5004 2006-12-13  Miguel de Icaza  <miguel@novell.com>
5005
5006         * mini.c (mono_method_to_ir): Provide useful information on this
5007         assert, to prevent others from debugging like I did.
5008
5009 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
5010
5011         * mini.c: enable code which was incorrectly commented
5012         (bug #80235).
5013
5014 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
5015
5016         * mini-x86.c: enable on OSX, too, the code to return small
5017         structures in registers.
5018
5019 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
5020
5021         * mini-x86.c: remove the use of the dynamic code manager here, too.
5022
5023 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
5024
5025         * mini.h, debug-debugger.c, tramp-*.c: fixed 
5026         mono_debugger_create_notification_function() to use
5027         mono_global_codeman_reserve () instead of a dynamic code manager.
5028
5029 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
5030
5031         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
5032         ves_array_element_address() jit icall and use a generated
5033         managed method instead (which is about 4 times faster for a rank 3
5034         array access).
5035
5036 2006-11-29  Mark Mason  <mason@broadcom.com>
5037
5038         * basic-calls.cs: additional tests for passing
5039         structures as function arguments.
5040
5041 2006-11-29  Mark Mason  <mason@broadcom.com>
5042
5043         * mini-mips.h: disable custom exception handling
5044         * mini-mips.c: throw/rethrow should use jalr to call
5045         exception stubs.  Fixed bug with passing structures
5046         by value. More support for tracing floating point
5047         functions.
5048
5049 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5050
5051         * mini.c: fixed typo in the soft-float ldind.r4 handling
5052         (bug #80086).
5053
5054 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
5055
5056         * mini.c, mini.h, driver.c: added --runtime command line
5057         option to select a different runtime than the autodetected one.
5058         * jit.h: added API for embedders to initialize with a specific
5059         runtime version.
5060
5061 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
5062
5063         * mini.c: handle also boxing of r4 values (bug #80024).
5064
5065 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
5066
5067         * mini-ppc.c: force indirect calls until we reserve
5068         enough address space for all the generated code.
5069
5070 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
5071
5072         * exceptions-arm.c: workaround bugs in the libc definition
5073         of struct ucontext.
5074
5075 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
5076
5077         * inssel.brg: fixes from me and Mark Mason.
5078
5079 2006-11-23  Dick Porter  <dick@ximian.com>
5080
5081         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
5082         semaphore display now we've fixed the initial value
5083
5084 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
5085
5086         * inssel.brg: partially revert the last change to fix the build.
5087
5088 2006-11-21  Mark Mason  <mason@broadcom.com>
5089
5090         * inssel.brg: Add and use compare-and-branch macros to support
5091         architectures that do not have condition code registers (ie. MIPS).
5092         * *-mips.{c,brg,md}: Fix copyright statements
5093
5094 2006-11-20  Mark Mason  <mason@broadcom.com>
5095
5096         * Makefile.am: remove mini-codegen.c from list of MIPS sources
5097         * mini.c: Allow GET_CONTEXT to be specified by the arch port
5098         * mini.h: Added declaration for mono_print_ins()
5099         * mini-codegen.c: added ins_spec initializer for MIPS
5100         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
5101         vreg to be virtual and hreg to be non-virtual.
5102         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
5103         is not yet working/implemented correctly.
5104         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
5105         non-static, fixup calls to print_ins() from other parts in the file.
5106
5107 2006-11-20  Mark Mason  <mason@broadcom.com>
5108
5109         * basic-calls.cs: added tests for passing structures as arguments
5110         to calls.
5111
5112 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
5113
5114         * inssel-long32.brg: optimize signed division by power of two.
5115
5116 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
5117
5118         * mini-arm.c: added support for interworking with thumb code
5119         (mono must be still be built using the ARM instruction encoding).
5120
5121 2006-11-19  Miguel de Icaza  <miguel@novell.com>
5122
5123         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
5124         verifier has different rules for it.   Fixes a few verifier issues
5125         in the test suite.
5126
5127         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
5128         at the end, so people know what happened.
5129
5130 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
5131
5132         * brach-opts.c: in optimize_exception_target() make sure we
5133         are in a catch clause (fixes bug #79871).
5134
5135 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
5136
5137         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
5138         more soft-float support fixes.
5139
5140 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
5141
5142         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
5143         that are passed half on the stack and half in registers.
5144
5145 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
5146
5147         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
5148         more mips integration work from Mark E Mason 
5149         <mark.e.mason@broadcom.com>.
5150
5151 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
5152
5153         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
5154         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
5155         tramp-mips.c: added sources for the mips port, not
5156         integrated in the build yet. Contributed by
5157         Mark E Mason <mark.e.mason@broadcom.com>.
5158
5159 2006-11-14  Neale Ferguson <neale@sinenomine.net>
5160
5161         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
5162
5163 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
5164
5165         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
5166         put the soft-float rules in its own file since it seems to
5167         break s390 compilation.
5168
5169 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
5170
5171         * mini-arm.c: fixed wrnings.
5172
5173 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
5174
5175         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
5176         inssel-arm.brg: ARM support for soft-float.
5177
5178 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
5179
5180         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
5181         loads and stores of 32 bit fp values.
5182
5183 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
5184
5185         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
5186
5187         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
5188         works. Fixes #79852 and #79463.
5189
5190 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
5191
5192         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
5193         more soft-float support WIP and fixes.
5194
5195 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
5196
5197         * mini-arm.c: some VFP updates.
5198
5199 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
5200
5201         * mini-exceptions.c: 0 is a valid local var offset in some
5202         architectures, don't assert (bug #78508).
5203
5204 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
5205
5206         * exceptions-arm.c: fixed off by one error in stack walk code.
5207
5208 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
5209
5210         * mini.h, mini.c: more precise tracking of type load exceptions.
5211
5212 2006-11-03  Robert Jordan  <robertj@gmx.net>
5213
5214         * Makefile.am: [WIN32] Add monow.exe target.
5215         * driver.c: [WIN32] Don't detach the console when debugging.
5216         Fixes bug #79797.
5217         
5218 2006-10-30  Miguel de Icaza  <miguel@novell.com>
5219
5220         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
5221
5222 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
5223
5224         * aot-compiler.c (emit_method_info): Add a case missed earlier.
5225
5226         * driver.c (mini_regression): Fix --regression with AOT.
5227
5228         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
5229
5230 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
5231
5232         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
5233
5234         * mini-sparc.h: Don't use sigaction on sparc/linux.
5235
5236         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
5237
5238         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
5239
5240         * mini-exceptions.c: Add proper include files for getpid ().
5241
5242 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
5243
5244         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
5245         address instead of a MonoJitInfo* to avoid decoding the exception info for the
5246         method.
5247
5248         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
5249         name cache to reduce its size.
5250
5251         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
5252
5253 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
5254
5255         * mini-x86.c: Save/restore the current LMF structure more efficiently using
5256         the mono_lmf TLS variable.
5257
5258         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
5259         trampoline lmf frames.  
5260
5261         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
5262
5263 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
5264
5265         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
5266         the mono_lmf TLS variable.
5267
5268         * mini-exceptions.c: Access the LMF structure through accessors.
5269
5270         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
5271         variable instead of in jit_tls->lmf.
5272
5273         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
5274         
5275         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
5276         trampoline lmf frames.
5277
5278         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
5279
5280 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
5281
5282        * mini.c trace.c mini-x86.c: Revert these too.
5283         
5284        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
5285        signature change.
5286
5287 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
5288
5289         * genmdesc.c: removed now dead code.
5290
5291 2006-10-09  Robert Jordan <robertj@gmx.net>
5292
5293         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
5294
5295 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
5296
5297         * mini.h: do not leave gaps in the opcode values.
5298
5299 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
5300
5301         * jit-icalls.h: flag functions as internal here, too.
5302
5303 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
5304
5305         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
5306         functions with the internal attribute.
5307
5308 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
5309
5310         * aot-compiler.c: fclose the file descriptor in the profile read loop.
5311
5312 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
5313
5314         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
5315         for soft-float.
5316
5317 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
5318
5319         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
5320         tail calls as on other platforms.
5321
5322         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
5323
5324         * iltests.il: Add a few tailcall tests.
5325
5326 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5327
5328         * driver.c: fix loop for old compilers (bug #79521).
5329
5330 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
5331
5332         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
5333
5334         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
5335
5336         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
5337         metadata without any code.
5338
5339         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
5340         more precise debugging information using gdb.
5341
5342 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
5343
5344         * inssel-ia64.brg: Make the helper methods static.
5345
5346 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
5347
5348         * inssel-x86.brg: make the helper methods static.
5349
5350 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
5351
5352         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
5353
5354 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
5355
5356         * mini.c: updates for monoburg changes.
5357         * inssel.brg: make a few helper functions static as they should.
5358
5359 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
5360
5361         * Makefile.am: Move mini-codegen.c to common_sources.
5362
5363 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5364
5365         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
5366         instructions.
5367         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
5368         mini-ppc.h: port to use the common local register allocator.
5369
5370 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
5371
5372         * mini.h: Remove the comment too then.
5373
5374 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
5375
5376         * mini.h: put back backend.data which is to be used shortly and
5377         doesn't increase the size of MonoInst. If any 64 bit arch aligned
5378         pointers on 4 byte boundaries it'd have much bigger issues running
5379         and you can ifdef it out anyway.
5380
5381 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
5382
5383         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
5384         MonoInst size by 4 bytes on 64 bit machines.
5385
5386 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
5387
5388         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
5389         replacement with more meaningful field names. Arch maintainers, please
5390         check the assigned names are good enough for your arch.
5391
5392 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
5393
5394         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
5395         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
5396
5397 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
5398
5399         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
5400         relocations and memory requirements, put the optimization flags
5401         definitions in their own file.
5402
5403 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
5404
5405         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
5406
5407         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
5408
5409 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
5410
5411         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
5412
5413 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
5414
5415         * inssel.brg: use the correct function to get the size of an item
5416         in an array, given an element class.
5417         * aot-compiler.c: do not access class->class_size directly.
5418
5419 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
5420
5421         * mini.h, debug-mini.c: added a debugging function to print
5422         info about local variables and arguments in a jitted method.
5423
5424 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
5425
5426         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
5427
5428         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
5429
5430 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
5431
5432         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
5433         inner and outer loops when passing vtypes.
5434
5435 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
5436
5437         * mini-ppc.c: take into account the cpu errata for cache flushing
5438         which caused some random errors (bug #79381).
5439
5440 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
5441
5442         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
5443         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
5444
5445 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
5446
5447         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
5448         loaded.
5449
5450         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
5451         freebsd ports tree.
5452
5453         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
5454         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
5455
5456         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
5457         displacement.
5458
5459 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
5460
5461         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
5462
5463 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
5464
5465         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
5466         macro does not have to be changed during debugging.
5467
5468         * 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>.
5469
5470         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
5471
5472         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
5473         
5474         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
5475         MONO_ARCH_NO_EMULATE_MUL is defined.
5476
5477         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
5478
5479         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
5480
5481         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
5482
5483         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
5484         
5485 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
5486
5487         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
5488         stuff to mini-exceptions.c where it is used.
5489
5490         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
5491         setup code, the real one is in mini-exceptions.c.
5492
5493         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
5494         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
5495         some changes from the freebsd ports tree.
5496
5497         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
5498         constants.
5499         
5500         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
5501
5502 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
5503
5504         * mini.c: on Linux, check for /proc to be mounted
5505         (bug# 79351, novell bug#201204).
5506
5507 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
5508
5509         * mini.c: handle cases where pthread_attr_getstack() behaves
5510         incorrectly (bug #78096).
5511
5512 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
5513
5514         * mini-arm.c: support larger stack frames (bug #79272).
5515
5516 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
5517
5518         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
5519
5520         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
5521         tokens.
5522
5523         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
5524         mono_class_from_name () to find a class from its name.
5525
5526         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
5527
5528 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
5529
5530         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
5531
5532 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
5533
5534         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
5535
5536 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
5537
5538         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
5539         callinfo->trampoline.
5540
5541         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
5542         fixes #79271.
5543         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
5544         future.
5545
5546 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
5547
5548         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
5549
5550 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
5551
5552         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
5553         stats.method_trampolines, it is already done by the generic trampoline code.
5554
5555         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
5556         
5557 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
5558
5559         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
5560
5561         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
5562
5563         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
5564
5565         * mini.c (print_jit_stats): Print mscorlib mempool size too.
5566         
5567         * mini.c (print_jit_stats): Print new stats.
5568
5569         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
5570
5571 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
5572
5573         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
5574         Address on two dimensional arrays. Fixes #78729.
5575
5576         * mini.h (MonoCompile): Add a 'skip_visibility' field.
5577
5578         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
5579         a method.
5580
5581         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
5582
5583         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
5584         #79130.
5585         
5586         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
5587         a race condition.
5588         (mini_get_ldelema_ins): Ditto.
5589
5590 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
5591
5592         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
5593         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
5594         Fixes #79213.
5595
5596 2006-08-29 Neale Ferguson <neale@sinenomine.net>
5597
5598         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
5599         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
5600
5601         * exceptions-s390x.c: Cosmetic change.
5602
5603         * tramp-s390.c: Fix warning.
5604
5605         * cpu-s390.md: Correct length of mul_imm.
5606
5607 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
5608
5609         * aot-compiler.c: added binary writer with ELF backend
5610         implementation (only on Linux/x86 for now).
5611
5612 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
5613
5614         * Makefile.am: Don't run net 2.0 AOT tests.
5615
5616         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
5617         (mono_compile_assembly): Skip net 2.0 assemblies as well.
5618
5619         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
5620
5621 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
5622
5623         * aot-compiler.c: simplified and refactored the asm-writing code
5624         to allow different backends.
5625
5626 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
5627
5628         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5629
5630         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
5631         little. Share patches of type TYPE_FROM_HANDLE as well.
5632
5633         * mini.c (mono_patch_info_equal): New helper function.
5634         (mono_patch_info_hash): Ditto.
5635
5636         * aot-compiler.c (emit_method_code): Fix s390 build.
5637
5638         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
5639         is not handled because it is stored as a flag and not as a type ctor. Fixes
5640         #79016.
5641
5642 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
5643
5644         * aot-compiler.c: Fix computation of GOT slot statistics.
5645         
5646         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
5647         Also remove support for not PIC AOT.
5648
5649         * mini.h: Bump AOT file format version.
5650
5651         * objects.cs: Add a test for #78990.
5652
5653         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
5654         (peter.dettman@iinet.net.au). Fixes #79087.
5655
5656         * basic-long.cs: Add a test for the above.
5657
5658 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
5659
5660         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
5661         
5662         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
5663         code somewhat.
5664
5665 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
5666
5667         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
5668         exceptions.
5669
5670 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
5671
5672         * mini.c: Don't verify COM proxy invoke calls
5673         
5674
5675 2006-08-10  Dick Porter  <dick@ximian.com>
5676
5677         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
5678         which process is holding semaphores locked.
5679
5680 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
5681
5682         * mini-ia64.c mini-amd64.c: Fix #79027.
5683
5684         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
5685
5686         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
5687
5688         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
5689         implicit arguments in a vararg call. Fixes #79027.
5690
5691 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
5692
5693         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
5694         (mono_get_array_new_va_signature): Ditto.
5695
5696 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
5697
5698         * aot-runtime.c: Call init_plt lazily.
5699
5700         * inssel-long.brg: Fix unsigned long->int conversion.
5701
5702         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
5703
5704         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
5705         that most data is now in the .rss/.data section.
5706
5707 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
5708
5709         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
5710
5711         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
5712
5713         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
5714
5715         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
5716
5717         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
5718         virtual call. Fixes #79010.
5719
5720         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
5721         and use the result as the this argument in the real call.
5722
5723         * generics.2.cs: Add a new test for #79010.
5724         
5725 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
5726
5727         * mini-x86.c: Fix a warning.
5728
5729         * aot-compiler.c: Add a bunch of statistics.
5730
5731         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
5732
5733 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
5734
5735         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
5736
5737 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
5738
5739         * 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>.
5740
5741 2006-07-13  Miguel de Icaza  <miguel@novell.com>
5742
5743         * mini.c (mono_method_to_ir): Obtain the original method in the
5744         CIL stream and use this to perform validation.
5745
5746         Fixed: #78816
5747
5748 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
5749
5750         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
5751         (mono_arch_call_opcode): Ditto.
5752
5753         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
5754         #78826.
5755
5756         * mini.c (mono_patch_info_dup_mp): New helper function.
5757         
5758         * aot-compiler.c (compile_method): Fix some of the memory allocated during
5759         compilation. Fixes #78827.
5760
5761 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
5762
5763         * declsec.c: Use original security informations for
5764           MONO_WRAPPER_MANAGED_TO_MANAGED.
5765
5766 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
5767
5768         * mini.c: Allow Com Interop methods/classes and
5769         don't verify COM wrapper calls
5770         
5771
5772 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
5773
5774         * inssel-long32.brg: Fix long->i4 checked conversion.
5775
5776         * exceptions.cs: Add a test for the above.
5777
5778 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
5779
5780         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
5781
5782         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
5783         leaks.
5784
5785         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
5786         #78775.
5787
5788 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
5789
5790         * mini.c: Fix solaris/x86 exception handling.
5791
5792         * Makefile.am: Get rid of $(ICU_LIBS).
5793
5794 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
5795
5796         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
5797         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
5798         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
5799
5800         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
5801
5802         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
5803         this function causes a SIGSEGV.
5804
5805 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
5806
5807         * mini.c: Remove unused solaris/x86 includes.
5808
5809 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
5810
5811         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
5812
5813 2006-06-20  Jb Evain  <jbevain@gmail.com>
5814
5815         * cpu-g4.md: fix max length of start_handler instruction.
5816
5817 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
5818         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
5819
5820 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
5821         * ssa.c: Fixed bug 78653 for SSA based deadce.
5822         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
5823         MonoInst.flags, used in SSA based deadce.
5824         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
5825         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
5826
5827 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
5828
5829         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
5830         it can end up using non executable memory on ppc64 systems
5831         running ppc32 userspace (fix from Johannes Berg).
5832
5833 2006-06-14  Dick Porter  <dick@ximian.com>
5834
5835         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
5836         4.1.1
5837
5838 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
5839         * mini.c: Made so that inline is locally disabled if it would
5840         trigger a .cctor, because too many apps depend on this behavior
5841         (which seems to be also the one of the MS CLR).
5842
5843 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
5844
5845         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
5846         No idea why this worked before.
5847
5848         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
5849         which branch to outer exception clauses since they could skip the
5850         inner finally clauses. Fixes #78633.
5851
5852         * exceptions.cs: Add a test for the above.
5853
5854         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
5855         Fixes #78629.
5856
5857         * iltests.il: Add a test for the above.
5858
5859 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
5860
5861         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
5862         after the end of a try bblock, to prevent asserts in mini_method_compile ().
5863
5864         * iltests.il: Add a test for the above.
5865
5866 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
5867
5868         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
5869         
5870         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
5871         methods as instrinsics.
5872
5873 2006-06-09  Wade Berrier <wberrier@novell.com>
5874
5875         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
5876         (simple-cee-ops.h ssapre-mini-ops.h)
5877
5878 2006-06-09  Neale Ferguson <neale@sinenomine.net>
5879
5880         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
5881         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
5882         instruction).
5883         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
5884         * cpu-s390x.md: Fix max. length values for a couple of instructions.
5885
5886 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
5887
5888         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
5889
5890 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
5891
5892         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
5893         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
5894         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
5895         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
5896         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
5897         of opcodes, so that bug 78549 should not happen again.
5898         * ssapre.c: Updated to use the renamed files.
5899
5900 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
5901
5902         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
5903         in OP_ATOMIC_EXCHANGE_I4.
5904
5905 2006-06-07  Wade Berrier <wberrier@novell.com>
5906
5907         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
5908         in mono_debugger_create_notification_function)
5909
5910 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
5911
5912         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
5913         
5914         * mini.c (type_from_stack_type): Disable some changes which do not
5915         seem to work.
5916
5917         * driver.c: Reenable opts.
5918
5919         * mini.h (MonoStackSlot): New structure to keep track of the verification state
5920         of the evaluation stack.
5921         
5922         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
5923         evaluation stack trace at entry to the bblock.
5924
5925         * mini.c (merge_stacks): New function to perform verification of stack merges.
5926         Turned off by default.
5927
5928         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
5929         STACK_MP.
5930         
5931 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
5932
5933         * local-propagation.c: Fixed bug 78549.
5934
5935 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
5936
5937         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
5938
5939 2006-06-02  Miguel de Icaza  <miguel@novell.com>
5940
5941         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
5942         tramp-arm.c, tramp-ia64.c
5943         (mono_debugger_create_notification_function): Update signature to
5944         new signature and use new protocol for creating the notification
5945         function.  
5946
5947         Should fix the build.
5948
5949 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
5950
5951         * exceptions-ppc.c (mono_jit_walk_stack)
5952         (ves_icall_get_frame_info): Fix the build
5953
5954 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
5955
5956         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
5957
5958 2006-05-31  Raja R Harinath  <rharinath@novell.com>
5959
5960         * il2tests.2.il: New file for generics CIL tests.  Add test for
5961         #78019.
5962         * Makefile.am: Update.
5963
5964         Fix #78019
5965         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
5966         to nullable types.
5967
5968 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
5969
5970         * aliasing.c: Fixed bug 78311.
5971
5972 2006-05-29  Martin Baulig  <martin@ximian.com>
5973
5974         * mini-exceptions.c (mono_find_jit_info): When computing the
5975         native offset, check whether we're actually inside the method's
5976         code; call mono_debug_print_stack_frame() to format the frame.
5977         (ves_icall_System_Exception_get_trace): Call
5978         mono_debug_print_stack_frame() to format the stack frame.
5979         (ves_icall_get_trace): Update to the new debugging API.
5980         (mono_jit_walk_stack_from_ctx): Likewise.
5981         (ves_icall_get_frame_info): Likewise.
5982
5983         * mini.c (get_method_from_ip): Use the new debugging API.
5984         (mono_print_method_from_ip): Likewise.
5985
5986         * exceptions-ppc.c
5987         (mono_jit_walk_stack): Use the new debugging API.
5988         (ves_icall_get_frame_info): Likewise.   
5989
5990 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
5991
5992         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
5993
5994 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
5995
5996         * mini.c: Added "limitator" to inline for debugging.
5997
5998 2006-05-24  Martin Baulig  <martin@ximian.com>
5999
6000         * debug-debugger.c (mono_debugger_init): Create a private,
6001         malloc()-based code manager for the notification function and
6002         intentionally leak it on exit.  This fixes the crash-on-exit race
6003         condition.
6004
6005         * tramp-amd64.c
6006         (mono_debugger_create_notification_function): Added
6007         `MonoCodeManager *' argument.
6008
6009         * tramp-x86.c
6010         (mono_debugger_create_notification_function): Added
6011         `MonoCodeManager *' argument.
6012
6013 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
6014
6015         * aliasing.c: Fixed 64 bit issue.
6016         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
6017         default since all known bugs are fixed (one more time!).
6018
6019 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6020
6021         * mini.c: write barrier support.
6022
6023 2006-05-23  Martin Baulig  <martin@ximian.com>
6024
6025         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
6026         check at the top of the file.
6027
6028 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
6029
6030         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
6031         reverting changes without reason and without changelog entries.
6032
6033 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
6034
6035         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
6036         to a few opcodes. Fixes #78439.
6037
6038         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
6039         consistency with other archs.
6040
6041         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
6042
6043 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
6044
6045         * debug-debugger.c: fix the build.
6046
6047 2006-05-17  Martin Baulig  <martin@ximian.com>
6048
6049         * debug-debugger.c
6050         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
6051         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
6052         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
6053         (debugger_attach): Call GC_mono_debugger_add_all_threads().
6054
6055 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
6056
6057         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
6058
6059 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
6060
6061         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
6062         MONO_TYPE_GENERICINST.
6063         
6064         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
6065         MONO_TYPE_GENERICINST.
6066
6067 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
6068
6069         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
6070         #78325.
6071
6072 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
6073
6074         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
6075         mempool.
6076         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
6077
6078 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
6079
6080         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
6081         mono_trace_cleanup ().
6082
6083         * iltests.il: Fix problem with the newly added test.
6084
6085         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
6086         due to register constraints, free up the previous hreg. Fixes #78314.
6087
6088         * iltests.il: Add new test for #78314.  
6089
6090         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
6091         Interlocked.Add. Fixes #78312.
6092
6093         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
6094         
6095 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
6096
6097         * inssel.brg (mini_emit_virtual_call): Fix a warning.
6098
6099 2006-05-05  Martin Baulig  <martin@ximian.com>
6100
6101         * debug-mini.c (mono_debug_open_block): New method.
6102
6103         * mini-amd64.c
6104         (mono_arch_output_basic_block): Call mono_debug_open_block() at
6105         the beginning of each basic block.
6106
6107         * mini-x86.c
6108         (mono_arch_output_basic_block): Call mono_debug_open_block() at
6109         the beginning of each basic block.
6110
6111 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
6112
6113         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
6114         default until I understand why they break the build on amd64.
6115
6116 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
6117
6118         * mini.c (mini_cleanup): Call mono_cleanup ().
6119
6120         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
6121         errors.
6122
6123 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
6124
6125         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
6126         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
6127         default since all known bugs are fixed, and I cannot reproduce bug
6128         77944... I'm asking Matt Hargett to test again after this commit.
6129
6130 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
6131
6132         * mini-codegen.c: Fixed typo that thrashed inline.
6133
6134 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
6135
6136         * dominators.c (compute_dominators): Avoid using a worklist since
6137         it is not correct in some cases. Instead, iterate over all bblocks as
6138         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
6139
6140 2006-04-28  Miguel de Icaza  <miguel@novell.com>
6141
6142         * mini.c (mono_jit_compile_method_inner): Use
6143         mono_prepare_exception_from_error that resets the value
6144         internally.
6145
6146 2006-04-27  Miguel de Icaza  <miguel@novell.com>
6147
6148         * mini.c: Move the mini_loader_error_to_exception to metadata. 
6149         
6150 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
6151
6152         * aliasing.c: Fixed bug 78210.
6153
6154 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
6155
6156         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
6157         default until all their problems (or the ones they trigger) are fixed.
6158
6159 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
6160
6161         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
6162         
6163         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
6164         as loaded only after resolving patches since that could invoke the same method.
6165
6166         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
6167
6168         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
6169         functions.
6170
6171         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
6172         AOT loader.
6173
6174         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
6175         stack.
6176
6177         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
6178         made from AOT code through the PLT table.
6179
6180         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
6181         holding the plt offset when a call is made to the aot plt trampoline.
6182         
6183 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
6184
6185         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
6186         amd64 AOT support.
6187
6188         * Makefile.am (common_sources): Fix build breakage.
6189
6190         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
6191         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
6192         intra-assembly calls if possible.
6193         
6194         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
6195
6196         * mini-trampolines.c: Handle PLT entries.
6197
6198         * mini.c: Avoid creating a GOT var for calls.
6199
6200         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
6201         from mscorlib code.
6202
6203         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
6204         from mscorlib code.
6205
6206         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
6207         AOT code.       
6208
6209         * mini.h: Bump AOT file format version.
6210         
6211         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
6212         covers more cases.
6213
6214 2006-04-25  Martin Baulig  <martin@ximian.com>
6215
6216         * driver.c: Disable copyprop, consprop and inline when running
6217         inside the debugger.
6218
6219 2006-04-25  Martin Baulig  <martin@ximian.com>
6220
6221         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
6222         with `get_current_thread' and added `detach'.
6223         (MonoDebuggerMetadataInfo): Added `thread_size',
6224         `thread_tid_offset', `thread_stack_ptr_offset' and
6225         `thread_end_stack_offset'.
6226
6227 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
6228
6229         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
6230         aot-runtime.c.
6231
6232         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
6233         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
6234
6235         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
6236
6237         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
6238
6239         * aot.c: Add support for ADJUSTED_IID.  
6240
6241 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
6242
6243         * aot.c (emit_method_order): Don't align method_order_end.
6244
6245         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
6246         the interface ID changes.
6247
6248 2006-04-21  Dick Porter  <dick@ximian.com>
6249
6250         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
6251         cleaning up a thread.  Fixes the new part of bug 77470.
6252
6253 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
6254
6255         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
6256         to managed wrapper.
6257                      
6258 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
6259
6260         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
6261         
6262         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
6263         SIGSEGV. Fixes #78072.
6264
6265         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
6266         unregister our SIGABRT handler.
6267
6268 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
6269
6270         * mini.c: Disabled inline where it can alter the call stack in a
6271         way visible from managed code.
6272         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
6273         default.
6274
6275 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
6276
6277         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
6278         on other platforms. Fixes #78089.
6279
6280 2006-04-13  Martin Baulig  <martin@ximian.com>
6281
6282         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
6283         determine whether we're inside the debugger.
6284
6285         * debug-debugger.h
6286         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
6287
6288 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
6289
6290         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
6291         handler clauses. Fixes #78024.
6292
6293         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
6294         in the CALL_MEMBASE opcodes. Fixes #78088.
6295         (mono_arch_get_vcall_slot_addr): Ditto.
6296
6297 2006-04-10  Martin Baulig  <martin@ximian.com>
6298
6299         * debug-debugger.c: The thread handling code has now been moved
6300         into ../metadata/threads.c.
6301
6302 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
6303
6304         * driver.c (mono_main): Fix --with-gc=none build.
6305
6306         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
6307         (mono_spillvar_offset_float): Ditto.
6308         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
6309         hreg, not when its !global, since on ia64, there is a third category: stacked
6310         registers.      
6311
6312 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
6313
6314         * mini.c: set MonoInst->klass for load field address and a few other
6315         places.
6316
6317 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
6318
6319         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
6320
6321 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
6322
6323         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
6324         the branch opt changes.
6325
6326 2006-04-06  Dick Porter  <dick@ximian.com>
6327
6328         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
6329         
6330         * wapihandles.c (mini_wapi_seminfo): 
6331         * driver.c (mono_main): Add semaphore info option
6332
6333 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
6334
6335         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
6336         branch optimization changes. Fixes #78009.
6337
6338 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
6339
6340         * mini.c: ignore accessibility of methods in managed->native wrappers.
6341
6342 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
6343
6344         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
6345         
6346         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
6347
6348 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
6349
6350         * mini.c: Modify the branch optimizations to preserve the invariant that
6351         the entries inside the in_bb and out_bb arrays are unique.
6352         (mono_unlink_bblock): Avoid creation of new arrays.
6353
6354 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
6355
6356         * mini.c (mono_unlink_bblock): Fix regression caused by previous
6357         change (#77992).
6358
6359 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
6360
6361         * mini.c (optimize_branches): Remove the "optimizations" in
6362         the cbranch1/cbranch2 -> branch cases which were causing several
6363         problems in the past. Fixes #77986.
6364
6365 2006-03-31  Chris Toshok  <toshok@ximian.com>
6366
6367         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
6368         default optimizations :(
6369
6370 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
6371
6372         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
6373         branch.
6374
6375 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
6376
6377         * local-propagation.c: Added comments to structs and removed
6378         "Mono" prefixes from local tree mover types.
6379
6380 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
6381
6382         * Makefile.am (arch_sources): Define this for each architecture so 
6383         libmono_la_SOURCES is defined in one place.
6384
6385 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
6386
6387         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
6388         from handles/.
6389
6390 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
6391
6392         * driver.c: print the GC name supplied by configure.
6393
6394 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
6395
6396         * local-propagation.c: Added tree mover, and moved here all the
6397         local propagation code from mini.c
6398         * mini.c: Added support for treeprop, and moved all the local
6399         propagation code to local-propagation.c
6400         * mini.h: Added support for treeprop
6401         * driver.c: Added support for treeprop, enabled consprop, copyprop,
6402         treeprop, inline and deadce by default
6403         * Makefile.am: Added local-propagation.c
6404
6405 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
6406
6407         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
6408
6409 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
6410
6411         * debug-debugger.c: make it compile without the Boehm GC.
6412
6413 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6414
6415         * mini.c: fixed issue with mismatch when an icall is registered
6416         with multiple names but same address.
6417
6418 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
6419
6420         * declsec.c, mini-exceptions.c: use write barrier to set reference
6421         fields of managed objects.
6422
6423 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
6424
6425         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
6426         (can_access_internals): Fix a warning.
6427
6428         * mini.c (print_method_from_ip): Rename this to 
6429         mono_print_method_from_ip so it gets exported.
6430
6431         * trace.c: Deal with strings inside StringBuilder's containing garbage
6432         and fix memory leaks. Fixes #77848.
6433
6434 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
6435
6436         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
6437         fixes #77787.
6438
6439 2006-03-16 Neale Ferguson <neale@sinenomine.net>
6440         
6441         * mini-s390.c: Remove OP_X86_TEST_NULL.
6442
6443 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
6444
6445         * mini.c: use the correct GetHashCode() for the moving collector.
6446
6447 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
6448
6449         * liveness.c: Regalloc spill cost tuning.
6450
6451 2006-03-15 Neale Ferguson <neale@sinenomine.net>
6452         
6453         * mini-s390x.h: Correct S390_LONG macro.
6454
6455         * mini-s390x.c: Cleanup unused code.
6456
6457 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
6458
6459         * jit-icalls.h: New file.
6460
6461         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
6462         icalls and include that instead of including jit-icalls.c.
6463
6464         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
6465         OP_X86 opcodes.
6466
6467 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
6468
6469         * mini.c: when checking for member accessibility, also check for
6470         friend assemblies and for explicit interface implementations.
6471
6472 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
6473
6474         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
6475
6476         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
6477
6478         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
6479         common cases are done first.    
6480
6481         * mini-ops.h: Only define platform specific opcodes on the given platform.
6482
6483         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
6484         branch.
6485         
6486 2006-03-14  Martin Baulig  <martin@ximian.com>
6487
6488         Revert Paolo's change from r57348:
6489
6490         * mini.h: don't use gboolean for bitfields.
6491         * mini.c: verifier changes for fields and methods accessibility.
6492
6493 2006-03-13  Neale Ferguson <neale@sinenomine.net>
6494
6495         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
6496
6497         * mini-s390x.c: Fix conv_r_un.
6498
6499         * cpu-s390, cpu-s390x.md: Fix lengths.
6500
6501 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
6502
6503         * mini.c: nested types have access to all the nesting
6504         levels, not just the enclosing types.
6505
6506 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6507
6508         * mini.c: added a few more verification checks.
6509
6510 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
6511
6512         * liveness.c: Merge optimizations from the linear-il branch.
6513
6514 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
6515
6516         * mini-ia64.c (emit_call): Add a comment.
6517
6518         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
6519
6520         * tramp-ia64.c: Fix some warnings.
6521
6522 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
6523
6524         * mini.h: don't use gboolean for bitfields.
6525         * mini.c: verifier changes for fields and methods accessibility.
6526
6527 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
6528
6529         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
6530         lazy icall wrapper changes.
6531
6532         * dominators.c: Replace all the dominator algorithms with faster
6533         ones from the linear-il branch.
6534
6535         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
6536         the mempool.
6537
6538         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
6539         common cases are done first.
6540
6541         * mini-amd64.c: Fix some warnings.
6542
6543         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
6544         from the mempool.
6545
6546         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
6547         added code.
6548
6549         * mini.h: Add a missing prototype.
6550
6551 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
6552
6553         * mini.c: Compile icall wrappers lazily.
6554
6555         * mini-codegen.c: Use printf instead of g_print since its much faster.
6556
6557         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
6558         function.
6559
6560         * mini.c (optimize_branches): Cache the negative result from 
6561         remove_block_if_useless ().
6562
6563         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
6564         Also fix some bblock linking issues.
6565
6566         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
6567         assembly files.
6568
6569         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
6570
6571         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
6572         accessed fields first, for better cache behavior.
6573         
6574 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6575
6576         * mini.c: speedup IList<T> array accesses.
6577
6578 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
6579
6580         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
6581         inline_costs counter. Fixes #77190.
6582
6583 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
6584
6585         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
6586         trace messages. Fixes #77706.
6587
6588 2006-03-04  Martin Baulig  <martin@ximian.com>
6589
6590         * tramp-amd64.c, tramp-x86.c
6591         (mono_debugger_create_notification_function): Use
6592         mono_global_codeman_reserve() to allocate a buffer at runtime and
6593         return it.
6594
6595         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
6596
6597         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
6598         notification function at runtime and then call `initialize' in the
6599         `MONO_DEBUGGER__debugger_info' vtable.
6600
6601 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
6602
6603         * iltests.il: Fix a visibility problem.
6604
6605 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
6606
6607         * driver.c, mini.c: add hooks for the counters API.
6608
6609 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
6610
6611         * driver.c: show disabled options.
6612
6613 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6614
6615         * linear-scan.c: always use cost-driven selection.
6616
6617 2006-02-28  Raja R Harinath  <rharinath@novell.com>
6618
6619         * jit-icalls.c (helper_compile_generic_method): Revert change from
6620         2006-02-24.
6621
6622 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
6623
6624         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
6625
6626 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
6627
6628         * inssel.brg: style fixes, mostly to force the updated monoburg
6629         to run for people using svn.
6630
6631 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
6632
6633         * mini.c: match monoburg changes.
6634
6635 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6636
6637         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
6638         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
6639         declaration in the header file.
6640
6641 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
6642
6643         * helpers.c: reduce relocations and mem usage.
6644
6645 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
6646
6647         * mini.h, mini-codegen.c: disable logging features if
6648         requested by configure.
6649
6650 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
6651
6652         * mini.c: tiny verifier changes.
6653
6654 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
6655
6656         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
6657         cpu-pentium.md: stack alignment changes for osx/x86,
6658         partially from Geoff Norton <gnorton@customerdna.com>.
6659
6660 2006-02-24  Raja R Harinath  <harinath@gmail.com>
6661
6662         * jit-icalls.c (helper_compile_generic_method): Update to changes
6663         in metadata/class.c.
6664
6665 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
6666         
6667         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
6668         
6669         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
6670         interface calls with large offsets.
6671
6672 2006-02-23  Raja R Harinath  <rharinath@novell.com>
6673
6674         * jit-icalls.c (helper_compile_generic_method): Document the
6675         special-case we depend on so that we can inflate the method twice
6676         with the same context with no bad side-effects.
6677
6678 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
6679
6680         * mini-x86.c, mini-amd64.c: fix for case when xen support
6681         is disabled.
6682
6683 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
6684
6685         * mini-x86.c, mini-amd64.c: generate code to access tls items
6686         in a faster way for Xen systems.
6687
6688 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
6689
6690         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
6691         updates and compilation fixes for the OSX/x86 port, mostly from
6692         Geoff Norton <gnorton@customerdna.com>.
6693
6694 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6695
6696         * inssel.brg: faster interface call implementation
6697         to sync with the interface_offsets MonoVTable changes.
6698
6699 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
6700
6701         * mini.c: more verification checks.
6702
6703 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
6704
6705         * mini.c: added a few more verification checks.
6706
6707 2006-02-17      Neale Ferguson <neale@sinenomine.net>
6708
6709         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
6710         facility on the processor and use it if available.
6711
6712 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
6713
6714         * driver.c, aot.c, mini.c: throw exception if the IL code is
6715         invalid or unverifiable.
6716
6717 2006-02-17  Raja R Harinath  <rharinath@novell.com>
6718
6719         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
6720         m.StructField.
6721
6722 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
6723
6724         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
6725
6726 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6727
6728         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
6729         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
6730         handling of instantiated generic valuetypes.
6731
6732 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
6733
6734         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
6735         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
6736         instead.
6737
6738         * generics.2.cs: Revert the nullable reftypes tests.
6739
6740 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
6741
6742         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
6743         using __builtin_frame_address (1) as it doesn't work in the presence
6744         of optimizations. Hopefully fixes #77273.
6745
6746         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
6747         -> generics.cs change as it doesn't work with some automake versions.
6748
6749 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6750
6751         * mini.c: handle systems that sue a different way to
6752         retrieve the stack address of the current thread.
6753
6754 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
6755
6756         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
6757         it specially in the makefile.
6758
6759         * generics.2.cs: Add tests for nullable reference types.
6760
6761 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6762
6763         * mini.c: always handle the case when mono_jit_init()
6764         is called in a thread different from the main thread,
6765         confusing libgc (bug #77309).
6766
6767 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
6768
6769         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
6770
6771 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6772
6773         * mini.c: change optimize_branches () to use a single loop
6774         and introduce a new optimization to simplify some range checks.
6775
6776 2006-02-03  Martin Baulig  <martin@ximian.com>
6777
6778         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
6779         and merged with debugger_thread_manager_add_thread().
6780         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
6781         inform the debugger about the main thread.
6782
6783 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
6784
6785         * basic.cs: Add test for div.un/rem.un constant folding.
6786
6787 2006-02-03  Neale Ferguson <neale@sinenomine.net>
6788
6789         * cpu-s390x.md: correct int_xor_imm length
6790
6791 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
6792
6793         * generics.2.cs: New test for #77442.
6794
6795         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
6796         #77442.
6797
6798 2006-02-02  Martin Baulig  <martin@ximian.com>
6799
6800         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
6801         <mono/metadata/mono-debug-debugger.h>   
6802
6803         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
6804
6805 2006-02-02  Martin Baulig  <martin@ximian.com>
6806
6807         * debug-debugger.h: New header file for debug-debugger.c.
6808
6809         * debug-debugger.c: Big API cleanup; don't run the managed Main()
6810         function is a separate thread anymore; add support for attaching.
6811
6812 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
6813
6814         * tramp-x86.c: Fix a warning.
6815
6816 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
6817
6818         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
6819         on very large methods.
6820
6821         * aot.c (load_patch_info): Fix a warning.
6822
6823 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
6824
6825         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
6826         mini-ops.h: alu membase optimizations.
6827
6828 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
6829
6830         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
6831         to speedup StringBuilder.
6832
6833 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
6834
6835         * dominators.c (mono_compute_natural_loops): Fix detection of
6836         loop body start blocks.
6837
6838         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
6839
6840 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
6841
6842         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
6843         #75145.
6844
6845 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
6846
6847         * aliasing.c: Fixed aliasing issue on 64 bit archs.
6848
6849 2006-01-25  Martin Baulig  <martin@ximian.com>
6850
6851         * debug-debugger.c: Moved the `MonoDebuggerManager' and
6852         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
6853         started to cleanup this file a little bit.
6854
6855 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
6856
6857         * mini.c: optimize a codepath frequently happening in generics code.
6858
6859 2006-01-23  Martin Baulig  <martin@ximian.com>
6860
6861         * Makefile.am: Only compile debug-debugger.c on supported platforms.
6862
6863         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
6864         functions directly.
6865
6866         * driver.c: debug-debugger.c is only available if
6867         `MONO_DEBUGGER_SUPPORTED' is defined.   
6868
6869 2006-01-23  Martin Baulig  <martin@ximian.com>
6870
6871         * debug-debugger.c: Only enable this on platforms where the Mono
6872         Debugger is working (x86 and x86_64).
6873
6874 2006-01-21  Martin Baulig  <martin@ximian.com>
6875
6876         The Mono Debugger is now using the normal `mono' instead of the
6877         `mono-debugger-mini-wrapper' when executing managed code.
6878
6879         * debug-debugger.c: New file; previously known as
6880         debugger/wrapper/wrapper.c.
6881
6882         * debug-mini.c (mono_init_debugger): Removed.
6883
6884         * driver.c (mono_main): Added new `--inside-mdb' command line
6885         argument which is used when running inside the debugger.
6886
6887 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
6888
6889         * liveness.c (mono_analyze_liveness): Remove some unused data
6890         structures.
6891
6892 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
6893
6894         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
6895
6896 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
6897
6898         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
6899         depends on implementation details of monobitset.
6900
6901         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
6902         Fixes #77271.
6903
6904 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
6905
6906         * liveness.c: Update after monobitset changes.
6907
6908 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
6909
6910         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
6911
6912 2006-01-11 Neale Ferguson <neale@sinenomine.net>
6913
6914         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
6915
6916         * mini-s390x.c: Remove warning messages.
6917
6918 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
6919
6920         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
6921
6922 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
6923
6924         * generics.2.cs: Add ldelem/stelem_any test.
6925
6926 2006-01-10 Neale Ferguson <neale@sinenomine.net>
6927
6928         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
6929
6930 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
6931
6932         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
6933         
6934 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
6935
6936         * generics.2.cs: Reenable vtype tests.
6937
6938         * inssel-x86.brg: Remove an icorrect valuetype rule.
6939
6940 2006-01-06 Neale Ferguson <neale@sinenomine.net>
6941
6942         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
6943         initial support for OP_ABS.
6944
6945 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6946
6947         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
6948
6949 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6950
6951         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
6952         conversion and implement LADD/LSUB.
6953
6954         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
6955         architectures.
6956
6957 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6958
6959         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
6960
6961         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
6962         architectures.
6963
6964 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6965
6966         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
6967         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
6968         (stack walk problem).
6969
6970 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
6971
6972         * aot.c (mono_aot_load_method): Fix a warning.
6973
6974 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6975
6976         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
6977
6978 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6979
6980         * iltests.il: Add test for #77148.
6981
6982         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
6983         #77148.
6984
6985 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6986
6987         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
6988
6989 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6990
6991         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
6992         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
6993
6994         * basic-long.cs: Add lconv-to-r4/r8 tests.
6995
6996 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6997
6998         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
6999
7000         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
7001         here as on other archs.
7002
7003 2005-12-29 Neale Ferguson <neale@sinenomine.net>
7004
7005         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
7006
7007 2005-12-29 Neale Ferguson <neale@sinenomine.net>
7008
7009         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
7010         
7011         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
7012
7013         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
7014         instrument_prolog; Add memory_barrier instruction.
7015
7016 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
7017
7018         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
7019
7020 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
7021
7022         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
7023
7024         * aliasing.c inssel.brg: Fix warnings.
7025
7026         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
7027         could skip initialization of some parts of memory.
7028
7029         * mini.c mini-ia64.c: Fix warnings.
7030
7031         * inssel-sparc.brg: Add an implementation of lneg which actually works.
7032
7033 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
7034
7035         * aliasing.c (mono_build_aliasing_information): Add a workaround for
7036         a crash seen on sparc.
7037
7038         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
7039         
7040         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
7041
7042 2005-12-21 Neale Ferguson <neale@sinenomine.net>
7043
7044         * mini-ops.h: Add s390_backchain instruction
7045
7046         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
7047
7048         * cpu-s390.md: Add s390_backchain instruction
7049
7050         * mini-s390.c: Significant ABI changes
7051
7052         * mini-s390.h: Cater for zero length structures
7053
7054 2005-12-20 Neale Ferguson <neale@sinenomine.net>
7055
7056         * mini-s390.c: ABI fixes
7057
7058         * inssel-s390.brg: Remove debug statements
7059
7060         * cpu-s390.md: Fix length of ATOMIC_xx operations
7061
7062 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
7063
7064         * basic-float.cs: Add float<->long conversion tests.
7065
7066 2005-12-16 Neale Ferguson <neale@sinenomine.net>
7067
7068         * mini-s390.c: Fix LOCALLOC processing.
7069
7070         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
7071
7072 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
7073
7074         * iltests.il: Add tests for some opcodes not covered by the other
7075         tests.
7076
7077 2005-12-15 Neale Ferguson <neale@sinenomine.net>
7078
7079         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
7080         register loading for Tail processing; Correct trace output.
7081
7082         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
7083
7084         * cpu-s390.md: Correct size of jmp instruction. 
7085
7086 2005-12-13 Neale Ferguson <neale@sinenomine.net>
7087
7088         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
7089
7090 2005-12-13 Neale Ferguson <neale@sinenomine.net>
7091
7092         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
7093           Bring s390 up to current level.
7094
7095 2005-12-12  Zltan Varga  <vargaz@gmail.com>
7096
7097         * generics.2.cs: Disable the newly added tests as they do not work yet.
7098         
7099         * generics.2.cs: Add valuetype tests.
7100
7101 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
7102
7103         * basic-long.cs: Add i4->u8 test.
7104
7105         * objects.cs: Add tests for JIT intrinsic.
7106
7107         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
7108         optimizations lost by a mistake.
7109
7110 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
7111
7112         * basic-long.cs: Remove a test moved to objects.cs.
7113
7114         * arrays.cs: Add more array tests.
7115
7116 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
7117
7118         * arrays.cs: Add new tests for multi-dimensional arrays.
7119
7120 2005-12-06  Raja R Harinath  <rharinath@novell.com>
7121
7122         * Makefile.am (test_sources2): Add generics.2.cs.
7123         (EXTRA_DIST): Add test_sources2.
7124
7125 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
7126
7127         Support for boxing and unboxing nullable types as well as the
7128         isinst operation on nullables, per the CLI ammendment.
7129
7130         * inssel.brg (CEE_ISINST): Special case for nullable
7131
7132         * mini.c (handle_unbox_nullable): new method
7133         (handle_box): Special case for nullable types
7134         (mono_method_to_ir): Call handle_unbox_nullable in correct
7135         places.
7136
7137         * generics.2.cs: New test suite
7138
7139         * Makefile.am: Support for regression tests with generics.
7140
7141 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
7142
7143         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
7144         allocated to registers. Fixes #76800.
7145
7146 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
7147
7148         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
7149
7150 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
7151
7152         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
7153         of platforms.
7154
7155 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
7156
7157         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
7158         objects.cs.
7159
7160         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
7161         
7162         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
7163 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
7164
7165         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
7166         single precision before storing to a single precision location.
7167
7168 2005-11-28  Raja R Harinath  <rharinath@novell.com>
7169
7170         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
7171
7172 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
7173
7174         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
7175         correct files.
7176
7177         * basic.cs: Remove test_0_byte_compares test which was moved to
7178         objects.cs a long time ago.
7179
7180 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
7181
7182         * aliasing.c: Fixed aliasing issue on 64 bit archs.
7183
7184 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
7185
7186         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
7187         handlers are called.
7188
7189         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
7190         throwing code.
7191
7192          * mini-ia64.c: Add support for the throw->branch exception 
7193         optimization.   
7194
7195         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
7196
7197 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
7198
7199         * mini.c: Enabled "fastpath" deadce :-)
7200         
7201 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
7202
7203         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
7204         alias analysis pass to support it.
7205         * mini.h: Likewise.
7206         * ssa.c: Likewise.
7207         * liveness.c: Likewise (liveness computation can use aliasing
7208         information to be more accurate).
7209         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
7210         moreover made so that "--compile-all" uses the given optimization
7211         flags and not the default ones.
7212         * aliasing.c: Alias analysis (new file).
7213         * aliasing.h: Likewise.
7214         * Makefile.am: added "aliasing.c" and "aliasing.h".
7215         
7216 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
7217
7218         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
7219         OP_L opcodes.
7220
7221 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
7222
7223         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
7224         fp >= end_of_stack exit condition, as it is not needed, and it might
7225         become true for fp eliminated frames.
7226
7227 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
7228
7229         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
7230         coded offsets.
7231
7232 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
7233
7234         * mini-arm.c: fixed alignment of doubles/longs to match
7235         the C ABI (bug #76635).
7236
7237 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
7238
7239         * aot.c: fix compilation with --enable-minimal=aot.
7240
7241 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
7242
7243         * mini-arm.c: fixed compatibility with the new
7244         floating point emulator package for compares.
7245
7246 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
7247
7248         * mini.c : reverted sig->pinvoke changes (r51396-51397).
7249
7250 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
7251
7252         * mini-exceptions.c (print_stack_frame): Output to stderr.
7253         (mono_handle_native_sigsegv): Ditto.
7254
7255 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
7256
7257         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
7258         OP_LCONV_TO_OVF_I implementation.
7259
7260         * mini-amd64.c: Add support for the throw->branch exception 
7261         optimization.
7262
7263         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
7264         when the catch clause catches a more general exception, i.e. Object.
7265
7266 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
7267
7268         * cpu-ia64.md: Remove unused opcodes.
7269
7270         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
7271         specific defines for architectures defining USE_SIGACTION.
7272
7273         * mini-ia64.c: Fix some warnings.
7274
7275         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
7276         version seemed to skip a frame.
7277
7278 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
7279
7280         * mini.c: Clean up the usage of sig->pinvoke flag. Now
7281         only calls which are made to native code use this flag.
7282
7283 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
7284
7285         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
7286         varargs methods as well.
7287         
7288         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
7289         which have save_lmf set. Reorganize methods prologs a bit.
7290
7291         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
7292         debugger to the proper place.
7293
7294 2005-10-29  Martin Baulig  <martin@ximian.com>
7295
7296         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
7297         when running inside the debugger until the debugger has support
7298         for it.
7299
7300 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
7301
7302         * mini.h: Fix a warning.
7303
7304 2005-10-24  Miguel de Icaza  <miguel@novell.com>
7305
7306         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
7307         we expose publicly, this returns the string.
7308
7309 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
7310
7311         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
7312         with fp elimination.
7313
7314 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
7315
7316         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
7317         native stacktrace using the glibc 'backtrace' function if available.
7318
7319 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
7320
7321         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
7322
7323         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
7324         handle SIGSEGVs received while in native code.
7325
7326         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
7327         code, call mono_handle_native_sigsegv which will abort the runtime
7328         after printing some diagnostics, instead of converting it into a
7329         confusing NullReferenceException.
7330
7331 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
7332
7333         * cpu-pentium.md: Remove unused opcodes.
7334
7335 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
7336
7337         * mini-amd64.h (MonoLMF): Add rsp field.
7338
7339         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
7340         the lmf too.
7341
7342 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
7343
7344         * mini-codegen.c (get_register_spilling): Fix some warnings.
7345
7346 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
7347
7348         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
7349         elimination during exception handling. Enable fp elimination by
7350         default.
7351
7352         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
7353         elimination.
7354
7355 2005-10-16  Martin Baulig  <martin@ximian.com>
7356
7357         * mini-exceptions.c
7358         (mono_debugger_run_finally): New public method for the debugger.
7359
7360 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
7361
7362         * debug-mini.c (mono_debug_init_method): Fix warning.
7363
7364         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
7365         the 'exname' parameter const to fix some warnings.
7366
7367 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
7368
7369         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
7370         introduced by the previous patch.
7371
7372 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
7373
7374         * basic-float.cs: Add test for precision of float arithmetic.
7375
7376         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
7377         when loading/storing single values from/to memory.
7378
7379         * mini.c (mono_jit_compile_method_with_opt): Create the function
7380         pointers in the correct domain.
7381
7382 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
7383
7384         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
7385         introduced by previous patch.
7386         
7387         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
7388         when out_filter_idx is NULL.
7389
7390         * mini-exceptions.c: Don't run filter clauses twice during exception
7391         handling. Fixes #75755.
7392
7393 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
7394
7395         * aot.c: Add support for ldflda wrappers.
7396
7397         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
7398         #75902.
7399
7400 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
7401
7402         * mini.c, mini.h: do not consider exception handlers blocks when
7403         setting up interface variables.
7404
7405 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
7406
7407         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
7408
7409 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
7410
7411         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
7412         causes a regression.
7413
7414         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
7415
7416 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
7417
7418         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
7419         of the OP_P definitions.
7420
7421         * TODO: Add a proposal for dealing with the CEE/OP mess.
7422
7423         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
7424         optimizations from the x86 port.
7425
7426         * cpu-amd64.md: Ditto.
7427
7428         * basic.cs basic-long.cs: Add tests.
7429
7430 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
7431
7432         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
7433         Patrik Torstensson's implementation of my exception-handling
7434         optimization idea, when the exception object is not used
7435         (bug #62150).
7436
7437 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
7438
7439         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
7440         of the mul_imm optimizations from the old jit.
7441
7442 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
7443
7444         * mini.c, liveness.c: patch by Patrik Torstensson and
7445         Zoltan Varga to improve performance in methods with
7446         exception clauses.
7447
7448 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
7449
7450         * driver.c: Remove 'Globalization' entry from --version.
7451
7452 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
7453
7454         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
7455         there is a profiler interested in JIT events.
7456
7457         * aot.c: Load profile files produced by the AOT profiling module, and
7458         reorder methods based on the profiling info. Add a 'method_order' table
7459         to the AOT file to make mono_aot_find_jit_info work with the reordered
7460         methods.
7461
7462         * mini.h: Bump AOT file version info.
7463
7464 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
7465
7466         * mini-arm.h: work around what looks like a gcc bug when optimizations
7467         are enabled.
7468
7469 2005-09-28  Raja R Harinath  <rharinath@novell.com>
7470
7471         * Makefile.am (AM_CFLAGS): Don't use += to append inside
7472         conditionals.  Use ...
7473         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
7474
7475 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
7476
7477         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
7478         to determine the amount of memory to copy when passing valuetypes.
7479
7480         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
7481         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
7482
7483 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
7484
7485         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
7486         information about aot.
7487
7488 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
7489
7490         * *.c: Replace the use of {Enter,Leave}CriticalSection with
7491         macros. This will allow a deadlock debugger to easily be plugged
7492         in.
7493
7494 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
7495
7496         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
7497
7498 2005-09-27  Raja R Harinath  <rharinath@novell.com>
7499
7500         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
7501         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
7502         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
7503         ($(arch_built)) [CROSS_COMPILING]: Error out.
7504
7505 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
7506
7507         * aot.c: Add support for the no_special_static flag for classes.
7508
7509 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
7510
7511         * Reapply reverted patches.
7512
7513         * *: Revert r50174 as well.
7514
7515         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
7516
7517 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
7518
7519         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
7520
7521 2005-09-23  Miguel de Icaza  <miguel@novell.com>
7522
7523         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
7524         part of the SIG_HANDLER_SIGNATURE.  
7525
7526 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
7527
7528         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
7529         statistics.
7530
7531         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
7532         introduced by previous patch.
7533
7534 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
7535
7536         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
7537         saved registers too.
7538
7539         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
7540         upon the information returned by get_call_info ().
7541         
7542         * mini-x86.c (add_float): Fix stack size calculation.
7543         (mono_arch_call_opcode): Rewrite this so it works based up the
7544         information returned by get_call_info ().
7545         (mono_arch_get_this_vret_args): Ditto.
7546
7547 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
7548
7549         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
7550         in cinfo to determine the registers which need to be used.
7551
7552 2005-09-20  Miguel de Icaza  <miguel@novell.com>
7553
7554         * driver.c (mono_main): Add --server and --desktop flags. 
7555
7556 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
7557
7558         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
7559         registers as global registers.
7560
7561         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
7562         longer needed with the new register allocator.
7563
7564         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
7565
7566         * cpu-ia64.md: Remove unused opcodes.
7567         
7568         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
7569         
7570 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
7571
7572         * cpu-amd64.md: Remove unused opcodes.
7573
7574         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
7575         needed with the new register allocator.
7576
7577         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
7578         reg-reg moves.
7579
7580 2005-09-16  Raja R Harinath  <rharinath@novell.com>
7581
7582         * Makefile.am (check-local): Don't invoke semdel-wrapper.
7583
7584 2005-09-16  Martin Baulig  <martin@ximian.com>
7585
7586         * exceptions-amd64.c
7587         (throw_exception): Don't call mono_debugger_throw_exception() if
7588         we're a rethrow - see the FIXME in the code.
7589
7590 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
7591
7592         * mini.c (mono_init_exceptions): This only works on some architectures.
7593         
7594 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
7595
7596         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
7597         on ia64.
7598
7599         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
7600
7601         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
7602         now in mini-exceptions.c.
7603
7604 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
7605
7606         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
7607         now in mini-exceptions.c.
7608
7609 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
7610
7611         * exceptions-x86.c: Applied patch from Patrik Torstensson 
7612         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
7613
7614         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
7615         code into mini-exceptions.c. Add some assertions to it.
7616
7617 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
7618
7619         * aot.c (emit_section_change): Applied patch from "The Software Team" 
7620         (<software@solmersa.com>). Fix as errors on windows.
7621
7622 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
7623
7624         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
7625         method info into the LMF.
7626
7627 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
7628         
7629         * mini-ia64.c: Add proper unwind info for method epilogs.
7630
7631         * exceptions-ia64.c: Add some code to help debugging.
7632         
7633         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
7634
7635         * mini-exceptions.c: Fix warning.
7636
7637 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
7638
7639         * mini.c: Really fix build.
7640
7641         * mini-x86.c mini-amd64.c: Fix build.
7642
7643 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
7644
7645         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
7646
7647         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
7648         some Interlocked methods as intrinsics.
7649
7650         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
7651         for Thread methods as well.
7652
7653         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
7654
7655         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
7656
7657         * mini-ia64.c mini-x86.c mini-amd64.c 
7658         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
7659         OP_MEMORY_BARRIER.
7660         
7661         * mini.c (mono_init_exceptions): Fix build breakage.
7662
7663 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
7664
7665         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
7666         of instructions. Use the new ia64_unw_op macros for emitting unwind
7667         info.
7668
7669         * mini.c (mono_init_exceptions): Initialize exception handling
7670         related trampolines at startup.
7671
7672 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
7673
7674         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
7675
7676 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
7677
7678         * mini.c: Handle type loading errors gracefully during compilation and
7679         throw the appropriate exception.
7680
7681 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
7682
7683         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
7684         for the mono binary.
7685
7686 2005-09-09  Martin Baulig  <martin@ximian.com>
7687
7688         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
7689         the release.
7690
7691 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
7692
7693         * mini-arm.h: use emulation for conv.r.un for the release.
7694
7695 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
7696
7697         * mini-arm.c, objects.cs: more fixes and tests for them.
7698
7699 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
7700
7701         * mini-arm.c: align structures to at least 4 bytes to be able
7702         to keep our current optimized memcpy.
7703
7704 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
7705
7706         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
7707
7708 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7709
7710         * mini.c: ignore SIGPIPE.
7711
7712 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
7713
7714         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
7715
7716         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
7717
7718 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
7719
7720         * mini.h: Add prototype for mono_allocate_stack_slots_full.
7721
7722 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
7723
7724         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
7725         exception handling support.
7726         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
7727         patch by Brian Koropoff <briank@marakicorp.com>).
7728
7729 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
7730
7731         * mini.c: revert another 'optimization' which breaks when
7732         items on the eval stack need to be saved at a basic block end
7733         (bug #75940).
7734
7735 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
7736
7737         * jit-icalls.c: for arrays, ensure we always provide
7738         lower bounds.
7739
7740 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
7741
7742         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
7743         
7744         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
7745
7746 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
7747
7748         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
7749         arguments in their original register.
7750
7751 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
7752
7753         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
7754         memset/memcpy.
7755
7756         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
7757         when ssapre is enabled.
7758
7759         * inssel-long.brg: Fix bug in previous patch.
7760
7761         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
7762         multiplication by a constant.
7763
7764 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
7765
7766         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
7767         icc.
7768
7769         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
7770         saving registers.
7771
7772 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
7773
7774         * inssel-arm.brg: apply changes tested by Brian Koropoff
7775         <briank@marakicorp.com>.
7776
7777 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
7778
7779         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
7780         
7781 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
7782
7783         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
7784         to the same register if dreg is just a base register.
7785         (print_ins): Improve printing of membase opcodes.
7786
7787         * inssel-x86.brg: Add optimized ldind(reg) rules.
7788
7789         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
7790
7791 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
7792
7793         * mini.c: when running under valgrind, set the stack bottom for
7794         the GC at the actual approximate stack for the app (fixes running
7795         mono with valgrind).
7796
7797 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
7798
7799         * mini.c: do no break at the first valuetype to init found
7800         (fixes bug #75791).
7801
7802 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
7803
7804         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
7805
7806 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
7807
7808         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
7809
7810 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
7811
7812         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
7813
7814 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7815
7816         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
7817
7818         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
7819         code.
7820
7821         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
7822         code.
7823
7824         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
7825         methods.
7826
7827 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
7828
7829         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
7830
7831 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7832
7833         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
7834         in the tail recursion optimization.
7835
7836         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
7837         debug info into the assembly file.
7838
7839         * iltests.il: Add test for filter regions.
7840
7841         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
7842         initial stack of filter regions. Fixes #75755.
7843
7844 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
7845
7846         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
7847         stack requirements.
7848
7849 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7850
7851         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
7852         the check for an already compiled method on non-ia64 platforms.
7853         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
7854         proper domain.
7855
7856         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
7857
7858         * inssel-x86.brg: Add some optimized call rules.
7859
7860 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
7861
7862         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
7863         method here.
7864
7865         * mini.h mini-trampolines.c: Pass the trampoline argument to 
7866         mono_arch_patch_delegate_trampoline.
7867
7868         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
7869
7870         * mini-trampolines.c: Fix build.
7871
7872         * mini-amd64.h: Add delegate trampolines.
7873
7874         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
7875
7876         * inssel-amd64.brg: Add optimized call rules.
7877         
7878         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
7879
7880         * inssel-ia64.brg: Add optimized ldind(reg) rules.
7881
7882 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
7883
7884         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
7885         change.
7886
7887         * mini-ia64.c: Remove LMF fixmes.
7888
7889         * mini-ia64.h: Remove most fields from LMF.
7890
7891         * inssel-ia64.brg (stmt): Fix unaligned access errors.
7892
7893         * mini-trampolines.c: Add support for IA64 function descriptors.
7894
7895         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
7896         for IA64 function descriptors.
7897
7898 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
7899
7900         * tramp-arm.c: patch the vtable for virtual calls. Added
7901         support code to register/unregister the LMF.
7902         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
7903         more LMF work.
7904
7905 2005-08-19  Dick Porter  <dick@ximian.com>
7906
7907         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
7908         bit value if needed.
7909
7910 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
7911
7912         * mini.c (mini_get_method): Move handling of wrapper data here.
7913
7914         * mini.c (mono_method_to_ir): Add support for dynamic methods.
7915
7916         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
7917         virtual.
7918
7919         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
7920         bblock->code does not remain empty.
7921
7922 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
7923
7924         * arrays.cs: Add regression test for #75832.
7925
7926         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
7927         rules. Fixes #75832.
7928
7929         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
7930         instruction scheduling.
7931
7932 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
7933
7934         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
7935
7936 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
7937
7938         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
7939
7940         * mini-codegen.c: Fix VC build.
7941
7942         * cpu-pentium.md: Increase length of atomic_exhange_i4.
7943
7944 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7945
7946         * mini.h: fix signature for mono_register_opcode_emulation.
7947
7948 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
7949
7950         * mini.c: Get rid of most of the helper_sig_... constants using
7951         mono_create_icall_signature ().
7952
7953 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
7954
7955         * jit-icalls.c (helper_ldstr): New helper function.
7956
7957         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
7958
7959         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
7960         throw, load the string using a helper call instead of creating a string object.
7961
7962         * aot.c: Update after LDSTR changes.
7963
7964         * mini.h: Bump AOT file version.
7965         
7966         * aot.c: Save class size info into the AOT file. Print more statistics during
7967         compilation.
7968
7969         * mini.h: Bump AOT file version.
7970
7971         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
7972         ordering of disasm cases. Fixes #74957.
7973
7974 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
7975
7976         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
7977         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
7978         the generic code needed for the ARM port.
7979
7980 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
7981
7982         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
7983         inssel-arm.brg: more ARM features and fixes.
7984
7985 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
7986
7987         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
7988         ARM port work in progress.
7989
7990 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
7991
7992         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
7993
7994         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
7995
7996         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
7997
7998         * inssel.brg (mini_emit_memset): Add support for unaligned access.
7999
8000         * *-ia64.*: Ongoing IA64 work.
8001         
8002         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
8003
8004 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
8005
8006         * TODO: Remove out-of-data todo stuff.
8007
8008         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
8009         dead code.
8010
8011         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
8012
8013         * mini.h: Bump corlib version.
8014
8015 2005-07-27  Martin Baulig  <martin@ximian.com>
8016
8017         * mini-codegen.c
8018         (create_copy_ins): Added `const unsigned char *ip' argument; set
8019         `copy->cil_code' from it.
8020
8021 2005-07-27  Martin Baulig  <martin@ximian.com>
8022
8023         * mini-exceptions.c (mono_handle_exception): Don't call
8024         mono_debugger_handle_exception() for filters.
8025
8026 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
8027
8028         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
8029         as well.
8030
8031 2005-07-26  Martin Baulig  <martin@ximian.com>
8032
8033         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
8034
8035         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
8036         helper_compile_generic_method() if the method is actually virtual
8037         and non-final.
8038
8039 2005-07-26  Martin Baulig  <martin@ximian.com>
8040
8041         * mini.c
8042         (trampoline_code): Renamed to `mono_trampoline_code' and made it
8043         public; this is now accessed directly by the debugger.
8044         (mono_generic_trampoline_code): Removed.
8045
8046         * debug-mini.c
8047         (mono_debug_init_method): Also add interncalls and wrappers.
8048
8049 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
8050
8051         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
8052
8053 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
8054
8055         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
8056
8057 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
8058
8059         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
8060
8061 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
8062
8063         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
8064         getting TLS offsets on AMD64 too.
8065
8066 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
8067
8068         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
8069
8070 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
8071
8072         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
8073         inssel-arm.brg, mini-arm.h: ARM port work in progress.
8074
8075 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
8076
8077         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
8078
8079         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
8080         to mini.c.
8081
8082         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
8083         mono_sparc_is_virtual_call ().
8084         
8085         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
8086
8087         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
8088         trampoline parameters.
8089
8090         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
8091         
8092         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
8093         to mono_arch_get_vcall_slot_addr.
8094
8095         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
8096         trampoline code.
8097
8098         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
8099
8100 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
8101
8102         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
8103
8104 2005-07-19  Martin Baulig  <martin@ximian.com>
8105
8106         * exceptions-amd64.c (throw_exception): Call
8107         mono_debugger_throw_exception() here like we're doing it on i386.
8108
8109 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
8110
8111         * mini-ia64.c: Add optimized TLS access support.
8112
8113 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
8114
8115         * mini-exceptions.c: Ongoing IA64 work.
8116
8117         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
8118
8119         * mini.c: Use the default optimization set when embedding. Fixes
8120         #75194.
8121
8122 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
8123
8124         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
8125         of trampolines to a separate file.
8126
8127         * mini-trampolines.c: New file.
8128
8129         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
8130         separate file.
8131         
8132         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
8133         amd64/ia64 code.
8134
8135         * mini-codegen.c: Fix cygwin build.
8136
8137 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
8138
8139         * mini.c: Add some minor changes needed by the IA64 port.
8140
8141         * *-ia64.*: Ongoing IA64 work.
8142
8143 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
8144
8145         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
8146         trampolines into arch-independent and arch-dependent parts.
8147
8148         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
8149
8150 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
8151
8152         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
8153
8154         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
8155         the xp-regalloc-branch for amd64.
8156
8157         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
8158         xp-regalloc-branch for x86.
8159
8160 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
8161
8162         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
8163
8164 2005-07-06  Martin Baulig  <martin@ximian.com>
8165
8166         * mini.c
8167         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
8168         (mono_jit_runtime_invoke): Likewise.
8169
8170 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
8171
8172         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
8173         on x86 too.
8174         
8175         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
8176         without loading their metadata. Reorganize the file format so exception handling+
8177         debug info is kept separate from normal method info. Create MonoJitInfo 
8178         structures for methods lazily.
8179
8180         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
8181         loading metadata.
8182         (x86_class_init_trampoline): Patch AOT class init trampolines too.
8183
8184         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
8185
8186         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
8187         in AOT code.
8188
8189         * mini.h: Bump AOT file version.
8190
8191 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
8192
8193         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
8194
8195 2005-07-01  Raja R Harinath  <rharinath@novell.com>
8196
8197         * Makefile.am (check-local): Call semdel-wrapper.
8198
8199 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
8200
8201         * mini-x86.c: Revert the last change as it seems to break the build..
8202
8203 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
8204
8205         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
8206         
8207         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
8208
8209 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
8210
8211         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
8212         outside of the macro, so strange stuff doesn't happen with gcc4
8213         (NEW_AOTCONST_TOKEN): Likewise.
8214
8215 2005-06-28  Martin Baulig  <martin@ximian.com>
8216
8217         * mini.c (mini_class_is_system_array): New static method; use this
8218         instead of `klass->parent == mono_defaults.array_class' everywhere
8219         since this also works for the new generic array class.
8220
8221 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
8222
8223         * inssel.brg: Remove warnings.
8224
8225 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
8226
8227         * mini-ia64.c: Ongoing IA64 work.
8228
8229         * basic-float.cs: Add float->i1 conversion test.
8230
8231         * iltests.il: Add conv.u4 test.
8232
8233 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
8234
8235         * inssel-long.brg: Fix bug caused by last change.
8236
8237 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
8238
8239         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
8240         BSDs.  Allows the x86 JIT to work on OSX86
8241
8242 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
8243
8244         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
8245         u4->i8 conversion.
8246
8247         * mini-ia64.c: Ongoing IA64 work.
8248
8249 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
8250
8251         * mini-ia64.c: Ongoing IA64 work.
8252
8253         * driver.c: Clean up jit_code_hash as well when using --regression.
8254
8255         * inssel-long.brg: Fix long->i4/u4 conversion rules.
8256
8257         * basic-long.cs: Add tests for long->u4 conversion.
8258
8259 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
8260
8261         * mini.c: Take mono_get_domainvar out of macros. This makes sure
8262         that we do not depend on undefined C behavior: the order stuff
8263         gets evaluated within an expression. Fixes mono when compiled on
8264         GCC 4.
8265
8266 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
8267
8268         * *-ia64.*: Ongoing IA64 work.
8269
8270         * aot.c: Lower memory usage while loading AOT methods.
8271
8272         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
8273
8274         * mini.h: Bump AOT file format version.
8275
8276 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
8277
8278         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
8279
8280 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
8281
8282         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
8283         not on callee assembly). Fixed some comments.
8284
8285 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
8286
8287         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
8288         it gets proper disassembly.
8289         (emit_method_info): Remove some dead code.
8290
8291         * mini.c (mini_method_compile): Allways allocate the GOT var in
8292         mono_method_to_ir for emulating opcodes.
8293
8294 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
8295
8296         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
8297         before freeing the code memory. Fixes #74990.
8298
8299         * objects.cs: Add regression test for #74992.
8300
8301         * liveness.c: Extend live ranges of arguments to the beginning of the
8302         method. Fixes #74992.
8303
8304         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
8305         so it points into the faulting instruction.
8306
8307 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
8308
8309         * jit-icalls.c (mono_imul_ovf): Add exception handling.
8310
8311         * *-ia64.*: Ongoing IA64 work.
8312
8313         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
8314
8315 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
8316
8317         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
8318
8319         * *-ia64.*: Ongoing IA64 work.
8320
8321 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
8322
8323         * basic-long.cs: Add tests for add/sub.ovf.
8324
8325         * basic.cs: Add tests for sub.ovf.
8326
8327         * *-ia64.*: Ongoing IA64 work.
8328
8329 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
8330
8331         * *-ia64.*: Ongoing IA64 work.
8332
8333         * basic.cs: Add conv.ovf.i4.un test.
8334
8335 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
8336
8337         * mini.c: (remove_block_if_useless) Fixed bug 75061.
8338         
8339 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8340
8341         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
8342
8343 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
8344
8345         * *-ia64.*: Ongoing IA64 work.
8346
8347 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8348
8349         * trace.[ch]:
8350         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
8351
8352 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
8353
8354         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
8355
8356 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
8357
8358         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
8359
8360         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
8361         of a call is callable by a near call.
8362
8363 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
8364
8365         * mini-ia64.c: Ongoing IA64 work.
8366
8367 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
8368
8369         * genmdesc.c: Make the generated array non-static.
8370
8371         * inssel-long.brg: Fix LSHR_IMM rule.
8372
8373         * *-ia64.*: Ongoing IA64 work.
8374
8375         * *-ia64.*: Ongoing IA64 work.
8376
8377 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
8378
8379         * *-ia64.*: Ongoing IA64 work.
8380
8381         * *-ia64.*: Ongoing IA64 work.
8382         
8383         * mini-ia64.c: Ongoing IA64 work.
8384
8385         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
8386
8387 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
8388
8389         * objects.cs basic-calls.cs: Move some tests to objects.cs.
8390         
8391         * objects.cs basic-long.cs: Move some tests to objects.cs.
8392
8393 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
8394
8395         * *-ia64.*: Ongoing IA64 work.
8396
8397         * iltests.il: Add a new test.
8398
8399         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
8400         newobj. Fixes #75042.
8401
8402 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
8403
8404         * *-ia64.*: Ongoing IA64 work.
8405         
8406         * *-ia64.*: Ongoing IA64 work.
8407         
8408         * *-ia64.*: Ongoing IA64 work.
8409
8410         * basic.cs objects.cs: Move tests accessing static variables as well.
8411
8412         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
8413
8414 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
8415
8416         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
8417
8418         * driver.c: Always print failed tests.
8419
8420         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
8421         frame pointer.
8422
8423         * *ia64*: Ongoing IA64 work.
8424
8425 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
8426
8427         * basic.cs: Add tests for add.ovf. Fix warnings.
8428
8429 2005-05-18  Miguel de Icaza  <miguel@novell.com>
8430
8431         * driver.c (mono_main): Avoid crash if no argument is passed to
8432         --break;  Do not use g_error, but f_printf.   And fix all other
8433         ocurrences of the same crash.
8434
8435 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
8436
8437         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
8438         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
8439         Fixes #74742.
8440
8441 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
8442
8443         * *-ia64.*: Add beginnings of IA64 backend.
8444
8445         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
8446
8447 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
8448
8449         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
8450         Fixes #74925.
8451
8452         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
8453
8454         * mini-amd64.c: Fix a warning.
8455
8456 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
8457
8458         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
8459         in float_neg. Fixes #74897.
8460
8461         * mini-amd64.c (emit_call): Fix another near call bug.
8462
8463 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
8464
8465         * declsec.c: Keep the appdomain information in the structure. Added a 
8466         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
8467         value gets overwritten).
8468         * declsec.h: Set the default MonoArray for the the stack to 6. Added
8469         an MonoAppDomain member to MonoSecurityFrame.
8470         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
8471         used in the stack walk. Now use a MonoArray which grow (double) when
8472         it gets full.
8473
8474 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
8475
8476         * mini.c: Re-enabled runtime cleanup, since running threads should
8477         now properly stop when exiting.
8478
8479 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
8480
8481         * mini-codegen.c: New file contaning the arch-independent local
8482         register allocator. Not used by any architectures yet.
8483
8484         * mini.h linear-scan.c: Merge some changes from the 
8485         mini-xp-local-regalloc branch.
8486
8487 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
8488
8489         * mini-amd64.c (emit_call): Fix calls to native functions when the
8490         runtime is compiled as a shared library. Fixes #74756.
8491
8492         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
8493         on a literal field. Fixes #74751.
8494
8495 2005-04-25  Raja R Harinath  <rharinath@novell.com>
8496
8497         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
8498
8499 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
8500
8501         * objects.cs: Add missing null casting test.
8502
8503 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
8504
8505         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
8506         in wrapper methods. Also rename 'address' variable to 'offset'.
8507
8508 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
8509
8510         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
8511         warnings.
8512         
8513         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
8514
8515         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
8516         work on windows.
8517
8518 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
8519
8520         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
8521
8522 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
8523
8524         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
8525         just the last bytes.
8526
8527 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
8528
8529         * aot.c (mono_compile_assembly): Fix warning.
8530
8531         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
8532         by the _MSC_VER stuff.
8533
8534 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
8535
8536         * inssel-long.brg: Fix #74588.
8537
8538         * cpu-amd64.md: Fix #74591.
8539
8540         * iltests.il: Add new regression tests.
8541
8542 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
8543
8544         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
8545         valuetype.
8546
8547 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
8548
8549         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
8550
8551         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
8552         from Bill Middleton <flashdict@gmail.com>.
8553
8554 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
8555
8556         * arrays.cs: Add new regression test. Fix warnings.
8557
8558 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
8559
8560         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
8561         and leakage in CKFINITE.
8562
8563         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
8564         this to a null op since it is called on amd64 too.
8565
8566         * exceptions-amd64.c (get_throw_trampoline): Align stack.
8567
8568         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
8569         body since this is not used on amd64.
8570         
8571         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
8572
8573         * mini-amd64.c: Remove obsolete fixmes.
8574
8575         * mini.c (print_method_from_ip): Fix debugging support.
8576
8577 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8578
8579         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
8580         so that expressions that don't give much gain are not reduced.
8581         * ssapre.h: Likewise.
8582
8583 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
8584
8585         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
8586
8587         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
8588
8589         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
8590
8591 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
8592
8593         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
8594
8595         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
8596
8597 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
8598
8599         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
8600         stack touching.
8601
8602         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
8603
8604         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
8605
8606         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
8607
8608         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
8609         MONO_ARCH_USE_SIGACTION. Fixes #74252.
8610
8611         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
8612
8613         * mini-x86.c: Fix up stack overflow handling.   
8614
8615         * exceptions.cs: Add new regression test.
8616
8617 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
8618
8619         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
8620         mono_jit_thread_attach.
8621
8622         * mini.c (mono_method_to_ir): Verify called method is not abstract.
8623
8624 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
8625
8626         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
8627         avoid calling constructors using callvirt.
8628
8629         * inssel.brg: Fix #74073.
8630
8631 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
8632
8633         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
8634         compilation with non-GCC compilers.
8635         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
8636         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
8637
8638 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
8639
8640         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
8641         klass->interface_offsets (will likely fix bug#74073).
8642
8643 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
8644
8645         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
8646
8647 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
8648
8649         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
8650         to amd64_div_reg_size ().
8651         
8652         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
8653
8654 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
8655
8656         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
8657
8658 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
8659
8660         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
8661
8662 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
8663
8664         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
8665         
8666         * mini.c (mono_precompile_assembly): Load and precompile referenced
8667         assemblies as well. Fixes #74015.
8668
8669 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
8670
8671         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
8672
8673 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
8674
8675         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
8676         a lot of checks and (anyway) permissions cannot work until corlib is 
8677         loaded.
8678
8679 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
8680
8681         * mini-ppc.c: fixed ABI issue on sysv/ppc.
8682
8683 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
8684
8685         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
8686         calls (fixes bug#72824).
8687
8688 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
8689
8690         * mini.c: fix tail recursion elimination (see test in bug#73936).
8691
8692 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
8693
8694         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
8695         some fp functions in sse2 mode.
8696
8697 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
8698
8699         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
8700
8701 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
8702
8703         * mini.h mini.c: Add mono_get_jit_tls_key ().
8704
8705         * mini-x86.c: Enable fast TLS support on windows.
8706
8707 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
8708
8709         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
8710         * mini.c: Check for p/invoke method when generating code. If a
8711         p/invoke method, or it's class, isn't decorated with [Suppress
8712         UnmanagedCodeSecurity] then generate code to call System.Security.
8713         UnmanagedDemand (only if the security manager is active).
8714
8715 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
8716
8717         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
8718         last change as it seems to cause strange crashes.
8719         
8720 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8721
8722         * *.c: handle unsafe function pointers where needed.
8723
8724 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
8725
8726         * mini.c (mono_jit_free_method): Remove the fixme too.
8727
8728 2005-03-15  Miguel de Icaza  <miguel@novell.com>
8729
8730         * mini.c: As discussed, make the code actually free the delegate
8731         thunk now, to enable the debugging of delegate problems, use
8732         MONO_DEBUG=1 when running Mono. 
8733
8734         This takes also care of parts of the leaks as seen by Joe.
8735
8736 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
8737
8738         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
8739         thread_tls_offset calculation.
8740
8741 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
8742
8743         * declsec.c: Reworked linkdemand checks for icall. The previous code
8744         was using the declaration code (untrusted) and didn't work as expected
8745         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
8746         specific case.
8747
8748 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
8749
8750         * iltests.il: Add new localloc test.
8751
8752         * mini-amd64.c: Handle large stack allocations the same way as on
8753         windows if stack overflow handling is working.
8754         
8755         * mini-amd64.c: Allocate the signal stack using mmap.
8756
8757         * mini.c (sigsegv_signal_handler): Fix reading of context.
8758
8759         * mini-exceptions.c: Fix up stack overflow handling.
8760
8761         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
8762
8763         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
8764
8765         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
8766
8767         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
8768
8769         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
8770         tramp_init functions as they are no longer needed.
8771
8772 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
8773
8774         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
8775         
8776         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
8777
8778         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
8779         
8780         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
8781         support that now.
8782
8783         * mini-ops.h: Add OP_LMUL_IMM.
8784
8785         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
8786         long mul/div opcodes as intrinsic.
8787
8788         * mini-amd64.c (emit_call): Handle the case when the callee might be
8789         an AOT method.
8790
8791 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
8792
8793         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
8794         extra safe.
8795         
8796         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
8797
8798         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
8799
8800 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
8801
8802         * mini.c (mono_codegen): Don't leak here, to help people running
8803         monogrind.
8804
8805 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
8806
8807         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
8808         conversions in sse2 mode.
8809
8810         * basic-float.cs: Add regression test.
8811         
8812         * mini-amd64.c: Reenable sse2.
8813
8814 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
8815
8816         * mini-amd64.c: Disable sse2 until some regressions are fixed.
8817
8818 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
8819
8820         * driver.c: Copyright text should include 2005.
8821         
8822 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
8823
8824         * cpu-amd64.md (load_membase): Fix more max lengths.
8825
8826 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
8827
8828         * cpu-amd64.md (load_membase): Fix max length.
8829
8830         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
8831
8832         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
8833
8834         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
8835         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
8836
8837         * basic-float.cs: Add rounding regression test.
8838
8839         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
8840
8841 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
8842
8843         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
8844         structures in registers for pinvoke wrappers.
8845
8846 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
8847
8848         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
8849
8850 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
8851
8852         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
8853         wrapper to mono_jit_thread_attach.
8854
8855         * mini.c (mini_jit_thread_attach): New jit icall.
8856
8857         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
8858         native->managed wrappers.
8859
8860         * exceptions.cs: Add new regression test.
8861
8862         * mini.c (optimize_branches): Check regions in the cbranch to throw
8863         block case as well. Fixes #73242.
8864
8865 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
8866
8867         * mini.c: thread safety fixes.
8868
8869 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
8870
8871         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
8872         patching stuff, since delegates use jump trampolines so there is
8873         no caller.
8874
8875         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
8876         jump trampolines.
8877         
8878         * tramp-amd64.c: Fix build.
8879
8880         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
8881         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
8882
8883         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
8884         Rename this to mono_arch....
8885         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
8886
8887         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
8888
8889         * mini-amd64.c (emit_call): If both the caller and the callee is
8890         guaranteed to have 32 bit addresses, emit a normal call.
8891
8892         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
8893
8894         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
8895         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
8896         method_ptr inside delegates.
8897
8898 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
8899
8900         * mini.c (mono_jit_free_method): Free the method info even if the native code is
8901         invalidated. Fixes #73001.
8902
8903         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
8904
8905         * mini-x86.c: Only use stdcall for pinvokes on windows.
8906
8907 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
8908
8909         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
8910         * mini-x86.c: remove unreliable __thread var offset detection,
8911         use the correct accessors and enable by default.
8912
8913 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
8914
8915         * mini.c (mono_jit_free_method): Fix memory leak.
8916
8917 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
8918
8919         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
8920
8921 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
8922
8923         * cpu-amd64.md: Fix lengths of atomic opcodes.
8924
8925 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
8926
8927         * driver.c: try to not imply using ICU is any good.
8928
8929 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
8930
8931         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
8932         functions as inline ops.
8933
8934         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
8935         some Interlocked functions as inline ops.
8936
8937         * mini.c (move_basic_block_to_end): Fix bug in last patch.
8938
8939         * mini.h (MonoBasicBlock): Reorganize fields a bit.
8940
8941         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
8942
8943         * mini.c: Add support for OP_NOT_TAKEN.
8944
8945         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
8946         structures in registers for pinvoke wrappers.
8947
8948         * mini-amd64.c: Fix warnings.
8949
8950 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
8951
8952         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
8953
8954         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
8955
8956         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
8957         address instead of loading the address from it.
8958
8959         * mini-x86.c: Add support for returning small structs in registers
8960         on Win32. Fixes part of #70864.
8961         
8962 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
8963
8964         * trace.c (get_token): Improve error checking.
8965
8966 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
8967
8968         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
8969
8970 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
8971  
8972         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
8973         it can be reused for MonoClass.
8974         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
8975         _LINKDEMAND.
8976
8977 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
8978
8979         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
8980         instead of a MonoReflectionMethod. The method information wasn't used
8981         when displaying SecurityException details (but will be now).
8982
8983 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
8984
8985         * Makefile.am : windows build fix.
8986
8987 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
8988
8989         * iltests.il: Add new regression test.
8990
8991         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
8992         #72522.
8993
8994 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
8995  
8996         * mini.c: Moved linkdemand check into helper function check_linkdemand
8997         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
8998         LDFTN, LDVIRTFTN).
8999
9000 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
9001
9002         * declsec.c: Added statistics counter for different kinds of 
9003         LinkDemands.
9004         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
9005         (and commented) declaration.
9006         * mini.c: Added statistics counter for security Demand code 
9007         generation. Added display of security statistics.
9008
9009 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
9010
9011         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
9012         Fix compilation errors under gcc-2.95.
9013
9014 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
9015
9016         * mini.c, driver.c: Use the new jit trampoline hashtable
9017
9018 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9019
9020         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
9021
9022 2005-02-11  Martin Baulig  <martin@ximian.com>
9023
9024         * debug-mini.c (mono_debug_close_method): Free the line number array.
9025
9026 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
9027
9028         * aot.c: Break up large methods into smaller ones. Share GOT slots for
9029         icalls.
9030
9031         * mini.h: Bump AOT file format version. 
9032
9033 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
9034
9035         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
9036         APTC and P/Invoke.
9037         * declsec.h: Added macros to get/set lazyly initialized security 
9038         informations about assemblies. Added new enum for different type of
9039         possible LinkDemand violation. Added function to check LinkDemands.
9040         * mini.h: Added a field to MonoCompile to hold any security violation
9041         detected when JITting a method (so it can be thrown later).
9042         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
9043         and CEE_CALLVIRT. Added code to throw exception at the end of
9044         mini_method_compile (note: the exception is unhandled right now).
9045
9046 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
9047
9048         * mini.c, jit-icalls.c: use the managed implementation of
9049         memset for initobj and memset, to avoid managed <-> unmanaged
9050         transitions.
9051
9052 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
9053
9054         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
9055         optimization if it would need a GOT var.
9056
9057         * basic.cs: Add tests for constant propagation and switch statements.
9058
9059         * ssa.c: Fix out-of-range constant propagation and switch statements.
9060
9061 2005-02-09    <vargaz@freemail.hu>
9062
9063         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
9064
9065 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
9066
9067         * cpu-amd64.md (load_membase): Fix max length of load_membase.
9068
9069 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9070
9071         * mini.c: update to new signature of mono_class_get_allocation_ftn().
9072
9073 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
9074
9075         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
9076         arithmetic operations.
9077
9078 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
9079
9080         * mini-ppc.c: add a workaround for broken user code that
9081         DllImports vararg functions with non-vararg signatures.
9082
9083 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
9084
9085         * mini.c (mono_jit_compile_method_inner): Add detection and a 
9086         meaningfull error message for assemblies written in Managed C++.
9087
9088         * tramp-amd64.c mini-amd64.h: Add support for 
9089         create_trampoline_from_token ().
9090
9091         * aot.c mini-x86.c abcremoval.c: Applied patch from
9092         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
9093
9094 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
9095
9096         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
9097         which takes a MonoImage/token as parameter instead of a MonoMethod.
9098
9099         * aot.c: Use the new trampoline for initializing vtables.
9100
9101         * aot.c: Add support for ldfld/stfld_remote wrappers.
9102
9103         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
9104         rules for compare <MEM>, IMM.
9105
9106         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
9107
9108         * aot.c: Handle inherited finalizers correctly.
9109
9110 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
9111
9112         * inssel.brg (stmt): Add a missing _setup_... ().
9113
9114         * aot.c: Save some parts of the class state to the AOT file and use it
9115         to recompute that state when a class is initialized.
9116
9117         * mini.c: Install AOT hooks into the runtime.
9118
9119         * mini.h: Bump AOT file format version.
9120         
9121         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
9122         Fixes #72148.
9123
9124         * iltests.il: Add new test.
9125
9126 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
9127
9128         * mini.c: fix typo.
9129
9130 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
9131
9132         * mini.c: setup the statistical profiler in the thread attach
9133         callback to cope with the new single thread code.
9134
9135 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
9136
9137         * mini-ppc.c: ensure we have enough room for the profiler
9138         calls (fixed bug#72084).
9139
9140 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
9141
9142         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
9143         it.
9144
9145 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9146
9147         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
9148
9149 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9150
9151         * ssapre.c: Fixed an issue with down safety (this allows IronPython
9152         to succesfully execute parrotbench).
9153         * ssapre.h: Likewise.
9154
9155 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9156
9157         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
9158         variable for stores to method arguments (fixes a SSAPRE issue).
9159
9160 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
9161
9162         * mini.c: handle value types in dup, fixes gen-112.cs.
9163
9164 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
9165
9166         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
9167         sequence for calls in dynamic methods to avoid thunks.
9168
9169 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
9170
9171         * mini.c: correctly remove dynamic methods from the hashtable.
9172
9173 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9174
9175         * driver.c: Disabled SSAPRE until fix the bug that appears
9176         in IronPython's parrotbench.
9177
9178 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
9179
9180         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
9181
9182         * mini.c (mono_method_to_ir): Revert the previous change.
9183         
9184         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
9185         when AOT compiling.
9186
9187         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
9188         mono_jit_info_table_find () etc. when running under valgrind.
9189
9190         * inssel.brg: Fix warnings.
9191
9192         * mini-exceptions.c: Fix warnings.
9193
9194 2005-01-31  Martin Baulig  <martin@ximian.com>
9195
9196         * driver.c (compile_all_methods_thread_main): Don't try to compile
9197         generic methods or anything which has type parameters.
9198
9199 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
9200
9201         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
9202
9203         * TestDriver.cs: Add --verbose flags.
9204
9205         * graph.c ssa.c: Fix 64 bit warnings.
9206         
9207         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
9208         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
9209         Fix 64 bit warnings.
9210
9211         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
9212         variable not spotted by gcc.
9213         
9214         * mini-amd64.c inssel-amd64.brg: Applied patch from  
9215         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
9216         X86_COMPARE_MEMBASE opcodes.
9217
9218         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
9219
9220 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
9221
9222         * *: MonoMethod->signature might be NULL now. You *MUST* use
9223         mono_method_signature.
9224
9225 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
9226
9227         * driver.c (compile_all_methods_thread_main): Compile the methods
9228         without invoking cctors.
9229
9230 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
9231
9232         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
9233         * basic-calls.cs: test for the above.
9234
9235 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
9236
9237         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
9238         MonoJitInfo changes.
9239
9240 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
9241
9242         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
9243         eagerly if it contains dynamic methods.
9244         
9245         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
9246
9247         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
9248         trace, it is now computed by an icall from trace_ips.
9249         
9250         * mini-exceptions.c: Fix a warning.
9251
9252 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
9253
9254         * mini-exceptions.c: don't bother getting stack trace info if
9255         it's not going to be used.
9256
9257 2005-01-27  Raja R Harinath  <rharinath@novell.com>
9258
9259         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
9260         ssapre-mini-ops.h.
9261
9262 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
9263
9264         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
9265
9266         * aot.c: Avoid calling mono_method_get_header () if not needed.
9267
9268         * mini.h: Bump AOT file format version.
9269         
9270         * mini.c (mono_emit_native_call): Allocate a GOT var here.
9271
9272         * mini.c (mono_print_tree): Print more info for calls.
9273
9274 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
9275
9276         * declsec.h: Remove warning by adding missing include for marshal.h
9277
9278 2005-01-26  Martin Baulig  <martin@ximian.com>
9279
9280         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
9281         `ip' twice.
9282
9283 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
9284
9285         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
9286         flags.
9287
9288         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
9289
9290         * aot.c (mono_compile_assembly): Fix a warning.
9291
9292 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
9293
9294         * declsec.c: Look for security attributes on the original MonoMethod 
9295         (and not the wrapped one). This fix permissions on icalls.
9296
9297 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
9298
9299         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
9300
9301         * mini.c (mono_allocate_stack_slots): Add a fixme.
9302
9303         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
9304
9305 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
9306
9307         * inssel.brg: optimize casts of sealed types (more
9308         optimizations waiting for fixes in remoting).
9309
9310 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
9311
9312         * inssel.brg (stmt): Add another dummy rule.
9313
9314         * driver.c: Fix warnings.
9315
9316         * driver.c (mono_main): If running under valgrind, instruct glib to use
9317         the system allocation functions so valgrind can track the memory
9318         allocated by the g_... functions.
9319
9320         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
9321
9322         * mini-ops.h: Add OP_DUMMY_STORE opcode.
9323
9324         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
9325
9326         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
9327         variables in try regions.
9328
9329         * mini.c (mini_method_compile): Don't disable optimizations on large
9330         methods when AOT compiling.
9331
9332         * mini.c (mono_allocate_stack_slots): New arch independent method to 
9333         allocate stack slots. Not yet used.
9334
9335 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
9336
9337         * debug-mini.c (mono_debug_close_method): Plug some leaks.
9338
9339 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
9340
9341         * mini-ppc.c: make the branch info relative as the code
9342         buffer can be reallocated.
9343
9344 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
9345
9346         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
9347         * driver.c: Removed the AOT/security restriction. Now initialize the
9348         security manager (in metadata) if --security is used.
9349         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
9350         rather than the pointer to declarative security, when AOT is used.
9351
9352 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
9353
9354         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
9355         basic blocks, reduced intrinsic exception throwing code size.
9356
9357 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
9358
9359         * driver.c (mini_usage): Reorder the usage screen.
9360
9361 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
9362
9363         * mini.c (mono_resolve_patch_target): Fix warning.
9364
9365 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
9366
9367         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
9368         previous patch.
9369
9370         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
9371
9372         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
9373         breaks the amd64 build.
9374
9375         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
9376         register allocation. Fixes #71454.
9377
9378         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
9379
9380         * arrays.cs: Add new regression test.   
9381
9382 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9383
9384         * ssapre.c: Turned usage of snprintf to GString.
9385         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
9386         (I left it on by mistake in my previous commit).
9387
9388 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
9389
9390         * mini.c, cfold.c, basic-calls.cs: preserve side effects
9391         on cond branch optimization (fixes bug# 71515).
9392
9393 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9394
9395         * abcremoval.c: Fixed bug 71062.
9396         * abcremoval.h: Likewise.
9397
9398 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9399
9400         * mini.c: Added a new functionality to optimize_branches, the removal
9401         of useless basic blocks, and fixed some problem in the removal of
9402         critical edges; some utility functions added for both purposes.
9403         * ssapre.c: Added complex expression support, and fixed bug 70637.
9404         * ssapre.h: Likewise.
9405         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
9406         enabled in SSAPRE.
9407         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
9408         * driver.c: Re-enabled SSAPRE.
9409
9410 2005-01-19  Martin Baulig  <martin@ximian.com>
9411
9412         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
9413         the result of mono_get_method_constrained().
9414
9415 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
9416
9417         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
9418         manager.
9419
9420 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
9421
9422         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
9423         be detected.  Fixes #59296.
9424
9425 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
9426
9427         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
9428         which can happen. Fixes #71361.
9429
9430 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
9431
9432         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
9433         manager.
9434
9435 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
9436
9437         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
9438         appdomain-unload.exe to fail.
9439         
9440         * mini.c: Fix some memory leaks.
9441
9442 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
9443
9444         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
9445         Fixed bug and sped up some codepaths.
9446
9447 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
9448
9449         * mini.c: Fix some memory leaks.
9450
9451         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
9452         conversion.
9453
9454         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
9455
9456         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
9457         #71320.
9458
9459         * iltests.il: Add regression test for #71320.
9460
9461 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
9462
9463         * mini.c (mono_codegen): Fix installation of profiler hooks.
9464
9465         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
9466
9467 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
9468
9469         * mini.h, mini.c, cfold.c: optimize access to enum
9470         readonly fields, too. Eval conditional branches if possible
9471         to perform unreachable code removal in more cases.
9472
9473 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
9474
9475         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
9476
9477         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
9478         code manager.
9479
9480         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
9481         WinXP DEP. Fixes #71244.
9482
9483 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
9484
9485         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
9486
9487 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
9488
9489         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
9490
9491 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
9492
9493         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
9494         changes.
9495
9496         * mini.h: Bump AOT version.
9497
9498         * mini.h (MonoCompile): Change exvar to a hash table.
9499
9500         * mini.c: Allocate a separate exvar for each handler block.
9501
9502         * mini.c: Get rid of the computation of filter_lengths, its not needed.
9503
9504         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
9505         ex var with the pending exception and only throw if the two are equal.
9506         Fixes #68552.
9507         
9508         * exceptions.cs: Add tests for rethrow and nested catch clauses.
9509
9510         * mini-x86.c: Fix warnings.
9511
9512         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
9513         used by all the ports now.
9514
9515         * aot.c: Add write-symbols and save-temps options.
9516
9517 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
9518
9519         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
9520
9521 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
9522
9523         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
9524         operations.
9525
9526         * tramp-s390.c: Check vtable slot belongs to the domain.
9527
9528         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
9529         as per other platforms.
9530
9531         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
9532
9533 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
9534
9535         * driver.c: we don't run the Main() code in a subthread anymore.
9536
9537 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
9538
9539         * mini.c: added experimental rtc support in the statistical
9540         profiler: if the user has the permission, more accurate statistics
9541         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
9542         The MONO_RTC value must be restricted to what the linux rtc allows:
9543         power of two from 64 to 8192 Hz.
9544
9545 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
9546
9547         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
9548
9549 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
9550
9551         * mini-ppc.c: better icache flush for smp.
9552
9553 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
9554
9555         * mini-amd64.c (emit_move_return_value): Fix memory leak.
9556
9557         * mini-x86.c (get_call_info): Add the get_call_info () code from the
9558         amd64 port, not yet used.
9559
9560 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
9561
9562         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
9563         a struct type.
9564
9565 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
9566
9567         * driver.c: Added --security option to activate the security manager.
9568         Right now this will allow code generation for declarative demands and
9569         is disabled when AOT is specified.
9570         * mini.c: Add code generation for declarative security demands.
9571         * mini.h: Add mono_use_security_manager as an extern gboolean.
9572
9573 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
9574
9575         * aot.c (mono_compile_assembly): Speed up compilation a bit by
9576         emitting more dense assembly code.
9577
9578         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
9579         exception throwing stuff.
9580
9581 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
9582
9583         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
9584         dead code.
9585
9586         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
9587         left in by mistake.
9588
9589         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
9590         fixed.
9591
9592         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
9593
9594         * tramp-*.c: Only patch vtable slots if the object is in the current
9595         domain. Fixes appdomain-unload.exe.
9596
9597         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
9598         
9599         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
9600         x86 branch.
9601
9602 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
9603
9604         * mini.c (reverse_branch_op): New helper function.
9605
9606         * mini.c (optimize_branches): Run the new optimization only on 
9607         platforms which support it. Also reverse all kinds of branches.
9608
9609         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
9610
9611         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
9612         a throw statement.
9613
9614         * mini.c (optimize_branches): Reverse not-equals branches if the false
9615         bblock is a throw. This happens a lot of time with argument checking in
9616         corlib.
9617
9618         * mini.c (mono_codegen): Add support for placing basic blocks after
9619         the function epilogue.
9620
9621         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
9622         function epilogue.
9623         
9624 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
9625
9626         * mini.c (setup_stat_profiler): Only set this up if the platform
9627         supports ITIMER_PROF.
9628
9629 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
9630
9631         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
9632         previous patch.
9633
9634         * inssel.brg: Fix a warning.
9635
9636 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
9637
9638         * mini.c: added support for statistical profiler 
9639         (run with: --profile=default:stat).
9640
9641 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
9642
9643         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
9644
9645         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
9646
9647         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
9648         related to global registers from the amd64 port.
9649
9650 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
9651
9652         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
9653
9654         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
9655         with global registers.
9656         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
9657
9658         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
9659
9660 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
9661
9662         * debug-mini.c (encode_value): Fix off-by-one.
9663
9664         * aot.c (encode_value): Likewise.
9665
9666         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
9667
9668 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
9669
9670         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
9671         AOT.
9672
9673         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
9674         
9675         * aot.c (emit_method_info): Increase size of temp buffer.
9676
9677         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
9678         the AOT case.
9679
9680 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
9681
9682         * aot.c (emit_method_info): Fix build.
9683         
9684         * aot.c: Further rework of the AOT file format to reduce the size of
9685         the method info data.
9686
9687         * mini.h: Bump AOT file format version.
9688
9689 2004-12-27  Martin Baulig  <martin@ximian.com>
9690
9691         * mini.c (mini_get_method): New static method; call
9692         mono_get_method_full() and mono_get_inflated_method().
9693         (mono_method_to_ir): Use mini_get_method() instead of
9694         mono_get_method_full(). 
9695
9696 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
9697
9698         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
9699
9700 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
9701
9702         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
9703
9704         * inssel-amd64.brg: Add some optimization rules.
9705
9706 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
9707
9708         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
9709         standard not GC'd stuff is fine.
9710
9711 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
9712
9713         * aot.c: Rework the AOT file format to get rid of most of the global
9714         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
9715
9716         * mini.h: Bump AOT file format version.
9717         
9718 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
9719
9720         * mini.h: Bump AOT file format version.
9721
9722         * aot.c (mono_aot_is_got_entry): New function to determine if an 
9723         address is inside a GOT.
9724
9725         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
9726
9727         * cpu-pentium.md: Increase the maximum size of some instructions which
9728         might involve a got access.
9729         
9730         * mini.c (get_method_from_ip): Another debug helper function.
9731
9732         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
9733         when got var accesses are created during the decompose phase.
9734
9735         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
9736
9737         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
9738         argument mini_compile_method and to MonoCompile, and use this to
9739         determine whenever a given method is compiled for AOT. This allows the
9740         other methods compiled during AOT compilation to be free of AOT stuff,
9741         so the backends does not need to add special support for them by
9742         creating a fake GOT etc.
9743
9744         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
9745         longer needed.
9746
9747 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
9748
9749         * mini.c (mono_method_to_ir): It turns out that some of the
9750         x-appdomain wrappers are lax with types, so just ignore this for
9751         all wrappers.
9752
9753         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
9754         at the vtable->klass. If it is non-shared code we can just use the
9755         vtable.
9756
9757 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
9758
9759         * mini-ppc.c: access MonoDomain from tls, too.
9760
9761 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
9762
9763         * declsec.c: Removed unused variable (and related warning ;-)
9764
9765 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
9766
9767         * iltests.il: New test for LDELEMA on an array of ref types.
9768
9769         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
9770         all ldelema's on reftypes.
9771         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
9772         it was the wrong place to put it.
9773
9774         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
9775         register to pop to make this cleaner, at the request of Paolo.
9776
9777 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
9778
9779         * mini-ops.h (OP_GETHASHCODE): New op.
9780
9781         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
9782
9783         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
9784         operation.
9785
9786         For a microbenchmark, this reduces the cost of Hashtable.get_Item
9787         by 25%.
9788         
9789         * mini-x86.c (mono_arch_output_basic_block): Rather than
9790
9791         add ebp, 4
9792
9793         Emit
9794
9795         pop edx
9796
9797         The first is 3 bytes while the second is 1. This saves 36 kb on
9798         mscorlib, quite a big saving. When bootstraping mcs, I was able to
9799         see a small boost because of icache locality.
9800
9801         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
9802
9803 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
9804
9805         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
9806         started code sharing with the generic code.
9807
9808 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
9809
9810         * mini-ppc.c, cpu-g4.md: added code for direct access to
9811         tls data slots.
9812
9813 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
9814
9815         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
9816          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
9817         to OP_TLS_GET.
9818
9819 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
9820
9821         * declsec.c|h: Added functions to cache the declarative stack modifiers
9822         in MonoJitInfo and to create a security frame from a MonoJitInfo 
9823         structure.
9824         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
9825         created. Register internal calls for System.Security.SecurityFrame::
9826         _GetSecurityFrame and _GetSecurityStack.
9827         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
9828         the definitions for the new stack walk/callback mechanism.
9829         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
9830         first security frame for LinkDemands and InheritanceDemands) and
9831         GetSecurityStack for Demands. Both use the new mono_walk_stack code
9832         from lupus.
9833         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
9834         walk initialization (lupus).
9835
9836 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
9837
9838         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
9839         idiom.
9840         (handle_loaded_temps): Do not create a temporary variable for
9841         things that we know are temps. They will never be modified.
9842         (mono_spill_call): Set MONO_INST_IS_TEMP
9843         (mono_emulate_opcode): ditto
9844         (emit_tree): ditto
9845         (mono_method_to_ir.CEE_DUP): ditto
9846
9847 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
9848
9849         * mini.c (type_to_eval_stack_type): Make this handle the void type
9850         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
9851         (emit_tree): use ip_in_bb to special case some common idioms
9852         Update all callers to pass in the IP.
9853         (mono_method_to_ir): Make CEE_CALL* do the above as well.
9854
9855         This gives us a nice 2% speedup in mcs bootstrap.
9856
9857         * mini-x86.c (peephole_pass): Peephole pass to make
9858         mov  [foo], eax
9859         push [foo]
9860
9861         into
9862
9863         mov [foo], eax
9864         push eax
9865
9866         * mini.c (ip_in_bb): new method.
9867         (mono_method_to_ir): use this method rather than doing the hash
9868         lookup ourselves.
9869
9870         * linear-scan.c (mono_linear_scan): When expiring actives, you
9871         don't need to keep around variables that expire on this
9872         instruction. This makes it so that:
9873              a = b + 1
9874         will turn into:
9875              store (ebx add (ebx, 1))
9876         which will become
9877              add ebx, 1
9878
9879 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
9880
9881         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
9882         combination to avoid doing two copies. Fix up problems with previous
9883         patch.
9884
9885         * mini.c: Fix 64 bit warnings.
9886
9887         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
9888
9889 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
9890
9891         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
9892         changes from the x86 code.
9893
9894         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
9895
9896 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
9897
9898         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
9899         throwing code to reduce its size, unify the AOT and non-aot code and 
9900         get rid of relocations in the AOT case.
9901
9902         * mini-x86.h mini.c exceptions-x86.c 
9903         (mono_arch_get_throw_corlib_exception): New arch specific function to 
9904         raise corlib exceptions which doesn't require relocations in the 
9905         caller.
9906
9907         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
9908
9909 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
9910
9911         * mini.c (mono_emit_method_call): Only allocate the got var when it is
9912         needed.
9913
9914         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
9915         in the AOT case.
9916
9917 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9918
9919         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
9920         with add function when used from Inc/dec atomic 
9921         functions. Re-enabled optimization on x86.
9922         * mini-ops.h: renamed atomic_add functions to
9923         allow _add to match the Interlocked::Add and
9924         _add_next to match Interlocked::Inc/Dec.
9925
9926 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
9927
9928         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
9929         linking of BBs to the end BB, and enabled SSAPRE also with
9930         consprop and copyprop (which was prevented by that bug).
9931
9932 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9933
9934         * mini-x86.c: disabling the Interlocked optimizing code. 
9935
9936 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
9937
9938         * aot.c (load_aot_module): Move reading of got_addr after the AOT
9939         file version check.
9940         
9941 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9942
9943         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
9944         interlocked optimization due lack of support on x86, rewrote 
9945         exchange to take into account that base may be in eax.
9946         
9947         xsp works again; activated Interlocked optimizing code.
9948         
9949 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
9950
9951         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
9952
9953 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
9954
9955         * mini-ops.h: Add new opcodes.
9956
9957         * mini.h: Add new patch types. Add got_var to MonoCompile.
9958
9959         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
9960         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
9961         make it work with all kinds of patchable code.
9962
9963         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
9964         address of the GOT, and referencing entries in the GOT.
9965
9966         * mini.c: Add code to load the GOT address if needed by an opcode.
9967
9968         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
9969         independent AOT code on the x86 using an elf-style Global Offset Table.
9970
9971 2004-12-14  Raja R Harinath  <rharinath@novell.com>
9972
9973         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
9974
9975 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9976
9977         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
9978         when running xsp.
9979
9980 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
9981
9982         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
9983         of Interlocked:Increment/Decrement/Add as inline ops.
9984         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
9985
9986 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
9987
9988         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
9989         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
9990
9991 2004-12-12  Duncan Mak  <duncan@ximian.com>
9992
9993         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
9994         again. `patch_info->table_size' is no longer valid after Zoltan's
9995         commit #37636.
9996
9997 2004-12-12  Martin Baulig  <martin@ximian.com>
9998
9999         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
10000         if we are the "real" method, ie. not an inlined method inside it.
10001
10002 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
10003
10004         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
10005         before we look in the special fields table. This fixes
10006         ../tests/thread-static-init.cs.
10007
10008 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10009
10010         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
10011         for Array get_Rank and get_Length. Fixes bug #70465.
10012
10013 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
10014
10015         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
10016         separate structure to reduce the size of MonoJumpInfo.
10017
10018 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
10019
10020         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
10021
10022 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
10023
10024         * mini.c (mini_get_inst_for_method): Changed to allow ports
10025         to return a MonoInst instead of opcode 
10026         (renamed mini_get_opcode_for_method to better reflect the new functionality)
10027         
10028         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
10029         Allow ports to return a created MonoInst instead of op-code, will enable
10030         new optimizations.
10031         (renamed mini_get_opcode_for_method to better reflected the functionality)
10032
10033 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
10034
10035         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
10036
10037 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
10038
10039         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
10040         Fixes #69985.
10041
10042 2004-12-08  Martin Baulig  <martin@ximian.com>
10043
10044         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
10045         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
10046
10047 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
10048
10049         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
10050         correctly.
10051
10052         * exceptions.cs: Disable some tests which depend on properties of x86 fp
10053         arithmetic.
10054
10055 2004-12-08  Raja R Harinath  <rharinath@novell.com>
10056
10057         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
10058
10059 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
10060
10061         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
10062         bug introduced by the previous patch.
10063
10064 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
10065
10066         * mini-ppc.c, objectc.cs: handle large structs passed by value
10067         (fixes bug #69972).
10068
10069 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
10070
10071         * mini-ppc.c: OP_ARGLIST implementation from
10072         Geoff Norton  <gnorton@customerdna.com>.
10073
10074 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
10075
10076         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
10077         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
10078
10079 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
10080
10081         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
10082
10083 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10084
10085         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
10086         support.
10087
10088 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
10089
10090         * mini-sparc.c: Zero out localled-ed memory.
10091
10092         * iltests.il: Add tests for zeroing out localloc-ed memory.
10093
10094 2004-12-04  Martin Baulig  <martin@ximian.com>
10095
10096         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
10097         mono_method_get_signature_full().       
10098
10099 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
10100
10101         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
10102         and some utility functions (always for SSAPRE), integrated SSAPRE.
10103         * mini.h: Likewise.
10104         * driver.c: Added ssapre option.
10105         * ssa.c: Small fix on OP_ARG handling.
10106         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
10107         * Makefile.am: Likewise.
10108
10109 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
10110
10111         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
10112         now in the xp code.
10113
10114         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
10115         icall.
10116
10117 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10118
10119         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
10120         
10121         * cpu-s390.md : Increase instruction length of oparglist.
10122
10123         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
10124
10125 2004-11-30  Martin Baulig  <martin@ximian.com>
10126
10127         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
10128         virtual generic methods.  We call a special helper_compile_generic_method()
10129         icall to retrieve the method from the vtable, inflate and compile
10130         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
10131
10132         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
10133
10134 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
10135
10136         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
10137
10138 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
10139
10140         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
10141         Fixes #69929.
10142
10143 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
10144
10145         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
10146         platforms with PIC aot.
10147
10148 2004-11-28  Martin Baulig  <martin@ximian.com>
10149
10150         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
10151         Fixes gen-112.cs.
10152
10153 2004-11-28  Martin Baulig  <martin@ximian.com>
10154
10155         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
10156         the result of mono_type_get_underlying_type() to check whether
10157         we're byref.
10158
10159 2004-11-26  Martin Baulig  <martin@ximian.com>
10160
10161         * mini.c
10162         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
10163         in the g_assert().
10164
10165 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
10166
10167         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
10168         the same way as the other arguments so they won't get clobbered.
10169
10170         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
10171         calls through R11 since it is clobbered by the trampoline code.
10172
10173 2004-11-26  Raja R Harinath  <rharinath@novell.com>
10174
10175         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
10176         pick up in-tree mscorlib.dll.
10177
10178 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
10179
10180         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
10181
10182         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
10183         runtime data/code are now stored in a table similar to the GOT in ELF. 
10184         This allows the code itself to be position independent.
10185
10186         * aot.c: Fix loading of referenced assemblies after the lazy assembly
10187         loading changes.
10188
10189         * aot.c: Attach ELF type (object/function) directives to all global
10190         symbols.
10191
10192         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
10193
10194         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
10195
10196         * mini-amd64.h: Turn on PIC AOT code.
10197
10198         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
10199         returning the offset within an OP_AOTCONST instruction where the GOT
10200         offset needs to be added.
10201
10202         * mini.h: Bump AOT file format version.
10203
10204 2004-11-25  Martin Baulig  <martin@ximian.com>
10205
10206         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
10207         uninflated generic methods.
10208
10209 2004-11-25  Martin Baulig  <martin@ximian.com>
10210
10211         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
10212
10213 2004-11-24  Martin Baulig  <martin@ximian.com>
10214
10215         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
10216         original klass (this only applies for generic instances).
10217
10218 2004-11-24  Martin Baulig  <martin@ximian.com>
10219
10220         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
10221         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
10222         that array).
10223
10224 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
10225
10226         * mini.c (mono_method_to_ir): Disable inlining for methods containing
10227         localloc. Fixes #69678.
10228
10229         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
10230         
10231 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
10232
10233         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
10234         used SSE registers on pinvoke calls. Fixes #69774.
10235
10236 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
10237
10238         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
10239         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
10240
10241 2004-11-23  Raja R Harinath  <rharinath@novell.com>
10242
10243         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
10244         Refer directly to the mcs/ tree.
10245
10246 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10247
10248         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
10249         Check if a trampoline for a synchronized method is required. 
10250
10251 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
10252
10253         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
10254         with localloc if needed. Throe arithmetric exception in
10255         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
10256         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
10257
10258 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
10259
10260         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
10261         types before switching on type.  Fixes #69622.
10262
10263 2004-11-19  Raja R Harinath  <rharinath@novell.com>
10264
10265         * Makefile.am (check-local): New.  Integrate into 'make check'.
10266         (MCS,RUNTIME): Define using in-tree mono and mcs.
10267         (ILASM): New.
10268         (%.exe): Use $(ILASM).
10269
10270 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
10271
10272         * mini-ppc.c: adjust initial prolog size (bug #69691).
10273
10274 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
10275
10276         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
10277         #69664.
10278
10279 2004-11-17  Raja R Harinath  <rharinath@novell.com>
10280
10281         * Makefile.am (clean-local): Rename from 'clean'.
10282
10283 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10284
10285         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
10286         to mono_arch_is_int_overflow. 
10287         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
10288         SIGFPE events.
10289
10290 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
10291
10292         * declsec.c|h: New files to support declarative security attributes.
10293         Added function to check if a method has (applicable) security.
10294         * mini.c|h: Add check for declarative security attributes in
10295         mono_method_check_inlining.
10296         * Makefile.am: Added declsec.c and declsec.h to the build.
10297
10298 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
10299
10300         * mini.c, mini.h: update to keep dynamic code info per-domain.
10301
10302 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
10303
10304         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
10305         (mini_init): Get rid of it from here too.
10306
10307 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
10308
10309         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
10310         implemented OP_RETHROW (patch by Geoff Norton
10311         <gnorton@customerdna.com>).
10312
10313 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
10314
10315         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
10316         between appdomains.  Fixes appdomain-unload on PPC.
10317
10318 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
10319
10320         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10321         mini-exceptions.c: handle the new wrapper types.
10322         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
10323         token value as a MonoClass* when compiling a wrapper.
10324         mono_jit_create_remoting_trampoline now takes an additional
10325         MonoRemotingTarget parameter.
10326         
10327 2004-11-10  Martin Baulig  <martin@localhost>
10328
10329         * mini.c (mono_method_to_ir): Use `generic_container->context'
10330         rather than creating a new one.
10331
10332 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10333
10334         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
10335
10336         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
10337
10338 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
10339
10340         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
10341         the experimental aot cache stuff.
10342
10343 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
10344
10345         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10346         mini-exceptions.c: update to exception clause structure changes.
10347
10348 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
10349
10350         * exceptions-x86.c (throw_exception): Fix warnings.
10351
10352         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
10353         for OP_RETHROW.
10354
10355 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
10356
10357         * exceptions-sparc.c (get_throw_exception): Really fix this.
10358
10359 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
10360
10361         * tramp-*.c: we no longer support icalls without wrappers, so
10362         a bit of code can be removed here
10363
10364 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
10365
10366         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
10367         patch.
10368
10369         * cpu-sparc.md: Add op_rethrow.
10370
10371         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
10372
10373         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
10374
10375         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
10376         * mini-ops.h: Add OP_RETHROW.
10377
10378         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
10379
10380         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
10381
10382 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
10383         
10384         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
10385         Makes the output much easier to read
10386
10387 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
10388
10389         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
10390         prevents another huge leak when compiling with ssa. Secondly, the
10391         performance of doing this rather than freeing the lists is much
10392         better. GList does a lock every time you allocate a list link,
10393         so that it can use a memory pool. So, it is better to just use
10394         a memory pool of our own.
10395         
10396         * ssa.c, linear-scan.c: replace g_list_remove_link with
10397         g_list_delete.  The remove one does not free the GList, so we were
10398         leaking memory. On -O=all --compile-all with corlib, this cut down
10399         3 MB of allocations.
10400
10401 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
10402
10403         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
10404
10405         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
10406
10407         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
10408         into a new function mono_create_jit_trampoline ().
10409
10410 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
10411
10412         * trace.c (get_spec): Allow tracing of classes without a namespace.
10413
10414 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
10415
10416         * mini.c: Fix pointer overwrite in mini_method_compile.
10417
10418 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
10419
10420         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
10421         The darwin ABI needs some special handling for 1 and 2 byte structs
10422         Lets use lbz/lhz instead of lwz everywhere.
10423         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
10424         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
10425         Use stb/sth for the former, and put the latter always on stack instead of in
10426         argument registers.
10427
10428 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
10429
10430         * trace.c (is_filenamechar): Add '_'.
10431
10432 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
10433
10434         * mini-s390.c: Fix prolog length to allow for large trace requirements.
10435
10436         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
10437
10438 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
10439
10440         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
10441         depends on libmonogc. Fixes #68805.
10442
10443 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
10444
10445         * mini.c (mono_jit_free_method): Provide extra information for
10446         this error.  Currently this leaks, but will be turned into a
10447         developer option in the future.
10448
10449 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
10450
10451         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
10452
10453 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
10454
10455         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
10456         boundary. Fixes reading of PATCH_INFO_R4 and R8.
10457         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
10458
10459 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
10460
10461         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
10462         trampolines for AOT code.
10463
10464 2004-10-22    <vargaz@freemail.hu>
10465
10466         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
10467         constructed types. Fixes #68136.
10468
10469 2004-10-21  Martin Baulig  <martin@ximian.com>
10470
10471         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
10472         if it returns true, unwind the stack to the call instruction.
10473
10474 2004-10-21    <vargaz@freemail.hu>
10475
10476         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
10477
10478         * mini.h: Bump AOT version number.
10479
10480         * objects.cs: Add another test for unbox trampolines.
10481
10482         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
10483         valuetype methods.
10484
10485 2004-10-20    <vargaz@freemail.hu>
10486
10487         * driver.c: Add SHARED to the set of optimizations tested.
10488
10489         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
10490
10491         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
10492         used by CEE_NEWARR.
10493
10494         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
10495
10496 2004-10-20  Martin Baulig  <martin@ximian.com>
10497
10498         * mini-exceptions.c (mono_handle_exception): Call
10499         mono_debugger_handle_exception() to tell the debugger about
10500         catch/finally clauses.
10501
10502 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
10503
10504         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
10505
10506         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
10507         #68447.
10508
10509 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
10510
10511         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
10512         methods as their native size, fixed bug #57543, #57545.
10513         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
10514         This saves a temporary register and mullw call down into 1 (minor perf
10515         increase for cases like sum = sum * 5;  This use to translate into:
10516             li r11,5
10517             mullw r28,r28,r11
10518         It now translates to
10519             mulli r28,r28,5
10520
10521 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
10522
10523         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
10524         #68388.
10525
10526 2004-10-11  Martin Baulig  <martin@ximian.com>
10527
10528         * mini.c (mono_method_to_ir): If we're a generic method, get the
10529         MonoGenericContainer from our MonoMethodNormal and create a
10530         MonoGenericContext from it.
10531
10532 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
10533
10534         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
10535
10536         * basic-long.cs: Add test for checked i8->i2 cast.
10537
10538 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10539
10540         * inssel-ppc.brg: added a couple of speedup rules.
10541
10542 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
10543
10544         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
10545         to speed up rebuilds.
10546
10547 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10548
10549         * mini-s390.c: Minor fix to OP_OR_IMM.
10550
10551 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
10552
10553         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
10554         better. Fixes appdomain-unload.exe on sparc.
10555
10556 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
10557
10558         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
10559         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
10560         see bug 67324.
10561
10562 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
10563
10564         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
10565
10566 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
10567
10568         * mini.c: Always generate a field read/write wrapper for members
10569         of the class MarshalByRefObject since the actual instance could
10570         be a CBO.
10571
10572 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
10573
10574         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
10575
10576 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
10577
10578         * driver.c mini.h trace.c: Move the setting of the main assembly into
10579         a separate function called mono_trace_set_assembly () and call it after
10580         actually loading the main assembly. Fixes #66872.
10581
10582 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
10583
10584         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
10585         using the code manager.
10586
10587 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
10588
10589         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
10590
10591 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
10592
10593         * cpu-amd64.md: Fix bug in previous patch.
10594         
10595         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
10596         #66650.
10597
10598 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
10599
10600         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10601         mini-exceptions.c: updates for changed stack walk interface.
10602
10603 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10604
10605         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
10606
10607 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
10608
10609         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
10610
10611 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
10612
10613         * driver.c (mini_regression_list): Do not call mono_assembly_close 
10614         since assemblies can't be unloaded.
10615         
10616 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
10617
10618         * cpu-amd64.md: Fix more instruction lengths.
10619
10620         * cpu-amd64.md: Fix lengths of some instructions.
10621
10622 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
10623
10624         * inssel.brg: Make the array ldelema check aot friendly.
10625
10626 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
10627
10628         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
10629
10630         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
10631
10632 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
10633
10634         * mini-x86.c: Fix build.
10635
10636         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
10637         mono_type_get_underlying_type () helper function to simplify code.
10638         
10639 2004-09-09  Martin Baulig  <martin@ximian.com>
10640
10641         * mini-amd64.c: Don't access `type->data.klass' directly, call
10642         mono_class_from_mono_type() instead since the type may be a
10643         generic instance.
10644
10645 2004-09-09  Martin Baulig  <martin@ximian.com>
10646
10647         * mini-amd64.c (get_call_info): Fix support for generic instances.
10648         (add_valuetype): Use mono_class_from_mono_type() to get the class
10649         since we can be a generic instance.
10650
10651 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
10652
10653         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
10654
10655 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
10656
10657         * liveness.c: reset spill costs on each scan: bug 62107
10658
10659 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
10660
10661         * exceptions-sparc.c (mono_arch_find_jit_info): remove
10662         unnecessary line that doesn't compile
10663
10664 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
10665
10666         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
10667         trampolines, make them call an error function so people can fix their
10668         code.
10669
10670 2004-09-06  Martin Baulig  <martin@ximian.com>
10671
10672         * mini.c (mono_method_to_ir): When initializing locals, handle a
10673         generic instances like a valuetype if it's a valuetype and like a
10674         class if it's a class.
10675
10676 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
10677
10678         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
10679         stack. Fixes #64674.
10680
10681         * exceptions.cs: Add test for unwinding of call arguments.
10682
10683 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
10684
10685         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
10686         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
10687         set the carry/borrow flag). The sparc and s390 implementations
10688         can now use optimized versions (and simplify the code). ppc bugfixes.
10689
10690 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
10691
10692         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
10693
10694 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
10695
10696         * inssel-amd64.brg: Remove leftover 32 bit rule.
10697
10698         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
10699
10700 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
10701
10702         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
10703         mono_arch_find_jit_info functions into a new function. Fix a memory
10704         leak.
10705
10706         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
10707         refactored code.
10708         
10709 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
10710
10711         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
10712         as well.
10713         
10714         * exceptions.cs: Add array size tests.
10715
10716         * mini.c: Allocate a separate icall wrapper for each arity of 
10717         mono_array_new_va. Fixes #59509.
10718
10719         * exceptions.cs: Add testcase for 64578.
10720
10721         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
10722
10723         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
10724         
10725 2004-09-02  Martin Baulig  <martin@ximian.com>
10726
10727         * mini.c (mono_method_to_ir): When initializing the locals, call
10728         handle_initobj() on the generic instance itself, not its
10729         underlying type.
10730
10731 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
10732
10733         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
10734         MonoJitInfo for dynamic methods.
10735
10736         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
10737
10738         * mini.c: Add support for freeing JIT data for dynamic methods.
10739         
10740 2004-09-01  Martin Baulig  <martin@ximian.com>
10741
10742         * mini-x86.c (is_regsize_var): Added support for generic
10743         instances.
10744         (mono_arch_emit_prolog): Make this compile again, use
10745         `x86_push_imm_template (code)'.
10746
10747 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
10748
10749         * mini-x86.c: make all push_imm instructions that get
10750         patched always emit the long form
10751
10752 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
10753
10754         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
10755         in a per-domain hash.
10756
10757         * mini-amd64.c (merge_argument_class_from_type): Handle generic
10758         types.
10759
10760 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
10761
10762         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
10763         work.
10764         
10765         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
10766         work.
10767
10768         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
10769         Beginnings of SSE2 support.
10770
10771         * exceptions.cs: Add more tests for checked int<->uint casts.
10772
10773 2004-08-28  Martin Baulig  <martin@ximian.com>
10774
10775         * mini-x86.c (mono_arch_instrument_epilog): Added support for
10776         generic instances.
10777
10778         * mini.c
10779         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
10780         Handle generic instances recursively.
10781
10782 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
10783
10784         * iltests.il: test for conv.u8 on a constant
10785
10786 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
10787
10788         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
10789         LCONV_x4 (shrun_32 (membase)).
10790
10791 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
10792
10793         * inssel-x86.brg: c&p rules for push/setret of long
10794
10795 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
10796
10797         * inssel-x86.brg: c&p rules for compare (base, regvar) and
10798         compare (regvar, base)
10799
10800         * inssel-x86.brg: more burg love
10801
10802         * inssel.brg: more cleanup
10803
10804         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
10805
10806 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
10807
10808         * basic-long.cs, basic-calls.cs: new tests for optimization.
10809
10810 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
10811
10812         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
10813         patch.
10814
10815 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
10816
10817         * mini-amd64.c (read_tls_offset_from_method): Add another case.
10818         
10819 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
10820
10821         * inssel.brg (mini_emit_memcpy): use 
10822         NO_UNALIGNED_ACCESS to disable memcpy optimization
10823
10824 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
10825
10826         * mini-amd64.c: Handle generic types in various places.
10827
10828         * mini.c (mono_method_to_ir): Handle generic types in init locals.
10829
10830 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
10831
10832         * mini.c (handle_box): Fix warning.
10833
10834         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
10835
10836         * mini-amd64.h: Enable the emit_state optimization.
10837
10838         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
10839
10840         * mini-amd64.c: Add some new 64 bit peephole opts.
10841
10842         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
10843
10844         * cpu-amd64.md: sreg1 of div instructions must be %rax.
10845
10846         * mini-amd64.c: Register allocator fixes.
10847
10848         * mini.c: Add an optimization to emit_state to avoid allocation of new
10849         registers on some platforms.
10850
10851 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
10852
10853         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
10854
10855         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
10856         allocation. Fixes #63085.
10857
10858         * basic-long.cs: Add new regression test.
10859
10860         * mini-amd64.c: Register allocator improvements.
10861
10862 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
10863
10864         * mini-amd64.c (read_tls_offset_from_method): Add another code
10865         sequence.
10866
10867         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
10868         instruction sequence for nullifying class init trampolines.
10869
10870         * objects.cs: Add new regalloc test.
10871
10872         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
10873
10874 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
10875
10876         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
10877         
10878         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
10879         arguments.
10880
10881         * driver.c: Fix profiling after TLS changes.
10882         
10883         * driver.c (mono_main): Set mono_stats.enabled if needed.
10884
10885         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
10886         CEE_BOX.
10887
10888 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
10889
10890         * mini-x86.c: use a 1 op rather than a 2 op tls access
10891         instruction -> faster.
10892
10893 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
10894
10895         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
10896         x86 backend.
10897
10898 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
10899
10900         * exceptions-sparc.c (throw_exception): fix typo
10901
10902 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
10903
10904         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
10905         set tree->dreg correctly with tls. Allow any
10906         register to be used.
10907
10908         * mini-x86.c (read_tls_offset_from_method): add new code
10909         generation pattern seen with GCC.
10910
10911
10912 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
10913
10914         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
10915         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10916         exceptions-sparc.c: fix some performance issues in exception
10917         handling and setting of the stack trace for exceptions that were
10918         already thrown.
10919
10920 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
10921
10922         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
10923         x86 backend.
10924         
10925         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
10926         registers.
10927
10928 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
10929
10930         This patch inlines tls access, when possible.
10931         
10932         * mini.h: new arch functions for TLS intrinsics.
10933         All platforms updated with a stub.
10934
10935         * mini.c: use the new intrinsics
10936
10937         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
10938         arch specific intrinsic for tls variables
10939
10940 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
10941
10942         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
10943         under windows.
10944
10945 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10946
10947         * mini.c: thread local allocation
10948
10949 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
10950
10951         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
10952
10953         * Makefile.am: Link against the static version of libmonogc.
10954         
10955         * Makefile.am: Link the static versions of the convenience libraries
10956         into the mono executable.
10957
10958         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
10959
10960 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
10961
10962         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
10963         on integer overflow.
10964
10965         * mini-amd64.c: Reorganize function call code.
10966
10967         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
10968
10969 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10970
10971         * inssel-x86.brg: use xor eax,eax.
10972         
10973         * basic.cs: new tests
10974
10975 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10976
10977         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
10978         in exception throwing code.
10979         
10980 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10981
10982         * inssel-x86.brg: use xor esi,esi.
10983
10984 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10985
10986         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
10987         can trace methods compiled during mini_init () too.
10988
10989         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
10990         CEE_CONV_U4.
10991
10992 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10993
10994         * Makefile.am: static link on x86 (r=zoltan)
10995
10996 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10997
10998         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
10999         code since it causes some programs to fail.
11000
11001 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
11002
11003         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
11004
11005 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
11006
11007         * mini.c: ovfops_op_map - add STACK_OBJ case for
11008         CONV_I 
11009         * basic.cs: add test_0_pin_string as test
11010         case for above.
11011
11012 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
11013
11014         * Makefile.am: build C# if srcdir != builddir
11015
11016 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11017
11018         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
11019         fall-through blocks.
11020
11021 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11022
11023         * driver.c: enable loop by default again and include abcrem in -O=all.
11024
11025 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
11026
11027         * iltests.il: Add some localloc tests.
11028
11029         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
11030
11031         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
11032         Fixes #62574.
11033
11034         * inssel-amd64.brg: Add some optimizations.
11035
11036         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
11037         for gcc-3.4.
11038
11039         * Makefile.am: Statically link mono against libmono on AMD64.
11040         
11041         * mini-amd64.c inssel-amd64.brg: Optimizations.
11042
11043 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
11044
11045         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
11046
11047         * tramp-amd64.c: Patch calling code in trampolines.
11048
11049 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
11050
11051         * mini-amd64.c: pinvoke struct passing fixes.
11052
11053 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
11054
11055         * mini-sparc.c: redo change, make mono_arch_cpu_init call
11056         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
11057
11058 2004-08-05  Duncan Mak  <duncan@ximian.com>
11059
11060         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
11061         CEE_LDELEM_ANY.
11062
11063 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
11064
11065         * mini-amd64.c (emit_move_return_value): Move return value for normal
11066         calls too.
11067
11068 2004-08-05  Martin Baulig  <martin@ximian.com>
11069
11070         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
11071         `type->type'; just modify `type' itself when dealing with enums
11072         and generic instances.
11073         (check_call_signature): Make `simple_type' a `MonoType *'.
11074
11075 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
11076
11077         * mini.c: Use OP_PADD to add offsets to addresses.
11078
11079         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
11080
11081 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
11082
11083         * mini-sparc.c (mono_arch_emit_epilog): fix check
11084         for folding last op into restore instruction
11085
11086 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
11087
11088         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
11089         helper methods using the code manager.
11090         
11091         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
11092
11093         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
11094
11095 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11096         
11097         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
11098           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
11099
11100         * mini-s390.c: fix tail processing
11101
11102 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
11103
11104         * mini-ppc.c: mul.ovf.un exception name fix.
11105
11106 2004-08-03  Martin Baulig  <martin@ximian.com>
11107
11108         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
11109         instances; before jumping to `handle_enum', also modify `ptype'.
11110
11111 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
11112
11113         * cpu-sparc.md: fcall maximal length too small.
11114
11115 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
11116
11117         * mini-amd64.c mini.h: Add initial support for passing/returning 
11118         structures to/from pinvoked methods.
11119
11120 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
11121
11122         * mini-ppc.c: reg allocator fix.
11123
11124 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
11125
11126         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
11127
11128         * inssel.brg: Optimize memset on 64 bit machines.
11129
11130         * mini-amd64.c: Fix some vararg cases.
11131
11132 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11133
11134         * mini-s390.c: Corrected macro in emit_float_to_int
11135
11136         * s390-abi.cs: Tests to exercise the s390 ABI
11137
11138 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
11139
11140         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
11141         caller saved regs.
11142
11143         * basic.cs: Add a test for add.ovf.un.
11144
11145 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
11146
11147         * mini-sparc.c: add case for OP_IDIV_UN
11148
11149 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
11150
11151         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
11152         
11153         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
11154
11155 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
11156
11157         * basic.cs: regression tests.
11158
11159         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
11160         regressions.
11161
11162 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
11163
11164         * basic.cs: Add a new test.
11165
11166         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
11167         and AOT. Various fixes and optimizations.
11168
11169         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
11170
11171 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
11172
11173         * mini-ppc.c: make sure temp regs are not used for global reg
11174         allocation.
11175
11176 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
11177
11178         * cpu-sparc.md: conv_i8 fix for 64bits
11179
11180         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
11181
11182 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
11183         
11184         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
11185         add opcode for cmp BYTE PTR [eax], imm.
11186
11187         * inssel.brg: Make memcpy and memset takes bases.
11188
11189 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
11190
11191         * *-amd64.*: More AMD64 work.
11192         
11193 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
11194
11195         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
11196         add a compare-not-equal opcode.
11197         
11198 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
11199
11200         * mini.c: Use mono_init_from_assembly instead of mono_init.
11201         
11202 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
11203
11204         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
11205
11206         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
11207
11208         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
11209
11210         * inssel.brg: 64 bit fixes.
11211
11212         * mini.h (MonoCallInst): Add some AMD64 specific data.
11213
11214         * mini.h: Add some OP_P opcodes.
11215
11216 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
11217
11218         * basic.cs: tests for 61797 and 61740
11219
11220 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
11221
11222         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
11223         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
11224
11225 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
11226
11227         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
11228
11229         * *-amd64*.*: Ongoing AMD64 work.
11230
11231 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
11232
11233         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
11234
11235         * *-amd64*: Ongoing AMD64 work.
11236
11237         * mini-arch.h: Add AMD64 support.
11238
11239         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
11240
11241         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
11242
11243         * mini-ops.h: Add new opcodes.
11244
11245         * Makefile.am: Add AMD64 support.
11246
11247         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
11248         rules into the inssel-long*.brg files.
11249
11250         * *-amd64.*: Add beginnings of AMD64 backend.
11251
11252 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
11253
11254         * mini.c (print_dfn): commenting out the code that prints
11255         the cil. With -O=deadce, this makes -v -v crash.
11256         
11257         * cpu-pentium.md: make checkthis have a length of 2
11258
11259 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
11260
11261         * mini-sparc.h: fix implementations of __builtin
11262         functions for Sun compiler for V9.
11263
11264 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
11265
11266         * mini.c: use the new stelem.ref wrapper
11267         * exceptions.cs, arrays.cs: new stelem.ref tests
11268
11269 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11270
11271         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
11272         new XSP should work with these changes).
11273
11274 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
11275         
11276         * inssel-{long32,x86,}.brg: trivial optimizations.
11277         
11278 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
11279
11280         * mini.c: load value when emitting box operation in
11281         constrained calls.
11282
11283 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
11284
11285         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
11286         is one byte shorter than cmp DWORD PTR [eax], 0.
11287
11288 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
11289
11290         * inssel-ppc.brg: arguments on the stack are always
11291         relative to the stack pointer (spotted by Neale Ferguson).
11292
11293 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11294
11295         * exceptions-x86.c: delay appending the method name to the trace until
11296         after mono_jit_info_table_find is called, as this gets the real
11297         MonoMethod.
11298
11299 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
11300
11301         * aot.c: register roots
11302
11303 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
11304
11305         * aot.c : I could just use PLATFORM_WIN32 flag.
11306
11307 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
11308
11309         * aot.c : Reverting the previous fix. This time it broke linux build.
11310
11311 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
11312
11313         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
11314
11315 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
11316
11317         * mini.c (handle_stack_args): Remove some more debugging code.
11318         
11319         * mini.c (handle_stack_args): Remove debug output left in by mistake.
11320
11321         * driver.c mini.h aot.c: Allow additional options to be specified with
11322         --aot and pass them to mono_compile_assembly.
11323
11324         * aot.c: Add experimental code to AOT compile all loaded assemblies
11325         on demand and save the code into a cache in the filesystem.
11326
11327         * aot.c: Add support for more wrapper methods.
11328         
11329         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
11330         58863.
11331
11332         * cpu-*.md: Remove removed opcodes.
11333
11334         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
11335         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
11336         related icalls to marshal.c.
11337
11338 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
11339
11340         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
11341
11342         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
11343
11344         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
11345
11346 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
11347         * liveness.c: If liveness is recomputated we need to reset the information
11348         for each variable. This way, if the liveness range has been narrowed
11349         by optimizations that happened after the last computation, we can return
11350         a smaller range.
11351         
11352         For example, if you have
11353         
11354         {
11355                 int i = 0;
11356                 
11357                 // Tons of code that does not affect i
11358                 
11359                 i = foo ();
11360                 ...
11361         }
11362         
11363         i = 0 is dead code and will be removed by SSA. However, when
11364         linear scan gets to the code, i will still appear to be live
11365         throughout the entire block. This prevents good register allocation.
11366
11367 2004-07-06  Martin Baulig  <martin@ximian.com>
11368
11369         * debug-mini.c (mono_debug_init_method): Allow
11370         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
11371         (mono_debug_add_icall_wrapper): New method.
11372
11373         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
11374
11375 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
11376
11377         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
11378         optimization.
11379
11380 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
11381
11382         * aot.c (mono_aot_load_method): Fix loading of debug info.
11383
11384 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
11385
11386         * aot.c: Add logging support.
11387
11388 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
11389
11390         * mini.h: Add prototype for mono_print_method_from_ip.
11391
11392         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
11393
11394         * inssel.brg: 64 bit fixes.
11395
11396         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
11397         inssel-long32.brg.
11398
11399         * Makefile.am: Add SPARC64 support.
11400
11401 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
11402
11403         * aot.c: Fix alignment problems on 32 bit platforms.
11404
11405 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
11406
11407         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
11408         SPARC64.
11409
11410         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
11411         problems.
11412
11413         * mini.h: Bump AOT file version. Some 64 bit fixes.
11414
11415 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
11416
11417         * inssel-sparc.brg: Add new rule to avoid register moves.
11418
11419         * inssel.brg: Add ldind_to_load_membase helper function.
11420
11421 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
11422
11423         * mini.c: OffsetToStringData intrinsic.
11424         
11425 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
11426
11427         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
11428
11429         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
11430         regression tests.
11431
11432         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
11433 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11434
11435         * mini.c: reinstated mono_compile_get_interface_var()
11436         on x86, too, since the change breaks the Gtk# build there as well.
11437
11438 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11439
11440         * driver.c: remove loop from the default optimizations: it seems to
11441         interact badly with some of the other options (see bug #60613).
11442
11443 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
11444
11445         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
11446         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
11447
11448 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
11449
11450         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
11451         vararg-using methods.
11452
11453 2004-06-21  Martin Baulig  <martin@ximian.com>
11454
11455         * mini/mini-exceptions.c
11456         (mono_handle_exception): Added `gpointer original_ip' argument.
11457         After calling mono_unhandled_exception(), call
11458         mono_debugger_unhandled_exception() and if that returns true,
11459         restore the context and return.
11460
11461 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
11462
11463         * mini-ppc.c: prefer the use of relative branches so
11464         they won't need to be patched in aot code (patch from Patrick Beard).
11465
11466 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
11467
11468         * aot.c: patch from Patrick Beard to make the output assembly
11469         more correct for the MacOSX assembler. Small tweak to
11470         generate sane images on Linux/PPC, too.
11471
11472 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11473
11474         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
11475         case until bug #59509 is fixed (shows up in #60332).
11476
11477 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11478
11479         * mini.c: make sure the needed wrappers are compiled, too, with
11480         precomp.
11481
11482 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
11483
11484         * driver.c: remove NPTL reference in --version output.
11485
11486 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11487
11488         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
11489         generate valid assembly for the Mach-O assembler.
11490
11491 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
11492
11493         * driver.c: don't include abcrem in the all optimization specifier
11494         since it slows down jit compilation too much for now.
11495
11496 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
11497
11498         * mini.c: use BIGMUL only if both operands have the same signage.
11499         * iltests.il: Test for bug 60056. (errors related to signage in
11500         BIGMUL).
11501
11502         r=lupus.
11503
11504 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
11505
11506         * mini.c, aot.c: memory leak fixes.
11507
11508 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11509
11510         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
11511
11512 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
11513
11514         * Makefile.am: remove the -static hack completely, it links in
11515         statically glib as well.
11516
11517 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
11518
11519         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
11520         * exceptions.cs: make it compile with new mcs/csc.
11521
11522 2004-06-03 Massimiliano Mantione <massi@ximian.com>
11523         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
11524         and added relevant test case.
11525
11526 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
11527
11528         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
11529         regressions in gtk-sharp.
11530
11531 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
11532
11533         * exceptions.cs: New regression tests.
11534
11535         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
11536
11537 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
11538
11539         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
11540
11541 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
11542
11543         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
11544
11545         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
11546
11547 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
11548
11549         * mini.c (mono_jit_runtime_invoke): Init class in this
11550         method instead of trusting mono_jit_compile_method to
11551         do the work (because wrappers can be in object class)
11552
11553 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
11554
11555         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
11556
11557         * basic-long.cs: New regression test.
11558
11559 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
11560
11561         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
11562         and div/rem checks.
11563
11564 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
11565
11566         * Makefile.am: fix miguel's change to build mono statically against
11567         libmono (track build dependencies).
11568
11569 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
11570
11571         * cfold.c: Some glib versions do not have G_MININT32.
11572
11573 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
11574
11575         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
11576         with precision of tan, atan, sin and cos, and implemented related
11577         regressions tests (fixes bug 54467, but one new problem appeared and
11578         is not fixed yet).
11579
11580 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
11581
11582         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
11583
11584         * exceptions.cs: Add test for constant folding && division by zero.
11585
11586         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
11587         since driver.c is in libmono too, so the optimization was useless.
11588
11589         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
11590         variable to driver.c so the compiler can emit more efficient code to
11591         access them.
11592
11593 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11594
11595         * Makefile.am: don't distribute generated inssel.[ch] files.
11596
11597 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
11598
11599         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
11600         into the default appdomain. Fixes #58707.
11601
11602         * jit-icalls.c: Remove the broken approximation for truncl, doing
11603         no conversion is better.
11604
11605         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
11606         Fixes #58863.
11607
11608 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
11609
11610         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
11611         of the mcrxr instruction which is not available on some processors
11612         even if it's documented to be. Implement add and sub overflow correctly
11613         (still not complete for long unsigned). Speed up icalls a bit.
11614
11615 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
11616
11617         * mini.c (mono_jit_compile_method_with_opt): Make sure that
11618         we run .cctor in the current domain instead of target_domain.
11619         
11620         Fixes bug #58558, .cctor not being called in -O=shared.
11621
11622 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
11623
11624         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
11625
11626 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
11627
11628         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
11629         which can be done with an imm8, do it that way.
11630         (mono_arch_output_basic_block): ditto for a jmp
11631         (mono_arch_emit_prolog): Computate maximum offset of a label.
11632
11633 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
11634
11635         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
11636         now tries to allocate prefered physical reg's for virtual
11637         regs. This reduces the number of emited spills/loads with
11638         20-30% on our core assemblies.
11639
11640 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11641
11642         * jit-icalls.c: truncl() is not needed and trunc() is
11643         the correct thing to do anyway (bug #58287).
11644
11645 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
11646
11647         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
11648         if available.
11649
11650 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
11651
11652         * driver.c: enable loop optimizations by default.
11653
11654 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
11655
11656         * mini-x86.c: fix calc of max loop size when aligning loops start.
11657
11658 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
11659
11660         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
11661         the stack.
11662
11663 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
11664
11665         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
11666         should set carry.
11667
11668         * basic-long.cs: Add tests for add/subtract of immediates with carry.
11669
11670         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
11671         
11672         * mini.c (inline_method): Allways inline some wrappers even if the cost
11673         is too large. Fixes #58785.
11674
11675         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
11676         
11677 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
11678
11679         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
11680         (crichton@gimp.org). Beginning of support for sparc/linux.
11681
11682         * mini-sparc.c: Optimize retrieval of LMF address.
11683
11684 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
11685
11686         * exceptions-ppc.c:  handle alloca in methods with clauses.
11687
11688 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
11689
11690         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
11691
11692 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
11693
11694         * mini.c: Delegate most of the abort signal work to 
11695           mono_thread_request_interruption, which also handles Stop and Suspend
11696           states.
11697
11698 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
11699
11700         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
11701         supports the save/restore lmf opcodes.
11702
11703 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
11704
11705         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
11706         by gcc-3.4 as well.
11707
11708         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
11709
11710 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
11711
11712         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
11713         methods which contain array accesses.
11714
11715         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
11716         boundaries. Fixes #58537.
11717
11718         * iltests.il: Add regression test for #58537.
11719
11720 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
11721
11722         * mini-x86.c (mono_arch_local_regalloc): Last part of
11723         fix for bug #58633 (releasing register to early).
11724
11725 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
11726
11727         * basic-long.cs: Add new regression test.
11728
11729 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
11730
11731         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
11732         register too early on the chain.
11733
11734 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
11735
11736         * mini.c (create_helper_signature): Use a helper function to reduce
11737         the code which needs to be written. Also set the calling convention of
11738         icalls on windows. Fixes #57840.
11739
11740 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
11741
11742         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
11743         exceptions-ppc.c: added helper function to get the instruction address
11744         from a signal handler context.
11745
11746 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11747
11748         * helpers.c: use g_get_tmp_dir. Invokes happyness 
11749         from gonzalo.
11750
11751 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11752
11753         * helpers.c: Add new env variable to pass args to objdump.
11754         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
11755
11756 2004-05-17  Radek Doulik  <rodo@ximian.com>
11757
11758         * Makefile.am (common_sources): added abcremoval.h so it get
11759         disted and daily mono packages on go-mono.com will build again
11760
11761 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
11762
11763         * abcremoval.c: Fixed coding style, added copyright header.
11764
11765         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
11766
11767         * mini.h: Added prototype for abc removal main function.
11768
11769         * build_relations_propagation_table.pl: Added copyright header.
11770
11771 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
11772
11773         * basic-long.cs: reg test for complex ceq_long bug.
11774
11775 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
11776
11777         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
11778         reg in long and clob case (bug #58343). Fixed/added comments.
11779
11780 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
11781
11782         * mini.c (mono_jit_runtime_invoke): Follow new convention
11783         of calling the invoke method with an function pointer.
11784
11785 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
11786
11787         * ChangeLog: Fix author of memory leak patch.
11788
11789 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
11790
11791         * Makefile.am: fix make dist as well...
11792
11793
11794 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
11795
11796         * cfold.c: Made so that conversions from pointer to int4 are no-ops
11797         on archs where pointers are 4 bytes long.
11798
11799         * Makefile.am: Added abcremoval.c source file.
11800
11801         * abcremoval.c: Added abcremoval.c.
11802
11803         * abcremoval.h: Added abcremoval.h.
11804
11805         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
11806
11807         * inssel.brg: Enabled bounds check removal.
11808
11809         * mini.c: Added support for abcrem optimization.
11810
11811         * mini.h: Added abcrem optimization label.
11812
11813         * driver.c: Added support for abcrem optimization.
11814
11815         * propagated_relations_table.def: Added propagated_relations_table.def.
11816
11817 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
11818
11819         * mini.c, cfold.c: fix style.
11820
11821 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11822
11823         * mini.c: handle issue with the low-level implementation of
11824         some long opcodes (bug #54209).
11825
11826 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
11827
11828         * basic.cs: test for my new cmov stuff.
11829
11830 2004-05-13      Patrik Torstensson
11831
11832         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
11833         opt and added peephole documentation.
11834
11835 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
11836
11837         * tramp-ppc.c: rewrote the generic trampoline code.
11838
11839 2004-05-11      Patrik Torstensson
11840
11841         * mini-x86.c: optimize long shl/shr asm code (one less branch)
11842
11843 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
11844
11845         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
11846
11847         * mini.h mini.c dominators.c: Applied patch from Derek Woo
11848         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
11849
11850         * mini.c: Add new icalls for AsAny marshalling.
11851
11852 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
11853
11854         * tramp-ppc.c, mini-ppc.c: more cleanups.
11855
11856 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11857
11858         * mini.c: no warnings.
11859
11860 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11861
11862         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
11863
11864 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
11865
11866         * mini.c: In the thread abort signal handler, if the thread is in the
11867         process of being stoped, don't throw the Abort exception, just stop the
11868         thread.
11869
11870 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
11871
11872         * tramp-ppc.c: removed old code.
11873
11874 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11875
11876         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
11877         do some simple speed optimizations on ppc.
11878
11879 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
11880
11881         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
11882         and large offsets in load/store.
11883
11884 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
11885
11886         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
11887         it causes regressions.
11888
11889 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
11890
11891         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
11892         support.
11893
11894 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
11895
11896         * jit-icalls.c: remove warnings.
11897         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
11898         speedups for unsafe code.
11899
11900 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
11901
11902         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
11903
11904 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
11905
11906         * basic-calls.cs: Add new regression test.
11907
11908         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
11909         more portable.
11910
11911         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
11912
11913         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
11914         is no longer used.
11915
11916 2004-05-06      Patrik Torstensson
11917
11918         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
11919         long reg allocation in any reg (not only eax:edx) and implemented 
11920         long shl/shr ops in asm instead of helpers.
11921
11922 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
11923
11924         * mini-sparc.h: Fix warnings.
11925
11926         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
11927         stack.
11928
11929         * mini-exceptions.c (mono_handle_exception): Call the filter in a
11930         separate statement for clarity.
11931
11932         * mini-sparc.c: Update status.
11933
11934 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
11935
11936         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
11937         here.
11938
11939 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11940
11941         * inssel-ppc.brg: another small pre-release workaround:
11942         we don't do overflow detection for long_sub_un.
11943
11944 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11945
11946         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
11947         (also works around a weird ppc bug: 57957).
11948
11949 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
11950
11951         * tramp-ppc.c: trampoline fixes.
11952
11953 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
11954
11955         * mini-ppc.c: fixed typos.
11956
11957 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11958
11959         * mini-ppc.c, exceptions-ppc.c: more code saves registers
11960         at the top of the stack. Fixed typos. Use a frame registers
11961         for all the methods with exception clauses.
11962
11963 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11964
11965         * exceptions-ppc.c: restore fp registers.
11966
11967 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
11968
11969         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
11970         order from the stack top (moved the stack room to save the
11971         return value for trace after the param area). Fixed corruption
11972         in restoring registers on unwind.
11973
11974 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11975
11976         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
11977
11978 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11979
11980         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
11981         and prolog/epilog for methods that use it. Allow
11982         enough param area room for varargs methods. Fix miguel's
11983         breakage in exception handling.
11984
11985 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11986
11987         * Makefile.am: run genmdesc only on current arch.
11988
11989 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11990
11991         * exceptions-x86.c:
11992         * mini-x86.h: fix the build on windows.
11993
11994 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
11995
11996         * 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.
11997
11998         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
11999
12000         * mini-exceptions.c: New file.
12001         
12002         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
12003         Move some parts of the x86 exception handling code to an 
12004         arch-independent file so it can be shared with other ports.
12005
12006 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
12007
12008         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
12009
12010 2004-04-26  David Waite  <mass@akuma.org>
12011
12012         * driver.c: remove comma from end of enumeration declaration
12013
12014 2004-04-26  Jackson Harper  <jackson@ximian.com>
12015
12016         * driver.c: parse config file before loading first assembly. This
12017         allows the user gac to be enabled/disabled. 
12018         
12019 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
12020
12021         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
12022         simpler mechanism: we do not care what is encoded initially
12023         (branch absolute or relative), we care about the code and its
12024         target.  I kept the old code for reference for now.
12025
12026         The new code tries first to determine if the jump is anywhere in
12027         the -/+32 absolute meg range, if it succeeds, it encodes using the
12028         absolute branch;  If not, it tried to find something in the
12029         relative range, if not, it uses the handle_thunk code. 
12030
12031 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
12032
12033         * exceptions-ppc.c: use the correct ip register on macosx.
12034
12035 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
12036
12037         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
12038
12039 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
12040
12041         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
12042         Raise exception on integer divide by zero by hand since the hw
12043         doesn't support it. Handle NaNs in FP compares.
12044
12045 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
12046
12047         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
12048         code reducing duplication between the platforms and enabled
12049         signal exception handling (on linux for now).
12050
12051 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
12052
12053         * exceptions-ppc.c: more macosx support.
12054
12055 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12056
12057         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
12058
12059 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
12060
12061         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
12062
12063 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
12064
12065         * iltests.il: more tests.
12066
12067 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
12068
12069         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
12070         vars as well.
12071
12072 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12073
12074         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
12075
12076 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
12077
12078         * liveness.c: Mark variables as volatile in all basic blocks reachable
12079         from exception clauses.
12080
12081 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
12082
12083         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
12084         inlining.
12085
12086 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
12087
12088         * iltests.il, basic.cs: more tests for regalloc.
12089
12090 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12091
12092         * iltests.il: Some tests for register allocation modifications
12093         I have locally.
12094
12095 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
12096
12097         * exceptions.cs: Add regression test for bug #56782.
12098
12099         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
12100         original stack trace if an exception is rethrown. Fixes #56782. Oh,
12101         the beauty of fixing the same thing in 5 different files...
12102
12103 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
12104
12105         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
12106         methods.
12107
12108 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
12109
12110         * mini.c: Add support for STRWLPARRAY marshalling convention.
12111
12112 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12113
12114         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
12115         to init the context to setup the regs pointer).
12116
12117 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12118
12119         * exceptions-ppc.c: more exceptions work.
12120
12121 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12122
12123         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
12124         not allowed.
12125
12126 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
12127
12128         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
12129         can use the memory directly.
12130
12131         * cpu-pentium.md: Update documentation from a post from Zoltan. 
12132
12133         add x86_add_membase, x86_sub_membase, x86_mul_membase
12134
12135 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
12136
12137         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
12138         GENERAL_REGS they were also hardcoded for all PPC ports.
12139
12140         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
12141
12142         Remove hard-coded limit for floating point registers, use
12143         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
12144
12145         Notice that in MacOS X calling conventions you can fit a lot more
12146         floating point values in registers, so I should update the PInvoke
12147         test to excercise the passing of floating point values on the
12148         stack (currently broken).
12149         
12150 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
12151
12152         * tramp-ppc.c (create_trampoline_code): Added
12153         JUMP_TRAMPOLINE_SIZE. 
12154         (ppc_magic_trampoline): Follow the pattern from
12155         x86_magic_trampoline: if code is set to zero, return. 
12156         (create_trampoline_code): Always pass MonoMethod to the jump
12157         trampoline, before it was passing a null.
12158         (mono_arch_create_jump_trampoline): Implement the jump stub, could
12159         share the code with mono_arch_create_jit_trampoline. 
12160
12161         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
12162         implemented.
12163         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
12164         implemented.  
12165
12166         * cpu-g4.md: Added length for jmp instruction, the worst case
12167         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
12168         for save_lmf).
12169
12170 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
12171
12172         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
12173
12174 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
12175
12176         * mini.c: Only set bblock->real_offset when adding a new bblock, and
12177         before each IL instruction.
12178
12179         * mini.c (CEE_BOX): Fix warnings.
12180
12181 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12182
12183         * mini.c: removed a few unused vars and extra whitespace.
12184
12185 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
12186
12187         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
12188         checks.
12189         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
12190         index.
12191         (OP_GETCHR): use the above
12192         (CEE_LDELEMA): use the above.
12193
12194         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
12195         version of the generic impl.
12196         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
12197         (CEE_LDELEMA): use the above.
12198
12199 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
12200
12201         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
12202         Fixes #56317.
12203
12204         * iltests.il: Added new regression test for #56317.
12205
12206 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
12207
12208         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
12209         under NetBSD. Fixes #56450.
12210
12211         * liveness.c (update_gen_kill_set): Fix previous patch.
12212
12213 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12214
12215         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
12216
12217 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
12218
12219         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
12220         ldsfld and ldsflda.
12221
12222         * inssel-sparc.brg: Add more optimizations.
12223
12224         * mini-sparc.c: Replace multiply/divide with shifts if possible.
12225
12226 2004-04-01  Martin Baulig  <martin@ximian.com>
12227
12228         * mini.c (handle_box): New static function; moved the
12229         implementation of CEE_BOX here.
12230         (mono_method_to_ir): Added `constrained_call' variable.
12231         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
12232         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
12233         mono_method_get_constrained() to get the method.
12234
12235 2004-04-01  Martin Baulig  <martin@ximian.com>
12236
12237         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
12238         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
12239         (mono_method_to_ir): We don't need these macros anymore since
12240         mono_class_get_full() already takes care of it. 
12241
12242 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12243
12244         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
12245         use @function (as doesn't accept #function here) and check the return
12246         value of system and stop if fails.
12247
12248 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12249
12250         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
12251
12252 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
12253
12254         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
12255
12256         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
12257
12258         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
12259         #56223.
12260
12261         * basic-long.cs: Add test for negation of Int64.MinValue.
12262
12263 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
12264
12265         * mini-sparc.c: Update status.
12266
12267         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
12268
12269         * exceptions-sparc.c: Fix return value in filters.
12270
12271         * inssel-sparc.brg: Fix register allocation in some rules.
12272
12273 2004-03-28  Martin Baulig  <martin@ximian.com>
12274
12275         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
12276         if neccessary.  
12277
12278 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
12279
12280         * mini-x86.c (mono_arch_patch_code): Fix warnings.
12281         
12282         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
12283         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
12284         remove unused conv_u4 opcode.
12285
12286         * mini-x86.c: Remove valgrind workaround since it slows down things
12287         even when mono is not run under valgrind.
12288
12289 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
12290
12291         * mini-sparc.c: Update status.
12292
12293         * inssel-sparc.brg: Add some optimizations.
12294
12295         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
12296         future delay slot filling. Add support for varargs, tail calls and JMP.
12297
12298         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
12299         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
12300
12301         * inssel.brg: Fix register allocation in OP_ARGLIST.
12302
12303         * inssel.brg: Fix warnings.
12304
12305 2004-03-25  Martin Baulig  <martin@ximian.com>
12306
12307         * mini.c (inflate_generic_field): Removed.
12308         (mini_get_method): Removed, use mono_get_method_full(),
12309         (mini_get_class): Removed, use mono_class_get_full().
12310         (mono_method_to_ir): Pass our generic context to
12311         mono_field_from_token().        
12312
12313 2004-03-25  Martin Baulig  <martin@ximian.com>
12314
12315         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
12316         of a `MonoMethod *'.
12317         (mini_get_method): Take a `MonoGenericContext *' instead
12318         of a `MonoMethod *'.
12319         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
12320         a new local variable called `generic_context' which holds the
12321         current `MonoGenericContext *'; use it to lookup things.
12322
12323 2004-03-24  Martin Baulig  <martin@ximian.com>
12324
12325         * mini.c (mini_get_class): New static method; if we're inside a
12326         generic instance, inflate the class if neccessary.
12327         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
12328
12329 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
12330
12331         * iltests.il: New regression test for #55976.
12332
12333         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
12334         #55976.
12335
12336 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
12337
12338         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
12339         output.
12340
12341 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
12342
12343         * liveness.c: Consider SSA stores as well as loads when making vars
12344         volatile.
12345
12346         * exceptions.cs: New regression tests for register allocation.
12347         
12348 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
12349
12350         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
12351         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
12352           domain lock only to protect puntual access to data structures.
12353           Added access lock for sighash, jit_icall_hash_name, 
12354           jit_icall_hash_addr and domain->code_mp.
12355
12356 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
12357
12358         * driver.c: Print SIGSEGV handling method.
12359
12360         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
12361
12362         * mini.c (setup_jit_tls_data): Handle case when this is called
12363         multiple times for a thread.
12364
12365         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
12366         is different from fbxx_un. Fixes #54303. Also use constants instead of
12367         magic numbers in a lot of places.
12368
12369 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
12370
12371         * exceptions.cs: Fix cctor test when --regression is used.
12372
12373 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
12374
12375         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
12376         for Linux/ppc.
12377
12378 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
12379
12380         * inssel-ppc.brg: fixed register assignments for some rules.
12381
12382 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
12383
12384         * exceptions.cs: Add test for exceptions in static constructors.
12385
12386         * mini.c (mono_jit_compile_method_with_out): Move the calling of
12387         static constructors outside the domain lock. Fixes #55720.
12388
12389 2004-03-17  Martin Baulig  <martin@ximian.com>
12390
12391         * mini.c (get_generic_field_inst): Removed, this'll never happen.
12392         (inflate_generic_field): Take the `MonoMethod *' instead of the
12393         `MonoClass *' and added support for generic method.
12394         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
12395         have a `field->parent->gen_params', only inflate the field if it's
12396         an open constructed type.
12397
12398 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
12399
12400         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
12401         exception object instead of the preconstructed ones.
12402
12403 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12404
12405         * mini.c: reverted changed to sigsegv_signal_handler commited
12406         accidentally in the previous patch.
12407
12408 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12409
12410         * mini.c:
12411         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
12412         running --aot with an old assembly.
12413
12414 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
12415
12416         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
12417         point values.
12418
12419         * mini-sparc.c: Add support for v9 branches with prediction.
12420
12421 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
12422
12423         * mini.c (mini_init): #warning is GNUC only
12424
12425         * mini-sparc.h: implement __builtin_frame_address
12426         and __builtin_return_address for Sun C compiler
12427
12428 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
12429
12430         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
12431
12432 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
12433
12434         * basic-calls.cs: Add test for unaligned byref long argument passing.
12435
12436         * mini-ops.h: Add sparcv9 compare and branch instructions.
12437
12438         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
12439         v9 instructions if we have a v9 cpu.
12440
12441         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
12442         registers for global allocation.
12443
12444         * exceptions-sparc.c: Fixes.
12445         
12446 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
12447
12448         * liveness.c (mono_analyze_liveness): Optimized version.
12449
12450         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
12451
12452         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
12453         sparc work.
12454
12455         * basic-float.cs basic-calls.cs: New regression tests.
12456
12457 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
12458
12459         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
12460         sigaltstack implementation.
12461
12462         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
12463         
12464         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
12465         stuff if SIGSEGV_ON_ALTSTACK is not defined.
12466
12467 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
12468
12469         * mini.c: Fix warnings.
12470         
12471         * mini.c (mono_resolve_patch_target): New function which contains the
12472         arch independent part of the patching process.
12473
12474         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
12475         patching code to a separate function.
12476
12477 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
12478
12479         * mini.c (add_signal_handler): ifdef out on Windows
12480
12481 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
12482
12483         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
12484         cpu-sparc.md: Add exception handling support + other fixes.
12485
12486         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
12487         typed GC detection in --version.
12488
12489         * basic.cs exceptions.cs: New regression tests.
12490
12491         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
12492         the arch specific code can store data during a compilation.
12493
12494         * mini-ops.h: Add OP_SETFRET.
12495
12496         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
12497         function, register a separate icall for each arity, so the icalls can
12498         get a wrapper.
12499         
12500         * mini.c (mono_print_tree): Print negative offsets in a more readable
12501         form.
12502         
12503         * mini.c: Make signal handling work on sparc.
12504         
12505         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
12506
12507         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
12508
12509         * jit-icalls.c: Emulate truncl by aintl on solaris.
12510
12511         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
12512
12513 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
12514
12515         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
12516
12517 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
12518
12519         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
12520         a MarshalByRef type, inline a method that performs the check, taking into
12521         account that the object can be a proxy. Also implemented tow new opcodes:
12522         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
12523         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
12524         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
12525
12526 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
12527
12528         * mini-ppc.c: if a relative branch displacement is too big
12529         but it points to and area reachable with an absolute branch, 
12530         avoid the thunks.
12531
12532 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
12533
12534         * mini.c: optimize small copies in cpblk.
12535
12536 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
12537
12538         * basic-calls.cs basic-float.cs: New regression tests.
12539
12540         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
12541         negative offsets from %fp. Implement localloc. Fix local register 
12542         allocation. Fix the case when the this argument needs to be saved to
12543         the stack. Implement some missing opcodes.
12544
12545 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
12546
12547         * mini.c (mini_method_compile): Reenable global regalloc in methods
12548         with exception handlers.
12549
12550         * linear-scan.c (mono_varlist_sort): Fix warning.
12551
12552         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
12553
12554         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
12555         regalloc costs.
12556
12557         * liveness.c: Make all variables uses in exception clauses volatile, to
12558         prevent them from being allocated to registers. Fixes #42136.
12559
12560 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
12561
12562         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
12563         causes regressions.
12564
12565         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
12566         argument to mono_arch_regalloc_cost.
12567
12568         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
12569         precisely.
12570
12571 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
12572
12573         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
12574         Make the cost of allocating a variable to a register arch dependent.
12575
12576         * basic-calls.cs: Fix compilation of tests.
12577         
12578         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
12579         helper function to cut back on the number of #ifdefs needed.
12580
12581         * mini-ppc.c: Fix compilation.
12582
12583         * basic-calls.cs: New regression tests.
12584
12585         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
12586
12587         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
12588         of l0 since that is callee saved.
12589
12590         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
12591         to virtual calls.
12592
12593         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
12594         of delay instruction.
12595
12596         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
12597
12598         * mini.h (MonoCallInst): Add 'virtual' flag.
12599
12600         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
12601
12602 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
12603
12604         * *.cs: New regression tests.
12605
12606         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
12607         work.
12608
12609         * mini.c (mono_runtime_install_handlers): Fix build.
12610
12611         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
12612         'signal_stack_size' members.
12613
12614         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
12615         alternate signal stack.
12616
12617         * exceptions-x86.c: Add stack overflow handling.
12618
12619         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
12620         functions to arch independent code.
12621
12622         * mini.c (mono_print_tree): Print more detailed info for load_membase
12623         opcodes.
12624         
12625 2004-02-23  Martin Baulig  <martin@ximian.com>
12626
12627         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
12628
12629 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
12630
12631         * mini-x86.c: fixed reg allocation for div/rem.
12632
12633 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
12634
12635         * driver.c (mono_main): Report some configuratio options on --version.
12636
12637 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
12638
12639         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
12640         low in the address space. Correctly flush memory in thunks where we
12641         output native code.
12642
12643 2004-02-20  Martin Baulig  <martin@ximian.com>
12644
12645         * mini.c (mini_get_method): New static method; inflate all generic
12646         methods and methods in open generic instances.
12647         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
12648         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
12649
12650 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
12651
12652         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
12653
12654         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
12655
12656 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
12657
12658         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
12659
12660         * mini-sparc.c (flushi mono_arch_output_basic_block): make
12661         it compile using Sun's compiler.
12662
12663 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
12664
12665         * 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.
12666
12667         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
12668
12669 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
12670
12671         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
12672         code.
12673         * mini-ppc.c: handle calls outside of the allowed range with thunks
12674         allocated using the code manager.
12675         * tramp-ppc.c: use the code manager to hold generated native code.
12676         Fixed the magic trampoline to just patch vtable entries.
12677
12678 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
12679
12680         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
12681         independent file.
12682
12683 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
12684
12685         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
12686         PPC.
12687
12688         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
12689         if we have a working __thread implementation.
12690
12691         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
12692         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
12693
12694 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
12695
12696         * mini-x86.c: Fix compilation under gcc 2.
12697         
12698 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
12699
12700         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
12701         contains a call to the wrapped function.
12702
12703         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
12704         OP_<CALL>_IMM opcodes, and use them under X86.
12705         
12706         * mini.c (mono_jit_find_compiled_method): Fix warning.
12707
12708         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
12709
12710         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
12711
12712         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
12713         functionality to mini.c.
12714
12715         * mini.c (mono_create_jump_trampoline): New function to create a jump
12716         trampoline. Return a compiled method instead of a trampoline if it
12717         exists. Add a cache for jump trampolines.
12718
12719         * mini.c (mono_jit_find_compiled_method): New function to return a
12720         compiled method if it exists.
12721
12722         * mini-x86.c: Call mono_create_jump_trampoline instead of 
12723         mono_arch_create_jit_trampoline.
12724
12725         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
12726         a jump trampoline. Fixes #52092.
12727         
12728 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
12729
12730         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
12731         which is not up-to-date. Add check_corlib_version () instead.
12732
12733         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
12734         have to call it.
12735         
12736         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
12737         since newer valgrind versions do not need it.
12738
12739         * mini.c (mono_jit_compile_method_with_opt): New helper function to
12740         compile a method with a given set of optimizations.
12741
12742         * mini.c: Compile icall wrappers on-demand instead of at startup.
12743
12744         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
12745         wrapper for an icall.
12746
12747 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
12748
12749         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
12750         #54063.
12751
12752         * iltests.il: Add test for non-empty stack before switch instruction.
12753
12754 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
12755
12756         * mini.c: Add support for new stringbuilder marshalling conventions.
12757
12758         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
12759
12760 2004-02-01  Martin Baulig  <martin@ximian.com>
12761
12762         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
12763         in `ginst->mtype_argv'.
12764
12765 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
12766
12767         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
12768         facilitate grepping.
12769
12770 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
12771
12772         * mini.c: fixed buglet in initobj generic implementation for references.
12773
12774 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
12775
12776         * Makefile.am: make the version script conditional.
12777         * jit-icalls.c: handle missing truncl().
12778
12779 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
12780
12781         * exceptions.cs: Add more tests for double->int conversion.
12782
12783         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
12784         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
12785
12786 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
12787
12788         * driver.c: make --verbose --version emit an error
12789         if the loaded corlib doesn't match the runtime version.
12790
12791 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
12792
12793         * mini-ppc.h: export ppc_patch().
12794         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
12795         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
12796         on par or better than on MacOSX.
12797
12798 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
12799
12800         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
12801         mono_lookup_pinvoke_call.
12802
12803         * mini-x86.c: Under windows, the default pinvoke calling convention is
12804         stdcall. Fixes #52834.
12805
12806         * mini.c (optimize_branches): Add an upper bound to the number of
12807         iterations to prevent infinite loops on strange loops. Fixes #53003.
12808
12809 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
12810
12811         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
12812         and ISINST. Fixes #52093.
12813
12814         * objects.cs (test_0_vector_array_cast): New tests.
12815         
12816 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
12817
12818         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
12819         checking in Array.Set ().
12820
12821         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
12822         #52590.
12823
12824         * object.cs (test_0_multi_array_cast): New regression test.
12825
12826 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
12827
12828         * exceptions-ppc.c: fix build on Linux/PPC.
12829
12830 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
12831
12832         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
12833         running under valgrind.
12834         (x86_magic_trampoline): Fix build bustage.
12835
12836         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
12837         negative values as well. This is needed for the encoding of the line number
12838         info, since sometimes the line numbers are not in increasing order.
12839
12840 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
12841
12842         * cpu-pentium.md (localloc): Increase the size of the localloc 
12843         instruction since it is a loop under Win32.
12844
12845         * debug-mini.c (record_line_number): Get rid of unneccesary memory
12846         allocation.
12847
12848 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
12849
12850         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
12851         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
12852         Max Horn (max@quendi.de). Fix file names in comments.
12853
12854 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
12855
12856         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
12857         avoid stack overflow.
12858         (replace_usage): Avoid uninitialized variable warnings.
12859
12860         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
12861         and taking the address of valuetype variables.
12862
12863 2004-01-03  Patrik Torstensson
12864
12865         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
12866         for other purposes than FP later on.
12867
12868 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
12869
12870         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
12871         of tail calls.
12872
12873 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12874
12875         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
12876
12877 2003-12-30  Patrik Torstensson <p@rxc.se>
12878
12879         * mini-x86.h: Decreased number of availiable fp regs.
12880         Solves corner cases with FP spilling.
12881
12882 2003-12-23  Patrik Torstensson <p@rxc.se>
12883
12884         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
12885         for floating point stack tracking / spilling on x86. 
12886         Fixes bug #49012.
12887         
12888         * basic-float.cs: added float mul overflow test.
12889
12890 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
12891
12892         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
12893
12894 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12895
12896         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
12897         supports for cond branches that overflow the immediate
12898         overflow offset. mcs can compile simple programs.
12899
12900 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12901
12902         * exceptions-ppc.c: exception handling support wip:
12903         finally handlers get run on exception.
12904
12905 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
12906
12907         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
12908         profiling.
12909
12910 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
12911
12912         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
12913         initial support for stack walking and unwinding.
12914
12915 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
12916
12917         * driver.c (mono_main): Make corlib-out-of-sync message more 
12918         descriptive. Also remove verify_corlib call.
12919
12920 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
12921
12922         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
12923         not overlap with other call's arguments, too.
12924
12925 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
12926
12927         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
12928         move to arch-specific code the choice of arch-specific
12929         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
12930         * mini.c: ensure emulation calls will not interleave
12931         with other calls.
12932
12933 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
12934
12935         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
12936         the magic trampoline stack frame is dropped before executing
12937         the new method.
12938
12939 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
12940
12941         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
12942         and integer to fp conversions. Added support for overflowing
12943         arguments on the stack. Reserve a couple more registers as temps.
12944         Added support for aot compilation (as output still needs to be
12945         tweaked, though).
12946
12947 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12948
12949         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
12950         Don't overwrite return register in some corner cases.
12951
12952 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
12953
12954         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
12955         static constructors when AOT compiling.
12956
12957         * driver.c (mono_main): Call mono_check_corlib_version.
12958
12959 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12960
12961         * cpu-g4.md, basic.cs: fixed div target register.
12962
12963 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
12964
12965         * mini-ppc.c, basic.cs: shl_imm fix with test.
12966
12967 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12968
12969         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
12970         structures by value. Misc fixes.
12971         * objects.cs: more tests.
12972
12973 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
12974
12975         * mini-ppc.c: lconv.ovf.i implemented.
12976
12977 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12978
12979         * mini.c:
12980         (mini_init): don't error out if someone already called g_thread_init.
12981
12982 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12983
12984         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
12985         to be any type per the spec. Fix abnormal memory usage when
12986         the same object is repeatedly thrown.
12987
12988 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
12989
12990         * mini.c: check for overruns in IL code.
12991
12992 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
12993
12994         * TODO: Add/remove some todo entries.
12995
12996 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
12997
12998         * driver.c (mono_main): Call mono_verify_corlib.
12999
13000 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
13001
13002         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
13003         This has been moved to mini.c
13004         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
13005         type being casted is marshalbyref it could be a proxy, so instead of
13006         emitting the type check code, emit a call to a runtime method that will
13007         perform the check by calling CanCastTo if needed.
13008
13009 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
13010
13011         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
13012         methods with large stack frames under Win32.
13013
13014 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
13015
13016         * Makefile.am: Distribute regression tests.
13017
13018         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
13019         at the end instead of inserting each variable into the sorted list.
13020
13021         * linear-scan.c (mono_varlist_sort): New helper function.
13022         
13023 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
13024
13025         * mini.c: ensure arguments and locals are within bounds.
13026
13027 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13028
13029         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
13030         related fixes.
13031
13032 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
13033
13034         * mini.c (mono_cprop_copy_values): Fix crash.
13035
13036         * aot.c: Set verbosity back to 0.
13037         
13038 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
13039
13040         * regalloc.c: complete memory leak fix by Laurent Morichetti
13041         (l_m@pacbell.net).
13042
13043 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
13044
13045         * driver.c (main_thread_handler): Revert the previous patch.
13046
13047         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
13048         under valgrind.
13049
13050         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
13051         memory from the memory pool.
13052
13053         * driver.c (main_thread_handler): Turn on all optimizations when
13054         --aot is used.
13055
13056         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
13057         an array for better performance.
13058
13059         * regalloc.c (mono_regstate_assign): Fix memory leak.
13060
13061         * debug-mini.c (mono_debug_serialize_debug_info): New function to
13062         serialize the debug info.
13063
13064         * debug-mini.c (mono_debug_add_aot_method): New function to load the
13065         debug info from the serialized representation.
13066
13067         * aot.c: Save debug info into the generated file and load it when 
13068         loading a method.
13069
13070         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
13071
13072 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
13073
13074         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
13075         More FP-related fixes.
13076
13077 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
13078
13079         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
13080         and register allocation buglet. Hello world now runs.
13081
13082 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
13083
13084         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
13085         * tramp-ppc.c: fixed class init trampoline.
13086         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
13087
13088 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
13089
13090         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
13091         mini.c: more ppc changes/fixes.
13092
13093 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
13094
13095         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
13096         Also optimize the case when the arguments are the same in the caller 
13097         and in the callee.
13098
13099         * iltests.il: Add tests for tail calls with valuetype arguments.
13100
13101 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
13102
13103         * mini-ppc.c: fixes for struct return type.
13104
13105 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
13106
13107         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
13108         mono_spillvar_offset() to arch-specific code.
13109
13110 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
13111
13112         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
13113
13114 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
13115
13116         * exceptions-x86.c: Fix stack space leaks.
13117         
13118         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
13119         registers from the lmf if the method has save_lmf set.
13120
13121 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
13122
13123         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
13124         of icall wrappers into InvokeInDomain, since these are now per-domain.
13125
13126 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
13127
13128         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
13129         make some opcode emulation and intrinsic ops enabled/disabled 
13130         according to the architecture. More fixes.
13131
13132 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
13133
13134         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
13135
13136 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
13137
13138         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
13139         arch-specific handling for 'this' and struct return type to
13140         arch-specific code.
13141
13142 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13143
13144         * aot.c: prevent divide by zero error when reporting (it happened with
13145         Accessibility.dll).
13146
13147 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
13148
13149         * mini.h (inst_switch): Remove unused macro.
13150
13151 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13152
13153         * aot.c:
13154         (load_aot_module): free 'info->methods' and 'info' properly. No more
13155         "free(): invalid pointer blah" messages when you have an old aot
13156         compiled assembly.
13157
13158 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
13159
13160         * jit-icalls.c, mini.c: Added support for context static fields.
13161
13162 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
13163
13164         * mini.c (mono_method_blittable): Methods which set LastError are not 
13165         blittable either. Fixes #51108.
13166         
13167 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
13168
13169         * mini.c: flush icache.
13170         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
13171
13172 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
13173
13174         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
13175
13176 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
13177
13178         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
13179         safe on IA32.
13180
13181         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
13182         vararg calls.
13183
13184         * inssel.brg (CEE_MKREFANY): Fix AOT case.
13185
13186 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
13187
13188         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
13189         instruction when the result is discarded.
13190
13191         * iltests.il (test_0_div_regalloc): New regression test.
13192
13193         * arrays.cs: Fix compilation error.
13194
13195 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
13196
13197         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
13198         float rules to inssel-x86.brg: sane architectures with FP registers
13199         don't need to implement these rules.
13200
13201 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
13202
13203         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
13204
13205 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
13206
13207         * mini.h, inssel-long32.brg: fixed endianess issues in int64
13208         implementation of 32 bit systems.
13209
13210 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
13211
13212         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
13213         (Jeroen Zwartepoorte).
13214
13215 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
13216
13217         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
13218         the caller and the callee matches.
13219         
13220         * mini.c (mono_method_to_ir): Add comment.
13221
13222         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
13223         signbit is missing on some platforms.
13224
13225 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
13226
13227         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
13228
13229         * mini.c (setup_jit_tls_data): Call the new function.
13230         
13231         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
13232
13233         * mini-x86.c: Add experimental support for fast access to the lmf
13234         structure under NPTL/Linux 2.6.x.
13235
13236 2003-11-06  Martin Baulig  <martin@ximian.com>
13237
13238         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
13239         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
13240         the debugger.
13241
13242 2003-11-02  Martin Baulig  <martin@ximian.com>
13243
13244         * mini.c (inflate_generic_field): New static method.
13245         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
13246         generic instance and the field is declared in a generic type, call
13247         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
13248
13249 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
13250
13251         * mini.h mini.c (mono_method_same_domain): New function to return
13252         whenever the caller and the callee are in the same domain.
13253
13254         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
13255
13256 2003-10-30  Martin Baulig  <martin@ximian.com>
13257
13258         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
13259         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
13260         method parameters.
13261         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
13262         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
13263
13264 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
13265
13266         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
13267         propagation.
13268
13269         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
13270         object here, so it is in the correct appdomain etc.
13271
13272 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
13273
13274         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
13275         already done.
13276         (mono_method_to_ir): Avoid freeing the type created returned from
13277         mono_type_create_from_typespec, since it is put into an internal cache
13278         by the function. Fixes pointer.exe.
13279
13280         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
13281         trampolines for icalls and pinvokes as well. Fixes #33569.
13282
13283 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
13284
13285         * mini.c: Update after appdomain changes.
13286
13287         * mini.c (mono_jit_compile_method_inner): Allways compile native
13288         method wrappers in the root domain, since there can only be one
13289         instance of them, whose address is stored in method->info.
13290
13291 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
13292
13293         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
13294         environment variable. Instead detect automatically whenever running
13295         under valgrind using the magic macro RUNNING_ON_VALGRIND from
13296         valgrind.h.
13297
13298 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
13299
13300         * trace.c, trace.h: New files that implement the new trace option
13301         parsing. 
13302
13303         * driver.c: Document new --trace options.
13304
13305         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
13306         mini-x86.c: Apply:
13307
13308         -       if (mono_jit_trace_calls)
13309         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
13310
13311         * mini.h: prototypes.
13312         
13313 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
13314
13315         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
13316
13317         * mini.c inssel.brg: Implement typedefbyref opcodes.
13318
13319         * mini.c (mono_jit_compile_method): Remove unused local variable.
13320
13321         * mini.c (mono_jit_compile_method_inner): Ditto.
13322         
13323 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
13324
13325         * tramp-x86.c (x86_class_init_trampoline): Fix build.
13326         
13327         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
13328
13329 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
13330
13331         * mini.c (mono_no_aot): Remove unused global variable.
13332
13333         * mini.c: Thread safety fixes.
13334
13335 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
13336
13337         * mini.c (mono_create_class_init_trampoline): Add a lock around
13338         class_init_hash_addr.
13339
13340         * arrays.cs (test_0_newarr_emulation): Add new regression test for
13341         #30073.
13342
13343         * mini.c: Decompose the NEWARR instruction before decomposing its
13344         arguments. Fixes #30073.
13345
13346 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
13347
13348         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
13349         convention.
13350
13351 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
13352
13353         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
13354
13355         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
13356
13357         * driver.c: Add support for compiling icall wrappers to --compile.
13358
13359 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
13360
13361         * inssel.brg: The empty value in class->interface_offsets is -1, not
13362         0. Fixes #49287.
13363
13364 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
13365
13366         * objects.cs: New test for 'is' operator on an array of interfaces.
13367
13368 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13369
13370         * tramp-ppc.c: update trampoline code to support jumps
13371         and class initialization.
13372
13373 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
13374
13375         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
13376
13377         * inssel.brg (OP_UNBOXCAST): Fix #46027.
13378
13379         * inssel.brg (OP_UNBOX): Remove unused rule.
13380
13381         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
13382         region instead of one for each method. Fixes #47813.
13383
13384 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
13385
13386         * exceptions.cs (test_0_nested_finally): New regression test for
13387         nested exception handlers.
13388
13389         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
13390
13391         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
13392
13393         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
13394         inlining.
13395
13396         * mini.c (mono_method_check_inlining): Make the inlining limit 
13397         configurable by an environment variable.
13398         
13399         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
13400
13401         * mini.h: Bump AOT file version.
13402
13403         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
13404         token, store the image along with the token, since the token might not 
13405         refer to the same image as the method containing the relocation, 
13406         because of inlining.
13407
13408 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
13409
13410         * mini.c (mono_precompile_assemblies): New function to compile
13411         all methods in all loaded assemblies.
13412
13413         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
13414
13415         * regalloc.h regalloc.c (MonoRegState): Change the type of 
13416         iassign and fassign to int*, since they can contain large negative
13417         values if the register is spilled. Also added some comments. Fixes
13418         #45817.
13419
13420         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
13421         under Win32. Fixes #42964.
13422
13423 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
13424
13425         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
13426
13427         * aot.c: Added support for AOT compiling methods which contain calls
13428         to wrappers. Currently, only remoting-invoke-with-check wrappers are
13429         handled.
13430         
13431         * driver.c (compile_all_methods): Run the compilation in a thread
13432         managed by mono. Fixes #44023.
13433
13434         * mini.c (mono_codegen): Print full method name in verbose output.
13435
13436         * mini-x86.c (mono_arch_patch_code): Fix warning.
13437         
13438         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
13439         jumps, since the method we are jumping to might be domain-specific.
13440
13441         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
13442
13443 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13444
13445         * inssel.brg: string chars are unsigned.
13446
13447 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
13448
13449         * TODO: New todo item.
13450
13451         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
13452         which calls mono_runtime_class_init and patches the call site to
13453         avoid further calls.
13454         (mono_arch_create_class_init_trampoline): New arch specific function 
13455         to create a class init trampoline.
13456         (create_trampoline_code): Generalized so it can create
13457         class init trampolines as well.
13458
13459         * mini.c (helper_sig_class_init_trampoline): New helper variable.
13460         (mono_create_class_init_trampoline): New function to create and cache
13461         class init trampolines.
13462         (mono_find_class_init_trampoline_by_addr): New function to lookup the
13463         vtable given the address of a class init trampoline. Used by the
13464         patching process.
13465         (mono_codegen): Generate a call to a trampoline instead of
13466         mono_runtime_class_init in LDSFLD[A].
13467         (mono_codegen): Add relocations for the new trampoline.
13468         
13469         * mini.h mini-x86.c aot.c: Added a new relocation type: 
13470         MONO_PATCH_INFO_CLASS_INIT.
13471
13472         * mini.h: Bump AOT version number.
13473
13474         * aot.c: Create a copy of the loaded code instead of using the original
13475         so methods which call each other will be close in memory, improving
13476         cache behaviour.
13477         
13478         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
13479         patch since it breaks the regression tests.
13480         
13481         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
13482         for the register saving instruction sequence since the 
13483         frame_state_for function in glibc 2.3.2 don't seem to detect it.
13484
13485 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
13486
13487         * TODO: Fix todo item && remove another.
13488
13489 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
13490
13491         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
13492         previous checkin.
13493
13494         * aot.c: Moved the check for MONO_LASTAOT into the initialization
13495         function of the module.
13496
13497         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
13498         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
13499         --no-aot command line option.
13500
13501 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
13502
13503         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
13504         by Bernie Solomon (bernard@ugsolutions.com).
13505
13506         * inssel.brg: Refactor the interface offset table related code into
13507         its separate functions and add support for the AOT case.
13508
13509 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
13510
13511         * aot.c (mono_aot_get_method_inner): Fix memory leak.
13512         
13513         * aot.c: Added mono_aot_verbose variable and made all debugging
13514         output depend on the value of this variable.
13515
13516         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
13517         method_label and info_label.
13518
13519         * mini.h mini-x86.c aot.c: Added a new relocation type 
13520         MONO_PATCH_INFO_IID for klass->interface_id.
13521
13522         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
13523         the MonoJitInfo structure.
13524
13525         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
13526         a non-root appdomain in shared mode.
13527
13528 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13529
13530         * aot.c: make aot loader less verbose. Remove free of unused variable.
13531
13532 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
13533
13534         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
13535
13536         * .cvsignore: Added *.dll.
13537
13538         * mini.c (mono_print_tree_nl): New function callable while debugging.
13539
13540         * mini.c (mono_print_code): Export this.
13541
13542         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
13543         patched code.
13544
13545 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
13546
13547         * mini.h (MonoCompile): Added 'jit_info' field.
13548
13549         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
13550         the cfg structure, since it is needed by the AOT compiler.
13551
13552         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
13553
13554         * aot.c: A major rewrite. Changes include:
13555         - save exception tables for methods which have them.
13556         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
13557         to g_module_symbol.
13558         - reworked the file format so it is now much smaller and needs
13559         fewer relocation entries.
13560         
13561 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
13562
13563         * aot.c (load_aot_module): Fix build bustage on platforms without
13564         Boehm GC.
13565
13566 2003-09-04  Martin Baulig  <martin@ximian.com>
13567
13568         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
13569
13570 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
13571
13572         * TODO: Some new optimization ideas.
13573
13574         * aot.c: Move AOT module loading logic here from mono_assembly_open.
13575
13576         * aot.c: Save the optimization flags used to compile the code into
13577         the AOT module.
13578
13579         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
13580         support emitting domain specific code.
13581         
13582         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
13583         no longer domain neutral. It can be made domain neutral by compiling 
13584         with --optimize=shared.
13585
13586         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
13587         between appdomains.
13588
13589         * driver.c mini.h mini.c: New --no-aot debugging option which disables
13590         loading of AOT code.
13591
13592         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
13593         
13594         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
13595         if there is no domain neutrality information.
13596
13597 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
13598
13599         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
13600         format version into the generated library.
13601
13602         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
13603         callee method into the caller since one of them could be shared.
13604
13605         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
13606         system exceptions from AOT code now works.
13607
13608         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
13609         method if it is domain neutral and the callee is not.
13610
13611         * graph.c (cfg_emit_one_loop_level): Fix warning.
13612
13613 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
13614
13615         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
13616         last checkin.
13617
13618 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
13619
13620         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
13621         is needed  by code which is executed before mono_runtime_init ().
13622         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
13623         
13624         * mini.c (mono_thread_abort): Fix warning.
13625         (mono_jit_compile_method): Call static constructor in the AOT case too.
13626
13627         * aot.c (mono_compile_assembly): Fix warning.
13628
13629 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13630
13631         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
13632
13633 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
13634
13635         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
13636
13637         * cpu-pentium.md: Fix the length of call opcodes so they include the
13638         ESP restoring instruction. Fixes #47968.
13639
13640 2003-08-28  Martin Baulig  <martin@ximian.com>
13641
13642         * mini-x86.c (mono_arch_call_opcode): Added support for
13643         MONO_TYPE_GENERICINST.
13644
13645         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
13646
13647 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
13648
13649         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
13650         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
13651
13652         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
13653         metadata_section.
13654
13655 2003-08-26  Martin Baulig  <martin@ximian.com>
13656
13657         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
13658         when reporting an error, set this to the actual error location.
13659         (mono_method_to_ir): Report the correct error location if
13660         get_basic_blocks() returned an error.
13661
13662 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
13663
13664         * mini.c (mono_type_blittable): OBJECT is not blittable.
13665         (mono_method_blittable): Methods which have marshalling descriptors
13666         are not blittable either. Fixes #47842.
13667
13668 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
13669
13670         * driver.c mini.c: Use an environment variable instead of a global 
13671         variable. Also fix the build.
13672
13673         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
13674         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
13675         reporting this. 
13676
13677         * driver.c mini.c: Added --with-valgrind option to turn off some
13678         code which prevents mono from running under valgrind.
13679
13680         * mini.c (mono_emit_call_args): Fixed warning.
13681
13682         * mini.c (mono_emulate_opcode): Fixed warning.
13683
13684 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13685
13686         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
13687         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
13688         regalloc.c, regalloc.h: specify available registers in arch-specific
13689         code and support floats in the regallocator (patch by Laurent Morichetti 
13690         <l_m@pacbell.net>)
13691
13692 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13693
13694         * mini.c: mono_thread_current() can be called only after
13695         mono_runtime_init(): rearrange code to not call it early on.
13696
13697 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13698
13699         * mini.c: allocate jump tables in the code mempools.
13700
13701 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13702
13703         * mini.c, mini.h: make sure per-thread data allocated by the jit is
13704         freed.
13705
13706 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
13707
13708         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
13709         12 to 16.  This fixes bug #47453.
13710
13711
13712 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13713
13714         * mini-ppc.c: fixed indexed load and unsigned compares.
13715
13716 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
13717
13718         * mini.c: reenabled installation of handler for
13719           thread abort signal.
13720
13721 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13722
13723         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
13724         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
13725         until it's fixed and actually useful.
13726
13727 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13728
13729         * inssel-long32.brg: couple more opcodes implemented.
13730
13731 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
13732         
13733         * mini-sparc.c: Even more opcodes implemeted.
13734
13735 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
13736
13737         * mini-sparc.c: More opcodes implemented.
13738
13739 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
13740
13741         * mini-sparc.c: More opcodes implemented.
13742
13743 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
13744
13745         * inssel-sparc.brg: Add some needed rules.  Direct
13746         copy from PPC.
13747         * Makefile.am: Use inssel-sparc.brg
13748         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
13749         an assert happy for now.
13750
13751 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
13752
13753         * mini-sparc.c: Fixed compile errors.
13754         * exceptions-sparc.c: Same.  We now produce a mono binary 
13755         on sparc-linux.  Yea.
13756
13757 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
13758
13759         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
13760         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
13761         They compile, but do not work.
13762
13763 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13764
13765         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
13766         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
13767         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
13768         (ct@gentoo.org).
13769
13770 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13771
13772         * mini.c: more opcodes implemented and better support for generics.
13773
13774 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
13775
13776         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
13777         * mini.c, mini.h: first cut at generics support: some new instructions 
13778         added and changed the behaviour of some of the existing ones.
13779
13780 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
13781
13782         * mini.c: Removed definition of metadata_shared mutex here.
13783
13784 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
13785
13786         * mini-x86.c: make vararg calls work for instance methods.
13787
13788 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13789
13790         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
13791         returns the arguments in a separte list, now.
13792
13793 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13794
13795         * aot.c, mini.c: updates for array type representation changes.
13796
13797 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
13798
13799         * mini.c: register function to perform jit shutdown.
13800
13801 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13802
13803         * mini.c: use a faster allocator if possible.
13804
13805 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13806
13807         * aot.c: some cleanups and portability changes.
13808
13809 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13810
13811         * mini.c: use faster allocation for CEE_BOX if possible.
13812
13813 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13814
13815         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
13816         Moved inlined mempcy code to its own function so that is can be
13817         reused. Added an inline memset function as well (optimized initobj).
13818         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
13819
13820 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13821
13822         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
13823
13824 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13825
13826         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
13827         arch code can setup the cpu for CLR execution, if needed.
13828         We use it on x86 to set the precision of FP operations.
13829
13830 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13831
13832         * mini.c: disable some optimizations if we can guess they'll cost too
13833         much for a given method.
13834
13835 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13836
13837         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
13838         
13839 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13840         * mini.h mini.c mini-x86.c: Added instruction level coverage 
13841         info collection support.
13842
13843 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13844
13845         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
13846         is now implemented in the profiling API. Get rid of a couple of
13847         unnecessary global variables.
13848
13849 2003-06-15  Nick Drochak <ndrochak@gol.com>
13850
13851         * basic-long.cs: tests for negative values for bigmul, and unsigned.
13852         * cpu-g4.md: add op_bigmul and op_bigmul_un
13853         * cpu_pentium.md: add op_bigmul_un
13854         * inssel-long32.brg: add rule for unsigned bigmul
13855         * mini-ops.h: define OP_BIGMUL_UN
13856         * mini-x86.c: THE BUG: handle (un)signed properly
13857         * mini.c: choose unsigned opcode if needed.
13858         This set of patches fixes bug #44291
13859
13860 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
13861
13862         * mini.c (optimize_branches): improved to handle all kinds of
13863         conditional branches.
13864
13865 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13866
13867         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
13868         don't raise exceptions.
13869
13870 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13871
13872         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
13873         to arch-specific files.
13874
13875 2003-06-09  Martin Baulig  <martin@ximian.com>
13876
13877         * Makefile.am (libs): Added $(LIBGC_LIBS).
13878
13879 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
13880
13881         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
13882         and OP_ATAN (fixes bug#44293).
13883
13884 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
13885
13886         * Makefile.am, mini-x86.c: rename cpu description array to
13887         pentium_desc, since some compilers define the 'pentium' preprocessor
13888         symbol.
13889
13890 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
13891
13892         * mini.c (mini_select_instructions): add explicit branch if the
13893         following block is not the false target of a conditional branch -
13894         we need this with any optimization that reorder or remove bblocks
13895
13896         * mini.c (optimize_branches): bug fixes
13897
13898 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
13899
13900         * mini.c (mono_method_to_ir): inline static readonly fields
13901
13902         * ssa.c (fold_tree): start cfold support for long (very simple
13903         cases only)
13904
13905         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
13906
13907 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13908
13909         * inssel.brg: fixed memcpy (bug #44219).
13910
13911 2003-06-05  Dick Porter  <dick@ximian.com>
13912
13913         * driver.c: Set the glib log levels to not abort if g_message
13914         recurses.
13915
13916         g_set_prgname() has to happen before mini_init() so that the
13917         process handle gets the info.
13918         
13919 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13920
13921         * driver.c: add intrins to the default optimizations to get wider
13922         exposure.
13923
13924 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13925
13926         * mini.h: some large basic blocks will overflow a 16-bit
13927         integers for symbolic registers.
13928
13929 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13930
13931         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
13932         (mono_arch_output_basic_block): fix bug 43499 
13933
13934 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13935
13936         * mini.c: kill duplicated definition of mono_debug_format.
13937
13938 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13939
13940         * mini-x86.c, arrays.cs: fixed register allocation bug.
13941
13942 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13943
13944         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
13945
13946         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
13947
13948 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13949
13950         * mini.c:
13951         (print_method_from_ip): also print source location information if
13952         available.
13953
13954 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
13955
13956         * mini.c (mono_find_block_region): bug fix in region code
13957         (mini_method_compile): enable removing unreachable code again, but
13958         only in methods without exception clauses.
13959
13960 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
13961
13962         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
13963         Implemented arglist opcode and handling of TypedReference type.
13964         Fixed x86 call convention when a structure is returned.
13965         Minimal support for calling static vararg methods.
13966
13967 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
13968
13969         * mini.c (mini_method_compile):  always remove unreachable code,
13970         because the code in them may be inconsistent  (access to dead
13971         variables for example).
13972
13973 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13974
13975         * driver.c, debug-mini.c: warning fixes.
13976
13977 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13978
13979         * Makefile.am, jit.h, mini.h: install header for embedding mono.
13980
13981 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
13982
13983         * mini.c: thread-static fields are registered in mono_class_vtable(),
13984         so ensure the function is called before checking for them.
13985
13986 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
13987
13988         * mini.c (optimize_branches): fix for bug 43586
13989
13990         * jit-icalls.c (mono_llmult_ovf): added an additional check for
13991         overflow (fixes Bug #43639)
13992
13993 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13994
13995         * mini.c, objects.cs: allow the use of stobj for primitive types.
13996
13997 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13998
13999         * mini.c: be less strict about argument checking until we support
14000         running the verifier.
14001
14002 2003-05-27  Nick Drochak <ndrochak@gol.com>
14003
14004         * basic-long.cs: tests for (ulong)int * (ulong)int also
14005         * mini.c: use the same trick for (ulong)int * (ulong)int
14006
14007 2003-05-27  Nick Drochak <ndrochak@gol.com>
14008
14009         * basic-long.cs: add regression test for (long)int * (long)int
14010         * cpu-pentium.md: add op_bigmul specification
14011         * inssel-long32.brg: add OP_BIGMUL rule
14012         * mini-ops.h: add OP_BIGMUL
14013         * mini-x86.c: register allocator: handle case where src1 needs to be
14014         in EAX.
14015         * mini.c: substitute special BIGMUL opcode in the tree for 
14016         (long)int * (long)int
14017
14018 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
14019
14020         * jit-icalls.c: call the type ctor on field access if needed.
14021
14022 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14023
14024         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
14025         to a method (including results of ldelema, bug#43207).
14026
14027 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
14028
14029         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
14030         colors to show exception handler blocks.
14031
14032         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
14033         (fix for pinvoke7.cs).
14034
14035 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14036
14037         * mini.h, mini.c: ensure correct initialization order for types that
14038         require it. Prepare for lazy compilation of jit icall wrappers.
14039         Provide a name for opcode emulation to reduce unneeded mallocing.
14040
14041 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
14042
14043         * mini-x86.c: better register restoring code and profiling
14044         support for tail calls.
14045
14046 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14047
14048         * mini.h, driver.c: prepare for leaf methods optimization.
14049
14050 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14051
14052         * mini.c: get targets of branches before converting a method.
14053
14054 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
14055
14056         * mini.c (optimize_branches): added some experimental code (disbaled) 
14057
14058 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
14059
14060         * mini.c (optimize_branches): fix branch to branch optimization 
14061
14062         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
14063
14064         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
14065
14066         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
14067
14068         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
14069         if needed.
14070
14071 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
14072
14073         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
14074         enable use of interface variables again.
14075
14076         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
14077         I1 to registers because there is no simply way to sign extend 8bit
14078         quantities in caller saved registers on x86.
14079
14080         * inssel-float.brg: set costs of some rules to 2 so
14081         that monobure always select the arch. specific ones if supplied,
14082         regardless of the order we pass the files to monoburg.
14083
14084 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
14085
14086         * mini.c, mini-x86.c: since the magic trampoline for jumps
14087         can't patch the code directly, we do it as soon as the
14088         method gets compiled.
14089
14090 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14091
14092         * mini-x86.c, mini.h: introduce a new patching method
14093         to support CEE_JMP and tail calls.
14094         * mini.c: obey tail.call. Don't precompile methods target
14095         of CEE_JMP.
14096         * tramp-x86.c: new trampoline code to handle methods
14097         reached through a jump.
14098
14099 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
14100
14101         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
14102         bit values to registers
14103
14104 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
14105
14106         * mini.c (mono_compile_get_interface_var): share interface
14107         variables if possible.
14108
14109 2003-05-16  Martin Baulig  <martin@ximian.com>
14110
14111         * debug-mini.c (mono_init_debugger): New function to initialize
14112         the debugger.  This is not in the debugger since it needs to
14113         access some of mini's internals.
14114
14115 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
14116
14117         * mini.c (mono_method_to_ir): inlining fixes/cleanups
14118
14119 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
14120
14121         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
14122         for value type handling.
14123
14124 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
14125
14126         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
14127         (mono_method_check_inlining): enable inlining of all kinds of wrappers
14128
14129 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
14130
14131         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
14132           the constructor through a proxy.
14133
14134 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14135
14136         * jit-icalls.c, inssel.brg: fixes to array element address
14137         calculations.
14138
14139 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
14140
14141         * mini-x86.c (is_regsize_var): allocate pointer to registers
14142
14143 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14144
14145         * driver.c: fixed typo, added intrins to the set of optimizations
14146         tested with regressions.
14147
14148 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14149
14150         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
14151         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
14152         test case.
14153
14154 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
14155
14156         * inssel.brg: remove some common pop instructions without side effects
14157
14158 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14159
14160         * inssel-x86.brg: fixed thinko in int to double conversions.
14161
14162 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
14163
14164         * mini.c, jit-icalls.c: added runtime thread-static variable support.
14165
14166 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14167
14168         * inssel-long32.brg: two more missing instructions.
14169
14170 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
14171
14172         * mini.c (mono_emit_call_args): set the cil_code for all arguments
14173         if not already set.
14174
14175 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
14176
14177         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
14178         correctly.
14179
14180         * basic-float.cs: Added tests for negative zero.
14181
14182 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14183
14184         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
14185         a couple of missing operations for long casts, with test cases.
14186
14187 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14188
14189         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
14190
14191 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
14192
14193         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
14194         code size estimation.
14195
14196 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
14197
14198         * mini.c (mono_jit_create_remoting_trampoline): make it work with
14199         abstract methods (fix bug 42542)
14200
14201         * aot.c: add ability to handle array types
14202         
14203 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
14204
14205         * mini.c: Call the _specific versions of the object allocation
14206         functions if possible.
14207
14208 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
14209
14210         * driver.c: call setlocale ().
14211
14212 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14213
14214         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
14215         windows build.
14216
14217 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
14218
14219         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
14220
14221         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
14222         wrappers (fix bug 42122)
14223
14224 2003-05-04  Martin Baulig  <martin@ximian.com>
14225
14226         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
14227
14228         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
14229         s/mini_set_defaults/mono_set_defaults/g.
14230
14231 2003-05-04  Martin Baulig  <martin@ximian.com>
14232
14233         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
14234
14235 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14236
14237         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
14238         (reported by Don Roberts).
14239
14240 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
14241
14242         * mini.c: temporarily work around two bugs for this release.
14243
14244 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14245
14246         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
14247         that contains -export-dynamic and it makes using the ld script
14248         useless.
14249         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
14250
14251 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14252
14253         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
14254         specific cpu.
14255
14256 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14257
14258         * mini.c: make sure leave calls all the needed finally blocks,
14259         even when the target jumps out of multiple exception clauses.
14260
14261 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14262
14263         * ldscript, Makefile.am: add linker script to reduce the number of
14264         exported symbols (should also fix the issues with libwine defining
14265         some of the same symbols in io-layer).
14266
14267 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
14268
14269         * driver.c (mini_main): Avoid assertion when no file name is given on 
14270         the command line.
14271
14272 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
14273
14274         * driver.c: added --version/-V command line option.
14275         Added the inline optimization in the regression tests.
14276
14277 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14278
14279         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
14280         to the type in the method signature (fixes bug#42134).
14281
14282 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
14283
14284         * mini.c: when inlining, check this is not null only when needed (bug #42135).
14285
14286 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
14287
14288         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
14289
14290 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14291
14292         * driver.c: fixed bug #42100.
14293
14294 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
14295
14296         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
14297
14298 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
14299
14300         * mini.c: moved most of the code required to do inlining to its own
14301         function so it can be reused. Inline also ctors if appropriate.
14302
14303 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
14304
14305         * Makefile.am: Link with -export-dynamic so shared libs loaded by
14306         the runtime can call mono API functions.
14307
14308 2003-04-27  Martin Baulig  <martin@ximian.com>
14309
14310         * debug-mini.c (mono_debug_init_method): Added
14311         `guint32 breakpoint_id' argument; if the method has a breakpoint,
14312         send a notification to the debugger.
14313
14314         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
14315         running in the Mono Debugger, just pass the breakpoint number to
14316         mono_debug_init_method().
14317
14318         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
14319
14320 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
14321
14322         * mini.c: allow some more unsafe compares.
14323
14324 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14325
14326         * mini-x86.c, Makefile.am: make distcheck works (partially from
14327         a patch by Richard Lee <r.h.lee@attbi.com>).
14328         * regset.c, regset.h: removed, they are unused.
14329
14330 2003-04-25  Dick Porter  <dick@ximian.com>
14331
14332         * driver.c: Usage reports the name as 'mono' not 'mini'
14333         * exceptions-x86.c: Build and run on freebsd
14334
14335 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
14336
14337         * Makefile.am: install the program with the 'mono' name and
14338         the library as libmono instead of mini and libmini.
14339
14340 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14341
14342         * driver.c: provide the APIs for the embedding interface of the old jit.
14343
14344 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
14345
14346         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
14347
14348 2003-04-23  Martin Baulig  <martin@ximian.com>
14349
14350         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
14351
14352         * driver.c: Added `--debug' command line argument to enable
14353         debugging support.
14354
14355 2003-04-23  Martin Baulig  <martin@ximian.com>
14356
14357         * debug.[ch]: Removed.  The code is now in
14358         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
14359
14360         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
14361         last six months.
14362
14363 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
14364
14365         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
14366
14367 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14368
14369         * mini.c:
14370         (mini_cleanup): moved mono_runtime_cleanup call after the call to
14371         mono_domain_finalize.
14372         (mini_method_compile): use mono_method_profile* if the the option is
14373         enabled.
14374
14375 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
14376
14377         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
14378         methods with their wrapper.
14379
14380         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
14381         methods with their wrapper.
14382
14383         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
14384         their wrapper.
14385
14386         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
14387         wrapper.
14388
14389         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
14390         methods.
14391
14392 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
14393
14394         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
14395
14396 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
14397
14398         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
14399         of the mempool. This is slightly faster and uses less memory
14400
14401 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14402
14403         * mini.c: avoid O(n) allocation for variables.
14404
14405 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14406
14407         * mini.c: handle items on the stack after inlining methods.
14408
14409 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14410
14411         * mini.c: make the method->opcode optimization dependent
14412         on MONO_OPT_INSTRINS and do it lazily.
14413
14414 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14415
14416         * driver.c: print overall results at the end of regression run.
14417
14418 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
14419
14420         * inssel.brg: don't overwrite symbolic registers.
14421
14422 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
14423
14424         * inssel-x86.brg: fix conversion from long to float.
14425
14426 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
14427
14428         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
14429
14430 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
14431
14432         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
14433
14434         * driver.c: Added --print-vtable option as in the old JIT.
14435
14436 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14437
14438         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
14439
14440 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
14441
14442         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
14443
14444 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
14445
14446         * mini.c regalloc.c regalloc.h: Fix memory leak.
14447
14448 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
14449
14450         * aot.c (mono_aot_get_method): register all used strings
14451
14452 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14453
14454         * mini.c: always intern strings references with ldstr at compile time.
14455
14456 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14457
14458         * Makefile.am: add BUILT_SOURCES.
14459
14460 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
14461
14462         * driver.c: give a better error message when the assembly to execute
14463         doesn't have an entry point.
14464
14465 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
14466
14467         * Makefile.am: added hack for automake
14468
14469         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
14470         correct sematics.
14471
14472         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
14473
14474 22003-04-07  Martin Baulig  <martin@ximian.com>
14475
14476         * Makefile.am: Added Makefile.am.
14477
14478         * debugger-main.c: Removed, this is now in the debugger where it
14479         belongs.
14480
14481         * mini.pc.in: Call this package `mini' for the moment.
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495