2008-07-14 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
2
3         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
4         it has too much register pressure.
5
6 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
7
8         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
9
10 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
11
12         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
13         on x86.
14
15         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
16         on amd64 similar to the way it is done on arm.
17
18         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
19
20         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
21         consistency, normalize error messages, avoid loading aot-only modules in
22         normal mode.
23
24         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
25         for consistency.
26
27         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
28
29 2008-07-11  Martin Baulig  <martin@ximian.com>
30
31         * debug-debugger.h
32         (MonoDebuggerInfo): Add `interruption_request'.
33
34 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
35
36         * aot-compiler.c (emit_plt): Remove some dead code.
37
38         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
39
40         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
41         return the plt info offset belonging to a given plt entry.
42
43         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
44         mono_aot_get_plt_info_offset.
45         
46         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
47         similar to the amd64 code by makeing jumps through a separate jump table 
48         instead of embedding the jump addresses into the code.
49
50 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
51
52         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
53         method.
54
55 2008-07-10  Martin Baulig  <martin@ximian.com>
56
57         * mini.c (mini_method_compile): Disable generics sharing when
58         running in the debugger.
59
60 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
61
62         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
63
64         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
65         the local register allocator from running out of registers on x86 when 
66         using aot.
67
68 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
69
70         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
71         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
72         C4146.
73
74         Contributed under MIT/X11 license.
75
76 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
77
78         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
79         speed up the assembler.
80
81 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
82
83         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
84         support.
85
86         * mini.c: Move the soft float handling macros a bit earlier, add 
87         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
88         place.
89
90         * mini.h: Add prototype for mono_arch_fixup_jinfo.
91
92         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
93         read-only to help catch code allocation requests.
94         
95         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
96         and turn it off when using --aot-only or when compiling with --aot=full.
97
98         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
99         jump table for switches from the normal domain mempool, not the code
100         manager.
101
102         * mini-trampolines.c (get_unbox_trampoline): New function to return an
103         unbox trampoline which handles aot-only mode too.
104
105         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
106         an AOTed unbox trampoline.
107
108         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
109
110 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
111
112         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
113         ""
114
115         Contributed under MIT/X11 license.
116
117 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
118
119         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
120           the unwind information for the method at the end of the allocated block.
121           
122         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
123           MonoCompileArch to hold the unwind info for SEH on Winx64
124         
125         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
126           frame pointer info for the method being compiled.
127           
128         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
129           the call to mono_exception_from_token.
130           
131         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
132           storing the method prolog information in a format that the Winx64 SEH can understand.  This
133           information is stored a the end of the method block because it is all 32-bit offset based.
134
135         Contributed under MIT/X11 license.
136
137 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
138
139         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
140
141         * wapihandles.c: Fix warnings.
142
143         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
144         mode.
145
146         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
147         mono_jit_compile_method in aot-only mode since that calls the type 
148         initializer.
149         
150         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
151         get_delegate_invoke_impl in aot-only mode.
152
153         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
154
155 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
156
157         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
158
159         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
160         is on by default.
161
162         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
163
164         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
165         init trampoline from the AOT file as well.
166
167         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
168         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
169         code.
170
171         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
172         mono_init.
173
174         * exceptions-amd64.c: Add _full variants for the remaining exception code
175         creation functions as well, allow emission of relocatable code, remove
176         caching since that is now done by the caller.
177
178         * mini-exceptions.c: Add _full variants for the remaining exception code
179         creation functions as well, add aot-only support.
180
181         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
182         if we can determine a proper token for them.
183         (add_wrappers): Add a few more wrappers.
184         (emit_method_code): Remove some dead code.
185         (emit_trampolines): Emit exception code too.
186
187         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
188
189         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
190         mono_array_new_va which avoids varargs.
191
192         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
193
194         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
195         mono_arch_create_specific_trampoline () in all places.
196
197         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
198         a bit so it can be used for other things as well.
199         
200         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
201         on demand as well.
202
203         * exceptions-amd64.c: Rename the caching from the exception code creation
204         functions, it is done by the caller instead.
205         
206         * exceptions-amd64.c: Change the signature of the exception code creation 
207         functions to allow the creation of relocatable code later.
208
209         * mini-exceptions.c: Add a set of functions to query the various 
210         runtime-generated exception functions.
211
212         * mini.c mini-exceptions.c: Use the newly added functions instead of the
213         mono_arch_.. () functions.
214         
215 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
216
217         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
218
219         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
220
221         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
222         (mini_get_vtable_trampoline): Ditto.
223
224         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
225         code in the AOT case by returning the code size and a list of relocations to
226         the caller.
227
228         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
229
230 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
231
232         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
233           clean the stack.
234
235         Contributed under MIT/X11 license.
236
237 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
238
239         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
240         so the buffer size can be computed correctly. Fixes #404735.
241
242         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
243         normally as cfg->debug_info is already freed.
244
245 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
246
247         * mini-amd64.c: For calls returning vtypes in registers, don't store
248         the return address on the stack, instead allocate a separate local for
249         it. Fixes #404729.
250
251 2008-07-05  Mark Probst  <mark.probst@gmail.com>
252
253         * mini-trampolines.c, mini.h: Add an argument to
254         mono_create_jit_trampoline_in_domain() for turning off the adding
255         of the sync wrapper.
256
257         * mini.c: Use the JIT trampoline without sync instead of
258         ldftn_nosync in static RGCTX invoke wrappers so that the call can
259         be patched.
260
261 2008-07-04  Mark Probst  <mark.probst@gmail.com>
262
263         * driver.c: Turn on GSHARED optimization by default.
264
265 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
266
267         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
268         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
269
270         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
271         create a variant of the generic trampoline code callable from AOTed trampolines.
272
273         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
274         trampoline code callable from AOTed trampolines.
275
276         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
277
278 2008-07-04  Mark Probst  <mark.probst@gmail.com>
279
280         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
281         pass-through manner.
282
283         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
284         and don't fail sharing for them anymore.
285
286         * mini-exceptions.c: Handle exceptions in shared generic methods.
287
288         * generic-sharing.c: When checking the context of a generic
289         method, also check its class's context.  Don't treat wrappers as
290         sharable.
291
292         * mini-trampolines.c: Some code factored out to
293         metadata/generic-sharing.c.  Handle the MRGCTX case.
294
295         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
296         we must deal with the method being of another instantiation of the
297         class.  Add static rgctx invoke wrappers to generic methods.
298
299 2008-07-04  Mark Probst  <mark.probst@gmail.com>
300
301         * mini.c: Provide all jit infos of generic shared methods with a
302         generic jit info.
303
304         * mini-exceptions.c: Handle the new situation that a generic info
305         might be available, but not info about the this/vtable/mrgctx
306         variable.
307
308 2008-07-03  Mark Probst  <mark.probst@gmail.com>
309
310         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
311         generic methods.
312
313 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
314
315         * dominators.c (check_dominance_frontier): Fix a warning.
316
317         * mini.h: Add some missing prototypes.
318
319         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
320
321         * driver.c (mono_jit_init_version): Correct the comments since the first
322         argument should be the name of the root domain, not a filename.
323
324         * aot-runtime.c (make_writable): Error out if this is called while running
325         with --aot-only.
326         (load_aot_module): Ditto.
327
328         * aot-compiler.c: Really fix the computation of method indexes.
329
330         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
331         optimizations as this is no longer called frequently.
332
333         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
334         method and the invoke impl code and pass it to the delegate trampoline instead of
335         just the delegate class.
336
337 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
338
339         * aot-compiler.c: Fixup the computation of method indexes.
340         (add_wrappers): Create the base methods of the runtime invoke wrappers using
341         the method builder infrastructure.
342
343         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
344         has no header.
345
346         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
347         mode, load the method right away instead of creating a trampoline.
348
349         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
350
351         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
352         some checks a bit.
353
354 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
355
356         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
357         (mono_aot_load_method): Use method_index instead of method->token.
358
359         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
360         can handle icalls etc. properly.
361
362         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
363
364         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
365
366         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
367         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
368         JIT_ICALL_ADDR patch type.
369
370         * patch-info.h: Add JIT_ICALL_ADDR patch type.
371
372         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
373         request flag.
374         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
375
376         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
377
378 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
379
380         * mini.c: Use domain->jit_code_hash_lock for controlling access to
381         domain->jit_code_hash.
382
383 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
384
385         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
386
387 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
388
389         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
390         get_this_arg_from_call, let it compute it when needed.
391
392         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
393         gsctx from code only when needed.
394
395         * mini-trampolines.c (get_generic_context): Rename this to 
396         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
397         it can be called by the arch backends.
398
399         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
400
401 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
402
403         * driver.c (mono_main): Add experimental --aot-only command line option.
404
405         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
406         set.
407
408 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
409
410         * driver.c (DllMain): Remove mono_module_handle.
411
412         Contributed under MIT/X11 license.
413
414 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
415
416         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
417         for emitting methods which are not in the source assembly. Detect and report
418         failure of assembling+linking.
419         
420         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
421
422         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
423
424 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
425
426         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
427
428 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
429
430         * mini.h: Remove some obsolete prototypes.
431
432         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
433
434 2008-06-24  Mark Probst  <mark.probst@gmail.com>
435
436         * mini.c (get_object_generic_inst): Variable-sized arrays are not
437         supported by Visual Studio, so use alloca().
438
439 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
440
441         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
442         Fixes #402585.
443
444 2008-06-23  Mark Probst  <mark.probst@gmail.com>
445
446         * mini.c: Fail sharing of a generic method if it contains an open
447         catch clause (because we don't pass MRGCTXs yet).
448
449 2008-06-23  Mark Probst  <mark.probst@gmail.com>
450
451         * mini.c: When compiling a method with generic sharing, insert the
452         method instantiated with an all-Object generic context into the
453         jit info table, instead of the context of the first instantiation
454         of the method we happen to compile.
455
456 2008-06-18  Martin Baulig  <martin@ximian.com>
457
458         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
459         `major_version' and `minor_version'.
460
461 2008-06-17  Mark Probst  <mark.probst@gmail.com>
462
463         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
464         mono_method_is_generic_sharable_impl() takes an additional
465         argument specifying whether to treat type variables as reference
466         types.
467
468 2008-06-17  Mark Probst  <mark.probst@gmail.com>
469
470         * mini.h: Removed obsolete prototypes.
471
472 2008-06-17  Mark Probst  <mark.probst@gmail.com>
473
474         * mini.c: Don't fail generic sharing for initobj and sizeof - we
475         already handle them.
476
477 2008-06-17  Mark Probst  <mark.probst@gmail.com>
478
479         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
480         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
481         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
482         tramp-x86.c: Added a MonoGenericContext* argument to
483         mono_arch_get_unbox_trampoline() so that it can call other
484         functions which require it.
485
486 2008-06-17  Mark Probst  <mark.probst@gmail.com>
487
488         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
489         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
490         mono_arch_get_this_arg_from_call() takes a
491         MonoGenericSharingContext* as well.
492
493 2008-06-17  Mark Probst  <mark.probst@gmail.com>
494
495         * mini.c: Factor out code for emitting unbox into emit_unbox() and
496         implement generic sharing of unbox.
497
498 2008-06-17  Mark Probst  <mark.probst@gmail.com>
499
500         * mini.c: Don't compute the vtable to determine whether a field is
501         special static, because it might not work for open types.
502
503 2008-06-17  Mark Probst  <mark.probst@gmail.com>
504
505         * mini.c: Removed the unused token_type and token_source arguments
506         from get_runtime_generic_context_ptr().
507
508 2008-06-17  Marek Habersack  <mhabersack@novell.com>
509
510         * mini.c (ADD_BINOP): fix the build
511
512 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
513
514         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
515         a widening op.
516
517 2008-06-16  Mark Probst  <mark.probst@gmail.com>
518
519         * mini.h: Removed class relations enum that's not used anymore.
520
521 2008-06-16  Mark Probst  <mark.probst@gmail.com>
522
523         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
524
525         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
526         the lazy fetch trampoline access code.
527
528 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
529
530         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
531
532 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
533
534         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
535
536         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
537
538         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
539
540 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
541
542         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
543         intrinsics.
544
545         * mini-ops.h: Add MIN/MAX_UN opcodes.
546
547         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
548         intrinsics.
549
550         * basic-math.cs: Add more min/max tests.
551
552         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
553
554 2008-06-13  Mark Probst  <mark.probst@gmail.com>
555
556         * mini.c: Small fix in the prologue of emit_castclass.
557
558 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
559
560         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
561
562         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
563         do not work even for unsigned types. Fixes #400014.
564
565         * basic-math.cs: Add regression tests for unsigned Min/Max.
566
567 2008-06-13  Mark Probst  <mark.probst@gmail.com>
568
569         * mini.c: Added additional context_used argument to several
570         functions, which will be needed for sharing generic methods.  Use
571         GET_RGCTX macro wherever appropriate.  Declare only one
572         context_used in mono_method_to_ir().
573
574 2008-06-13  Mark Probst  <mark.probst@gmail.com>
575
576         * mini.c, generic-sharing.c: Removed generic class relations.
577
578         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
579         functions due to MRGCTX changes.
580
581 2008-06-13  Mark Probst  <mark.probst@gmail.com>
582
583         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
584         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
585         with calculated IMT.
586
587         * mini.c: Generic sharing of calls via generic interfaces.
588
589         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
590         generic method with non-constant MonoGenericContext*.  Instead,
591         the context is taken out of the method itself.
592
593 2008-06-13  Mark Probst  <mark.probst@gmail.com>
594
595         * mini.c: Generic sharing of ldvirtftn.
596
597 2008-06-13  Mark Probst  <mark.probst@gmail.com>
598
599         * mini.c: Generic sharing of ldftn.
600
601 2008-06-13  Mark Probst  <mark.probst@gmail.com>
602
603         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
604
605 2008-06-13  Mark Probst  <mark.probst@gmail.com>
606
607         * mini.c: Generic sharing of the special case of ldtoken followed
608         by a call to GetTypeFromHandle.
609
610 2008-06-13  Mark Probst  <mark.probst@gmail.com>
611
612         * mini.c: Generic sharing of box for nullable types.
613
614 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
615
616         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
617         are passed on the stack. Fixes #324807.
618
619 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
620
621         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
622         for the ArgValuetypeAddrInIReg case.
623
624         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
625         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
626
627         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
628         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
629         local variable and pass the local variable by reference to the called method.
630           
631         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
632         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
633
634         Contributed under MIT/X11 license.
635
636 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
637
638         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
639
640         * debug-mini.c (mono_debug_print_vars): Release memory after printing
641         everything.
642
643 2008-06-10  Martin Baulig  <martin@ximian.com>
644
645         * debug-mini.c
646         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
647
648 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
649
650         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
651         possible error when no arguments are passed.
652
653         Contributed under MIT/X11 license.
654
655 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
656
657         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
658         where the file name is NULL.
659
660 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
661
662         * mini.c: Fix s390 build.
663
664 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
665
666         * trace.c (mono_trace_parse_options): Fix warnings.
667
668         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
669
670 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
671
672         * mini.c (remove_block_if_useless): Avoid printing the method name.
673         
674         * mini.c: Remove needless setting of ins->cil_code which is now done by 
675         MONO_INST_NEW.
676
677         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
678         LMF. Not yet used.
679
680         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
681         translated code after it has been patched.
682
683 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
684
685         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
686         avoid problems during code patching on SMP systems.
687         (emit_call): Avoid adding a patch info which is already added by 
688         emit_call_body.
689         (mono_arch_emit_exceptions): Ditto.
690
691 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
692
693         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
694         MONO_TYPE_ISSTRUCT already checks for it.
695
696 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
697
698         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
699           structs with floats on Winx64 the float registers are not used.  
700           The integer registers are always used..
701         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
702           only one register will be used and only if the size of the struct 
703           is 1,2,4, or 8 bytes.
704
705         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
706           to work for Winx64.
707
708         Contributed under MIT/X11 license.
709
710 2008-06-05  Martin Baulig  <martin@ximian.com>
711
712         * debug-debugger.c (debugger_lookup_class): Also call
713         mono_class_setup_methods() here; we're only called from RTI.
714
715 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
716
717         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
718         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
719         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
720         Post-process object files and add dtrace-generated object, if necessary.
721
722         Contributed under MIT/X11 license.
723
724 2008-06-04  Mark Probst  <mark.probst@gmail.com>
725
726         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
727         element class.
728
729         * mini.c: Generic sharing for unbox.any and castclass.
730
731 2008-06-04  Mark Probst  <mark.probst@gmail.com>
732
733         * mini.c: Ignore tailcall prefix in shared generic code and when
734         doing calls which require a vtable/rgctx argument.
735
736 2008-06-04  Mark Probst  <mark.probst@gmail.com>
737
738         * mini.c: Don't free the JIT info.
739
740         * driver.c: Changes in the JIT info table testing code.
741
742 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
743
744         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
745         interruption. Fix some warnings.
746
747         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
748         interruption_checkpoint.
749
750 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
751
752         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
753         from embedding applications.
754
755 2008-06-02  William Holmes  <billholmes54@gmail.com>
756
757         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
758           reserving 32 bytes on the stack when making calls. 
759
760         Contributed under MIT/X11 license.
761
762 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
763
764         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
765         the linear IL branch.
766
767         * driver.c: Print out more information for --version on arm.
768
769 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
770
771         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
772         bb_exit instead, since out of line bblocks might not actually be emitted
773         out-of-line.
774         
775         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
776         maximum epilog size for out of line bblocks if tracing is enabled.
777
778         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
779
780 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
781
782         * arrays.cs: Regression tests for allocating arrays with negative sizes.
783
784 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
785
786         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
787         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
788         opcodes.
789
790 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
791
792         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
793         the 'value' to store is a constant.
794
795         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
796
797         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
798         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
799
800 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
801
802         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
803         for accessing method->generic_container.
804
805 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
806
807         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
808         
809         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
810
811         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
812
813         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
814         fails.
815
816 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
817
818         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
819
820         * mini.c: Handle the case when mono_class_vtable () fails.
821
822 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
823         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
824         the stat profiler.
825
826 2008-05-22  Mark Probst  <mark.probst@gmail.com>
827
828         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
829         together with domain sharing.
830
831 2008-05-22  Mark Probst  <mark.probst@gmail.com>
832
833         * mini.c: Treat callvirts to final methods like non-virtual calls
834         when doing generic sharing, i.e. look them up in the runtime
835         generic context.
836
837 2008-05-22  Mark Probst  <mark.probst@gmail.com>
838
839         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
840         with computed types (for generic sharing).
841
842         * mini.c: Generic sharing for mkrefany and refanyval.
843
844 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
845
846         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
847         possible.
848
849         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
850         the generic sharing code.
851         
852         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
853         when needed.
854
855 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
856
857         * mini.h: Remove the declaration of mono_aot_init_vtable ().
858
859 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
860
861         * driver.c: updated copyright date
862
863 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
864
865         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
866         needed.
867
868 2008-05-19  Martin Baulig  <martin@ximian.com>
869
870         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
871         pointing to the new `_mono_debug_using_mono_debugger' variable.
872
873         * driver.c
874         (mono_main): Check mono_debug_using_mono_debugger() rather than
875         the `MONO_INSIDE_MDB' environment variable to check whether we're
876         inside the debugger.
877
878 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
879
880         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
881         argument.
882
883 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
884
885         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
886
887         * mini.c: Added mini_assembly_can_skip_verification. This
888         function checks if the assembly requested to skip verification. 
889         Fixes part of #387274.
890
891 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
892
893         * mini.c (mini_get_method): Disable the check for open generic classes when
894         using generic sharing.
895
896         * generics.cs: Add a test #387034.
897
898         * mini.c (mini_get_method): Check whenever the method class is an open generic
899         type, and return NULL in that case, causing a verification error. Fixes
900         #384123.
901
902 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
903
904         * driver.c (mono_main): Revert r102623. The right
905         thing to do is to enable the verifier under verifiable
906         unless a --security flag was passed.
907
908         We need this non-trivial behavior for --verify-all otherwise
909         mcs-compileall won't be able to use it. As it needs everything to
910         be verified under validil.
911
912 2008-05-06  Martin Baulig  <martin@ximian.com>
913
914         Fix #383749.
915
916         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
917         (mono_debugger_thread_cleanup): Likewise.
918         (mono_debugger_extended_notification): Likewise.
919
920 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
921
922         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
923         against both inflated and non-inflated methods. We need to check against the
924         generic definition for cases where the instantiated method is not visible.
925         We need to check against the inflated types for cases where the instantiation
926         changes any super type. This fixes #382986.
927
928         Note that this doesn't need to be applied to other parts of mono_method_to_ir
929         that check for visibiliy as generic params only appears as the type subject
930         of tokens on call opcodes. Field manipulation and ldftn must always
931         target an exact type.
932
933 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
934
935         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
936         if no related --security flag is passed.
937
938 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
939
940         * mini-arch.h: Prepare support for ppc64.
941
942         Contributed under MIT/X11 license.
943
944 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
945
946         * aot-runtime.c: Prepare support for ppc64.
947
948         Contributed under MIT/X11 license.
949
950 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
951
952         * mini-ops.h: Prepare support for ppc64.
953
954         Contributed under MIT/X11 license.
955
956 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
957
958         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
959
960         Contributed under MIT/X11 license.
961
962 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
963
964         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
965         assemblies, since aot_name is not a full path, causing us to load MS.NET 
966         assemblies on windows.
967
968 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
969
970         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
971         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
972         * main.c: Use UTF-8 encoded command line instead of Windows default code
973         page on Windows to support Unicode.
974         * driver.c (DllMain): New function for mixed-mode assembly support.
975         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
976         export __stdcall functions without decoration.
977
978         Contributed under MIT/X11 license.
979
980 2008-04-28  Mark Probst  <mark.probst@gmail.com>
981
982         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
983         saving it very early.
984
985 2008-04-28  Mark Probst  <mark.probst@gmail.com>
986
987         * mini.h, mini.c: Lots of code for accessing the old RGCTX
988         deleted.  The only way to access the new RGCTX is via the
989         trampline.
990
991         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
992         vtable instead of the RGCTX to static methods.
993
994         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
995         accessing the new RGCTX.
996
997         * generic-sharing.c: There is no separation between self, type
998         arguments and other types in the RGCTX anymore.
999
1000 2008-04-25  Jonathan Chambers <joncham@gmail.com>
1001
1002         * mini-amd64.c (add_general): Remove previous stack adjustment.
1003         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
1004         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
1005         for 32 bytes of stack space reserved for all calls.
1006         
1007         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
1008         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
1009         adjustment.
1010         
1011         Code contributed under MIT/X11 license.
1012
1013 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
1014
1015         * mini.c (mini_method_verify): Only verify non-inflated methods, check
1016         against the root definition, peeling out method and type instantiations.
1017         Cache verify success results, code that fails verification is still
1018         checked multiple times.
1019
1020 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
1021
1022         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
1023
1024 2008-04-23  Jonathan Chambers <joncham@gmail.com>
1025
1026         * mini-amd64.c (add_general): Always increment stack on Win64.
1027         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
1028         on Win64.
1029         
1030         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
1031         stack based argument handling on Win64.
1032         
1033         Code contributed under MIT/X11 license.
1034
1035 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
1036
1037         * Makefile.am (version.h): Add support for git-svn.
1038
1039 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
1040
1041         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
1042         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
1043         avoiding allocations and libc functions which might deadlock.
1044         
1045         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
1046         'no-gdb-backtrace' option is set.
1047
1048         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
1049
1050         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
1051
1052 2008-04-21  Martin Baulig  <martin@ximian.com>
1053
1054         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
1055         and `get_lmf_addr'; `notification_address' is no longer a pointer.
1056
1057 2008-04-21  Martin Baulig  <martin@ximian.com>
1058
1059         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
1060         `thread_vtable', `event_handler_ptr' and `event_handler'.
1061
1062 2008-04-21  Martin Baulig  <martin@ximian.com>
1063
1064         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
1065         allows delayed initialization of the `executable_code_buffer' when
1066         attaching.
1067
1068 2008-04-21  Martin Baulig  <martin@ximian.com>
1069
1070         * mini.h (mono_debugger_create_notification_function): Removed.
1071         * tramp-*.c (mono_debugger_create_notification_function): Removed.
1072
1073         * mdb-debug-info64.s
1074         (MONO_DEBUGGER__notification_function): Added this in the .text section.
1075
1076         * mdb-debug-info32.s
1077         (MONO_DEBUGGER__notification_function): Added this in the .text section.
1078
1079         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
1080         currently only works on x86 and x86_64, so don't create it on ppc.
1081
1082 2008-04-21  Martin Baulig  <martin@ximian.com>
1083
1084         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
1085
1086         * mini.c
1087         (mini_method_compile): In the fp elimination check, check
1088         `debug_options.mdb_optimizations' in addition to
1089         mono_debug_using_mono_debugger().       
1090
1091         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
1092         disable some JIT optimizations which are only disabled when
1093         running inside the debugger.
1094         Added `--help-debug' option to describe the debugging options.
1095         (parse_debug_options): New static function to parse the `--debug'
1096         options, so we can easily add more stuff in future.
1097
1098 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
1099
1100         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
1101         the method has no body.
1102
1103 2008-04-19  Jonathan Chambers <joncham@gmail.com>
1104
1105         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
1106         assembly is not allowed in MSVC 64-bit compiler. 
1107         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
1108         as we get floating point exceptions everywhere.
1109         
1110         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
1111         correctly align arguments for call to throw_exception.
1112         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
1113         
1114         Code contributed under MIT/X11 license.
1115
1116 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
1117
1118         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
1119
1120 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
1121
1122         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
1123
1124         * mini-amd64.c (NEW_INS): Set cil_code.
1125
1126         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
1127         from mini-amd64.c so all debugger related logic is in one place.
1128
1129         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
1130         later won't have a random ip assigned to them.
1131
1132 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
1133
1134         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
1135         the arch specific function initializes code_size.
1136         (mono_create_delegate_trampoline): Ditto.
1137
1138         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
1139         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
1140         platforms.
1141
1142         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
1143         running under the debugger.
1144
1145         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
1146         debugger.
1147
1148         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
1149         debugger. Also move the disabling of optimizations here from driver.c.
1150         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
1151         debugger.
1152
1153         * mini.h (MonoCompile): Add a few new flags.
1154
1155 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
1156
1157         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
1158         so the cil_code field of created MonoInst's is properly set.
1159         (mini_select_instructions): Ditto.
1160
1161         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
1162         (MONO_INST_NEW_CALL): Ditto.
1163
1164         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
1165         in many places so the ins->cil_code field is properly initialized.
1166
1167         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
1168         place.
1169
1170 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
1171
1172         * mini.c (mini_method_compile): Print a different message when compiling a 
1173         shared method.
1174         
1175         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
1176         > 1.
1177
1178 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
1179
1180         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
1181         SSE2 instructions.
1182
1183         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
1184         
1185 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
1186
1187         * mini.c (handle_stack_args): Make this return void since its return value was
1188         never used. Also set cfg->unverifiable for invalid IL instead of calling
1189         G_BREAKPOINT ().
1190
1191 2008-04-10  Mark Probst  <mark.probst@gmail.com>
1192
1193         * mini.c: Make sure "this" is live in catch clauses with type
1194         variables in shared generic code.
1195
1196 2008-04-08  Mark Probst  <mark.probst@gmail.com>
1197
1198         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
1199         generic_class_is_reference_type() to ensure the proper behaviour
1200         when sharing generic code and the type in question is a type
1201         argument.
1202
1203 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
1204
1205         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
1206         race conditions when printing thread dumps. Fixes #377738.
1207
1208 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
1209         
1210         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
1211         shows up when both MonoInst arguments can cause aliasig.
1212         There is likely no way in the current JIT to trigger this problem, but
1213         it showed up in the development of generics sharing, when in a new
1214         opcode both args of an OP_GROUP can be aliases (addresses of a local).
1215         When the generics sharing code will be committed, its tests will be
1216         valid also for this bug.
1217
1218 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
1219
1220         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
1221         PATCH_INFO_METHOD.
1222
1223         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
1224         NULL.
1225
1226 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
1227
1228         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
1229         use a more detailed exception message for InvalidCastException.
1230
1231         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
1232
1233         * driver.c (mono_main): Add --debug=casts option to turn on better 
1234         InvalidCastException message details.
1235
1236         * mini.c (mini_get_debug_options): New helper function to return the address of
1237         the debug_options variable.
1238
1239         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
1240         the jit_tls TLS variable.
1241
1242         * mini.c (mono_jit_tls): New TLS variable.
1243
1244         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
1245         option is used.
1246
1247 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
1248
1249         * mini.h: Removed verifer related stuff. This code was moved to verify.c
1250
1251         * mini.c: Removed verifer related stuff, code moved to verify.c.
1252
1253         * driver.c: Using code from verify.c instead of mini.c.
1254
1255 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
1256
1257         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
1258         longer valid.
1259
1260 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
1261
1262         * mini.c (check_for_method_verify): Enabling verification of
1263         corlib if mono_verify_all is set. Bugs in the verifier preventing that
1264         have been fixed.
1265
1266 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
1267
1268         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
1269         caller saved registers as well.
1270         
1271         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
1272         saved registers as well.
1273
1274 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
1275
1276         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
1277
1278         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
1279         code.
1280
1281 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
1282
1283         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
1284         to get_call_info.
1285         (get_call_info): Take a gsctx argument instead of 'cfg'.
1286
1287 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
1288
1289         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
1290         mono_verify_all is set.
1291
1292         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
1293
1294         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
1295
1296 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
1297
1298         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
1299         an exception.
1300
1301         * driver.c mini.c mini.h: Add a --verify-all development option to test the
1302         verifier and the code generated by the compiler.
1303
1304 2008-03-25  Mark Probst  <mark.probst@gmail.com>
1305
1306         * mini.c: Generic sharing of the non-nullable case of the box
1307         instruction.
1308
1309 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
1310
1311         * inssel.brg: Fix the build.
1312
1313         * iltests.il.in: Add a test for lconv.ovf.u8.un.
1314
1315 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
1316
1317         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
1318         Array:Address. Fixes #372410.
1319
1320         * iltests.il.in: New tests for readonly prefix.
1321
1322 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
1323
1324         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
1325         mini-trampolines.c.
1326
1327         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
1328         mini-exceptions.c.
1329
1330         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
1331         
1332         * mini.c (mono_decompose_op_imm): New helper function.
1333
1334         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
1335         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
1336         return value.
1337
1338         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
1339         mono_arch_output_basic_block. Fix warnings.
1340
1341         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
1342         for now.
1343
1344 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
1345
1346         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
1347         since the extra frame is now detected automatically inside the loop.
1348
1349         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
1350         opts which are now in mono_peephole_ins ().
1351         
1352         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
1353
1354         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
1355         frames and skip duplicate managed-to-native frames. Fixes #367665.
1356
1357         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
1358         opts which are now in mono_peephole_ins ().
1359         (mono_arch_peephole_pass_2): Ditto.
1360
1361         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
1362
1363         * mini-codegen.c (mono_peephole_ins): New helper function containing the
1364         arch independent peephole optimizations.
1365
1366         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
1367         opts which are now in mono_peephole_ins ().
1368
1369         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
1370         
1371         * mini-s390.c (mono_arch_output_basic_block): Fix build.
1372
1373         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
1374         pattern.
1375
1376         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
1377         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
1378         opcode. 
1379
1380 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
1381
1382         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
1383         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
1384         return value.
1385
1386         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
1387         mono_arch_output_basic_block. Fix warnings.
1388
1389 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
1390
1391         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
1392         conv.ovf.u.un.
1393
1394 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
1395
1396         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
1397         conv.ovf.u.un.
1398
1399         * iltests.il: Add new tests.
1400
1401 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
1402
1403         * mini.c: Removed Windows version macros.
1404
1405 2008-03-20  Mark Probst  <mark.probst@gmail.com>
1406
1407         * generic-sharing.c: Put reflection types in the extensible part
1408         of the runtime generic context.
1409
1410         * mini.c: Generic sharing of the GetTypeHandle special case of the
1411         ldtoken instruction.
1412
1413 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
1414
1415         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
1416
1417         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
1418         
1419         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
1420         consistency with the other version on the linear IR branch.
1421
1422         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
1423
1424         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
1425
1426         * iltests.il.in: Add new tests.
1427
1428 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
1429
1430         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
1431
1432         * iltests.il.in: Add new tests.
1433
1434 2008-03-19  Mark Probst  <mark.probst@gmail.com>
1435
1436         * mini.c: Two variables with the same name were declared in
1437         nesting contexts and one wasn't initialized.  Fixed.
1438
1439 2008-03-19  Mark Probst  <mark.probst@gmail.com>
1440
1441         * mini.c: Generic sharing of the initobj instruction.
1442
1443 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
1444
1445         * mini.c: make the test to optimize ldtoken from typeof() more
1446         precise.
1447
1448 2008-03-18  Mark Probst  <mark.probst@gmail.com>
1449
1450         * mini.c: Generic sharing of the initobj instruction for reference
1451         types.
1452
1453 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
1454
1455         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
1456         the mono_breakpoint_clean_code() code to perform bound checks.
1457
1458 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
1459
1460         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
1461         mono_arch_patch_callsite() to include the start of the managed method
1462         to be able to perform bound checks.
1463
1464 2008-03-17  Mark Probst  <mark.probst@gmail.com>
1465
1466         * mini.c: Generic sharing for the isinst instruction.
1467
1468 2008-03-17  Mark Probst  <mark.probst@gmail.com>
1469
1470         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
1471         inssel-long32-mips.brg: Added opcodes for doing indirect calls
1472         with the runtime generic context argument.
1473
1474         * mini.c: Share calls to several types of unsharable methods by
1475         putting the address of the method code in the runtime generic
1476         context and doing an indirect call.
1477
1478         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
1479         to switches.
1480
1481 2008-03-16  Mark Probst  <mark.probst@gmail.com>
1482
1483         * generic-sharing.c: Change due to a change in the runtime genric
1484         context API.
1485
1486 2008-03-15  Martin Baulig  <martin@ximian.com>
1487
1488         * tramp-x86.c
1489         (mono_arch_nullify_class_init_trampoline): Add call to
1490         mono_breakpoint_clean_code() to make things work when running
1491         inside the debugger.
1492
1493         * tramp-amd64.c
1494         (mono_arch_nullify_class_init_trampoline): Add call to
1495         mono_breakpoint_clean_code() to make things work when running
1496         inside the debugger.
1497
1498 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
1499
1500         * inssel-long.brg (reg): Fix 64 bit build.
1501
1502 2008-03-14  Mark Probst  <mark.probst@gmail.com>
1503
1504         * mini.c, mini.h: Share static generic code by passing it an
1505         implicit argument pointing to the runtime generic context.
1506
1507         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
1508         inssel-long32-mips.brg: New opcodes for calling shared static,
1509         which need to be passed the runtime generic context.
1510
1511         * mini-amd64.c, mini-x86.c: Save the runtime generic context
1512         argument on the stack in the prologue if needed.  New function for
1513         finding the runtime generic context argument from the registers
1514         saved by the trampoline.
1515
1516         * mini-amd64.h, mini-x86.h: Specify which register to use for the
1517         runtime generic context argument.
1518
1519         * tramp-amd64.c: Also restore the register used for the runtime
1520         generic context argument.
1521
1522         * mini-trampoline.c: Resolve shared static calls by consulting the
1523         runtime generic context via the new argument.
1524
1525         * generic-sharing.c: Add an argument to sharability-checking
1526         functions that specifies whether type variables should be treated
1527         as sharable type arguments.
1528
1529         * inssel-x86.brg: Removed a superfluous, buggy rule.
1530
1531         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
1532         to switches.
1533
1534 2008-03-14  Martin Baulig  <martin@ximian.com>
1535
1536         * debug-debugger.c (main_thread_handler): Call
1537         mono_runtime_run_main() without sending any notifications.
1538
1539         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
1540
1541 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
1542
1543         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
1544
1545 2008-03-14  Mark Probst  <mark.probst@gmail.com>
1546
1547         * tramp-x86.c: Fixed register restore offsets in the trampoline
1548         code for ECX and EDX.
1549
1550 2008-03-12  Geoff Norton  <gnorton@novell.com>
1551
1552         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
1553         different ucontext_t implementations.
1554         * exceptions-arm.c: Use the above defines to get exceptions working on 
1555         iPhone (based on a patch by Luke Howard lukeh@padl.com)
1556         * mini-arm.c: Implement iPhone icache support (based on a patch by
1557         Luke Howard lukeh@padl.com)
1558
1559 2008-03-12  Mark Probst  <mark.probst@gmail.com>
1560
1561         * mini.c: Enable generic sharing of calls to non-static
1562         non-interface non-generic non-value-type methods.
1563
1564         * mini-trampolines.c: Resolve calls from shared generic code.
1565
1566 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
1567
1568         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
1569
1570         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
1571
1572 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
1573
1574         * mini.c: some fixes for the AOT compiler.
1575
1576 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
1577
1578         * cpu-amd64.md: Add clob:1 to some float opcodes.
1579
1580 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
1581
1582         * mini.h: Added MiniVerifierMode enumeration.
1583
1584         * mini.c: Added mini_verifier_set_mode to control
1585         the usage of the new verifier.
1586
1587         * mini.c (mono_method): Integrated the new verifier.
1588
1589         * driver.c: Extended --security option with validil and
1590         verifiable options to activate the new verifier.
1591
1592 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
1593
1594         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
1595         optimization to ctors taking 0 or 2 arguments too.
1596
1597         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
1598         a bit.
1599
1600         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
1601
1602         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
1603
1604 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
1605
1606         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
1607         non-aot case as well.
1608
1609         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
1610
1611         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
1612         changes.
1613
1614         * aot-compiler.c (encode_patch): Ditto.
1615
1616         * mini.h (G_MININT32): Fix the definition of this.
1617
1618 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
1619
1620         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
1621
1622         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
1623
1624 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
1625
1626         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
1627         methods returning vtypes in registers.
1628         (mono_arch_allocate_vars): Ditto.
1629
1630         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
1631
1632         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
1633
1634         * generics.cs: Add a test from the linear IR branch.
1635
1636         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
1637
1638         * mini.c (inline_method): Cache failed inline attempts.
1639
1640 2008-03-04  Mark Probst  <mark.probst@gmail.com>
1641
1642         * mini.c: For shared methods of generic classes put the location
1643         of "this" into the MonoGenericJitInfo.
1644
1645         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
1646         register out of a MonoContext by register number.  Add the generic
1647         sharing context as an argument to mono_arch_find_this_argument().
1648
1649         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
1650         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
1651         for new arch function.
1652
1653         * mini-exception.c: Handle open exception clauses in shared
1654         generic code.
1655
1656         * mini-trampolines.c: Supply additional argument to
1657         mono_arch_find_this_argument().
1658
1659 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
1660
1661         * Makefile.am (regtests): Run the bench.exe tests last.
1662
1663 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
1664
1665         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
1666         a bit.
1667
1668 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
1669
1670         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
1671         with MS.
1672
1673         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
1674         
1675         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
1676
1677         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
1678         whose class has no cctor.
1679
1680         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
1681
1682 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
1683
1684         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
1685         unverified.
1686
1687 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
1688
1689         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
1690         to be in sync with the code on the linear IR branch.
1691
1692         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
1693
1694         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
1695
1696 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
1697
1698         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
1699
1700         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
1701
1702         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
1703
1704         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
1705
1706         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
1707         
1708         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
1709         body.
1710
1711 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
1712
1713         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
1714         OP_LOADR4_MEMBASE emission.
1715
1716         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
1717         (mono_spillvar_offset_float): Ditto.
1718
1719         * mini-mips.c (mono_arch_emit_prolog): Ditto.
1720
1721         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
1722         emission.
1723
1724         * basic-long.cs: Add regression tests for them.
1725
1726         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
1727         use.
1728         (mono_arch_allocate_vars): Fix representation of single-precision float
1729         argument.
1730         (mono_arch_output_basic_block): Ditto.
1731
1732         * inssel-mips.brg: Ditto, remove duplicate items.
1733
1734         * mini-mips.c (emit_load_volatile_arguments): New function to handle
1735         arguments of tail calls as on other platforms.
1736         (mono_arch_output_basic_block): Handle tail calls.
1737
1738         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
1739         register.
1740
1741         * objects.cs (test_5_pass_static_struct): Add test for it.
1742
1743         Contributed under MIT/X11 license.
1744
1745 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
1746
1747         * Makefile.am: Use gmcs for compiling the regression tests.
1748
1749         * *.2.cs *.2.il: Rename to *.cs and *.il.
1750
1751 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
1752
1753         * regalloc.h: Make the vassign array smaller.
1754
1755         * mini.c (mini_method_compile): Remove an unused field in cfg.
1756
1757         * mini-codegen.c: Add a bunch of micro optimizations.
1758
1759 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
1760
1761         * regalloc.h: Remove some unused fields.
1762
1763 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
1764
1765         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
1766
1767         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
1768
1769 2008-02-22  Mark Probst  <mark.probst@gmail.com>
1770
1771         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
1772
1773         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
1774         trampoline: Fetch an entry from the runtime generic context.  If
1775         it's NULL, jump to the actual trampoline to fill the runtime
1776         generic context.  Otherwise, return it.
1777
1778         * mini.c: Call the lazy fetch trampoline to get entries out of the
1779         runtime generic context.
1780
1781         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
1782         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
1783         tramp-sparc.c: Stubs for the lazy fetch trampoline.
1784
1785 2008-02-21  Mark Probst  <mark.probst@gmail.com>
1786
1787         * mini.c: Fetch data out of the extensible part of the runtime
1788         generic context instead of calling a helper function.
1789
1790         * generic-sharing.c: Some functions moved into
1791         metadata/generic-sharing.c.  Helper function for fetching other
1792         types now checks and asserts against extensible rgctx (just for
1793         debugging purposes - the helper function isn't called anymore
1794         unless for debugging).
1795
1796 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1797
1798         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
1799         for tail calls up to the point that the tests in iltests.exe run. Also add a
1800         dummy CKFINITE implementation.
1801         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
1802         needed for trampoline LMF frames.
1803
1804         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
1805         trampoline LMF frames.
1806
1807 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
1808
1809         * mini.c (inline_method): clean any pending loader error when inlining fail.
1810         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
1811
1812 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
1813
1814         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
1815
1816         * aot-runtime.c (decode_patch_info): Ditto.
1817
1818         * mini.c (mono_resolve_patch_target): Ditto.
1819         
1820         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
1821         icall wrappers.
1822
1823         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
1824         
1825         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
1826         if it references an icall address.
1827
1828 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
1829
1830         * cpu-s390x.md: Remove some more unused opcodes.
1831         
1832         * cpu-s390x.md: Remove some unused opcodes.
1833
1834         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
1835         mono_op_imm_to_op ().
1836
1837         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
1838         instead of a switch statement.
1839         
1840         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
1841         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
1842
1843         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
1844         
1845         * mini-codegen.c: Remove unused mono_regstate2_... functions.
1846
1847         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
1848         -1.
1849
1850 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
1851
1852         * driver.c (mono_main): Improve error reporting when an assembly cannot be
1853         opened. Fixes #362607.
1854
1855         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
1856
1857         * iltests.il.in: Add a test for static methods in interfaces.
1858
1859 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
1860
1861         * genmdesc.c (build_table): Fix a crash on older glib versions.
1862
1863         * cpu-sparc.md: Remove some unused opcodes.
1864         
1865         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
1866         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
1867
1868         * cpu-amd64.md: Remove some unused opcodes.
1869
1870         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
1871         like the other opcodes.
1872
1873 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
1874
1875         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
1876
1877         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
1878
1879         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
1880         variables 'cfg' instead of 'm' for consistency.
1881
1882         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
1883
1884         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
1885         argument holding the vtype return address, to avoid the ambigious use of
1886         cfg->ret for this purpose.
1887
1888         * mini.c (NEW_RETLOADA): Use vret_addr if set.
1889
1890         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
1891         
1892         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
1893         new mono_print_ins () function which only takes one argument.
1894
1895 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
1896
1897         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
1898         macro arguments.
1899
1900 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
1901
1902         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
1903
1904         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
1905
1906         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
1907         opcodes and other small changes.
1908
1909         * mini-ops.h: Add some new opcodes from the linear IR branch.
1910
1911         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
1912
1913         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
1914         opcodes, use the REG_MEMBASE opcodes instead.
1915         
1916         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
1917         opcodes, use the REG_MEMBASE opcodes instead.
1918         
1919         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
1920         linear IR branch.
1921
1922         * mini.c (mono_op_imm_to_op): New helper function.
1923
1924         * mini-ops.h: Add some opcodes from linear IR branch.
1925
1926 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
1927
1928         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
1929         <tsv@solvo.ru>.
1930
1931 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
1932
1933         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
1934         OP_ICONV_TO_R4/R8.
1935
1936         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
1937
1938 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
1939
1940         * aot-compiler.c (emit_method_code): Add an assert.
1941
1942         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
1943         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
1944         methods.
1945
1946 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
1947
1948         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
1949         some load/store opcodes so they are consistent. 
1950         (mono_arch_emit_prolog): Simplify some code.
1951
1952         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
1953
1954         * objects.cs: Add tests for large argument offsets on ARM.
1955
1956         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
1957         stack offsets. Fixes #359651.
1958
1959         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
1960
1961         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
1962
1963         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
1964
1965         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
1966
1967         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
1968
1969         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
1970         rid of CEE_CONV_R_UN.
1971
1972         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
1973
1974 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
1975
1976         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
1977
1978         * mini.c (mono_normalize_opcodes): Add some more opcodes.
1979
1980         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
1981
1982         * cpu-amd64.md: Remove some unused opcodes.
1983
1984         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
1985
1986         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
1987
1988         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
1989         arch specific functions for its parts. Call the peephole pass after local
1990         regalloc so the prolog can compute a more accurate max_offset.
1991         
1992         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
1993         the corresponding OP_I/OP_L opcodes.
1994
1995         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
1996
1997         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
1998
1999 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
2000
2001         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
2002         as they are handled in mini.c.
2003
2004         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
2005         
2006         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
2007         case since it is handled in mini.c.
2008
2009         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
2010
2011         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
2012
2013         * *.c: Use the new opcodes in the IR and back end code.
2014
2015         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
2016
2017         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
2018
2019 2008-02-06  Mark Probst  <mark.probst@gmail.com>
2020
2021         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
2022         an assert because it has a race condition.
2023
2024 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
2025
2026         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
2027
2028         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
2029
2030         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
2031
2032         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
2033         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
2034
2035 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
2036
2037         * cpu-amd64.md (move): Correct the maximum size of move.
2038
2039 2008-02-05  Mark Probst  <mark.probst@gmail.com>
2040
2041         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
2042         the generic class init trampoline to return quickly if the class
2043         is already inited.
2044
2045 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
2046
2047         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
2048         issues where an 32 bit callsite cannot be patched by a 64 bit address.
2049
2050 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
2051
2052         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
2053         branch.
2054
2055 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
2056
2057         * objects.cs: Add some soft-float tests.
2058
2059         * mini.c: Fix a couple more soft-float issues.
2060
2061         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
2062
2063         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
2064         avoid a REX prefix.
2065
2066 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
2067
2068         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
2069         exception happens while compiling a virtual method.
2070
2071 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
2072
2073         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
2074         
2075         * mini-sparc.c: Fix build.
2076
2077         * mini-sparc.c (get_call_info): Add support for generic sharing.
2078
2079         * mini-exceptions.c: Add a FIXME.
2080
2081 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
2082
2083         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
2084         altstack handling code.
2085
2086         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
2087         
2088         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
2089
2090         * mini-s390.c: Add support for generic sharing.
2091
2092         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
2093         Fix CAS on s390.
2094         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
2095
2096         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
2097
2098         * mini-s390x.c: Add support for generic sharing.
2099         
2100         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
2101         Fix CAS on ia64.
2102         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
2103
2104         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
2105         can be used since it takes a 16 bit signed immediate.
2106
2107         * inssel-s390x.brg: Fix OP_SETRET.
2108
2109         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
2110
2111         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
2112
2113         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
2114
2115         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
2116
2117         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
2118         in one place.
2119
2120         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
2121         stuff.
2122
2123         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
2124         of the unused mono_arch_patch_delegate_trampoline stuff.
2125
2126 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
2127
2128         * basic-long.cs: Move the fp related tests to basic-float.cs.
2129
2130         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
2131
2132         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
2133
2134         * basic-calls.cs: Add a test for proper float argument passing.
2135
2136         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
2137         if the context corresponds to an exception received through a signal.
2138
2139         * exceptions.cs: Add a test for nullref handling at the start of a try
2140         clause.
2141
2142         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
2143
2144         * jit-icalls.c (mono_break): New JIT icall.
2145
2146         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
2147
2148         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
2149
2150 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
2151
2152         * cpu-*.md: Get rid of unused opcodes.
2153
2154         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
2155
2156         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
2157         by all platforms.
2158
2159         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
2160         define.
2161
2162         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
2163         the arch independent trampoline code in mini-trampolines.c.
2164
2165         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
2166
2167         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
2168
2169         * mini-s390.h: Remove an unused define.
2170         
2171         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
2172         the arch independent trampoline code in mini-trampolines.c.
2173
2174         * mini-arm.c (mono_arch_emit_prolog): Fix build.
2175
2176 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
2177
2178         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
2179
2180         * mini-s390.c (mono_arch_emit_prolog): Fix build.
2181
2182         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
2183
2184         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
2185
2186         * cpu-amd64.md: Use smaller sizes for int opcodes.
2187
2188         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
2189
2190         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
2191         objects.cs.
2192
2193         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
2194         debugging.
2195
2196         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
2197         instead of though a pointer to save an indirection when accessing elements of
2198         the array.
2199
2200         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
2201         some typos.
2202         (NOT_IMPLEMENTED): New helper macro.
2203         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
2204         of a bb.
2205
2206         * *.c: Use the new helper macro.
2207
2208 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
2209
2210         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
2211
2212 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
2213
2214         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
2215         stack slots.
2216
2217 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
2218
2219         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
2220         profiling is enabled.
2221         
2222         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
2223         the end.
2224         (mono_arch_emit_prolog): Add more first bblock optimizations.
2225
2226         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
2227         in order if possible.
2228         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
2229         bblock, since the arguments are still in their original registers.
2230
2231         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
2232
2233 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
2234
2235         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
2236         as well.
2237
2238         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
2239         offset 0.
2240
2241         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
2242
2243         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
2244         process async exceptions received while in unmanaged code.
2245
2246         * mini.c (mini_init): Install a callback with the runtime which will be called
2247         when a thread receives an async exception while in unmanaged code.
2248
2249         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
2250
2251         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
2252
2253 2008-01-16  Wade Berrier  <wberrier@novell.com>
2254
2255         * cpu-g4.md:
2256         * cpu-arm.md:
2257         * cpu-s390x.md:
2258         fix build
2259
2260 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
2261
2262         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
2263         compilation with sun cc.
2264
2265         * cpu-*.md: Fix the build.
2266
2267         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
2268
2269         * mini-amd64.h: Add some comments to the MonoLMF structure.
2270
2271         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
2272         
2273         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
2274         in the LMF structure if possible. This saves two instructions in the
2275         managed->native wrappers.
2276
2277         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
2278
2279 2008-01-16  Mark Probst  <mark.probst@gmail.com>
2280
2281         * generic-sharing.c: New type argument lookup code which uses the
2282         runtime generic context template.
2283
2284 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
2285
2286         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
2287
2288         * mini-arm.c (add_general): Fix arm eabi parameter passing.
2289         (mono_arch_output_basic_block): Fix localloc implementation.
2290
2291         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
2292
2293         * mini-ia64.c (peephole_pass): Fix ia64 build.
2294
2295         * mini-amd64.c (peephole_pass): Fix a warning.
2296         
2297         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
2298         at a constant offset from sp/fp.
2299
2300         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
2301         instead of obtaining it from *lmf in the managed method case.
2302
2303 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
2304
2305         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
2306
2307 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
2308
2309         * mini.h (MonoInstList): New type.
2310         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
2311         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
2312         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
2313         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
2314         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
2315         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
2316         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
2317         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
2318         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
2319         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
2320         MONO_INST_LIST_FOR_EACH_ENTRY,
2321         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
2322         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
2323         mono_inst_list_first, mono_inst_list_last,
2324         mono_inst_list_next, mono_inst_list_prev): New instruction
2325         list handling interfaces.
2326         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
2327         list head 'ins_list'.
2328         (MonoInst): Replace next pointer with list head 'node'.
2329         (MonoCallInst): Make 'out_args' a MonoInstList.
2330         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
2331         (MonoCompile): Delete reverse_inst_list and
2332         reverse_inst_list_len.
2333         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
2334         mono_arch_lowering_pass, mono_arch_local_regalloc,
2335         mono_arch_output_basic_block, mono_arch_emit_prolog):
2336         Convert to new instruction lists.
2337         (insert_after_ins): Delete.
2338         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
2339         instruction lists.
2340         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
2341         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
2342         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
2343         mono_emulate_opcode, mono_emit_load_got_addr,
2344         inline_method, mono_method_to_ir, mono_print_bb_code,
2345         print_dfn, decompose_pass, nullify_basic_block,
2346         replace_out_block_in_code, remove_block_if_useless,
2347         merge_basic_blocks, move_basic_block_to_end,
2348         try_unsigned_compare, optimize_branches, mono_print_code,
2349         mini_select_instructions, remove_critical_edges): Likewise.
2350         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
2351         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
2352         mono_arch_output_basic_block, mono_arch_emit_prolog):
2353         Likewise.
2354         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
2355         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
2356         mono_arch_output_basic_block): Likewise.
2357         (inst_list_prepend, insert_after_ins): Delete.
2358         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
2359         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
2360         instruction lists.
2361         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
2362         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
2363         mono_arch_emit_prolog): Likewise.
2364         * cfold.c (mono_constant_fold): Likewise.
2365         * liveness.c (visit_bb, mono_analyze_liveness,
2366         optimize_initlocals): Likewise.
2367         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
2368         * graph.c (mono_draw_code_cfg): Likewise.
2369         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
2370         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
2371         mono_ssa_cprop): Likewise.
2372         * abcremoval (get_relations_from_previous_bb, process_block):
2373         Likewise.
2374         * local-propagation (mono_cprop_invalidate_values,
2375         mono_local_cprop_bb): Likewise.
2376         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
2377         peephole_pass, mono_arch_output_basic_block,
2378         mono_arch_emit_prolog): Likewise.
2379         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
2380         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
2381         mono_arch_emit_prolog): Likewise.
2382         (insert_after_ins): Delete.
2383         * aliasing.c (print_code_with_aliasing_information,
2384         mono_build_aliasing_information, mono_aliasing_deadce):
2385         Convert to new instruction lists.
2386         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
2387         peephole_pass, NEW_INS, mono_arch_lowering_pass,
2388         mono_arch_local_regalloc, mono_arch_output_basic_block):
2389         Likewise.
2390         (insert_after_ins): Delete.
2391         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
2392         peephole_pass, mono_arch_output_basic_block): Convert to
2393         new instruction lists.
2394         * mini-codegen (InstList, inst_list_prepend,
2395         insert_after_ins): Delete.
2396         (insert_before_ins, get_register_force_spilling,
2397         get_register_spilling, free_up_ireg, free_up_reg,
2398         create_copy_ins, create_spilled_store, alloc_int_reg,
2399         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
2400         to new instruction lists.
2401         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
2402         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
2403         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
2404         (insert_after_ins): Delete.
2405         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
2406         mono_arch_local_regalloc, mono_arch_output_basic_block,
2407         mono_arch_call_opcode): Convert to new instruction lists.
2408         (insert_after_ins): Delete.
2409         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
2410         peephole_pass, mono_arch_output_basic_block,
2411         mono_arch_emit_prolog): Convert to new instruction lists.
2412
2413 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
2414
2415         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
2416
2417         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
2418         Fixes #353182.
2419
2420         * Makefile.am (version.h): Make this work with non-bash shells.
2421
2422 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
2423
2424         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
2425
2426 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
2427
2428         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
2429         the InitializeArray optimization.
2430
2431 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
2432
2433         * mini.c driver.c: Don't include os/gc_wrapper.h.
2434
2435 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
2436
2437         * mini.c (print_jit_stats): Print GC statistics if available.
2438
2439 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
2440
2441         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
2442
2443 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
2444
2445         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
2446
2447 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
2448
2449         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
2450         
2451         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
2452
2453         * driver.c (mono_main): Ditto.
2454
2455 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
2456
2457         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
2458
2459         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
2460         in the vtable can't be encoded.
2461         (compile_method): Ditto.
2462
2463 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
2464
2465         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
2466         defined.
2467
2468         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
2469         lmf->rbp.
2470
2471         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
2472         the top LMF entry belongs to the current method.
2473
2474         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
2475
2476 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
2477
2478         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
2479         
2480         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
2481
2482         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
2483
2484         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
2485
2486         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
2487
2488         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
2489         implementation.
2490
2491         * basic-float.cs: Add an ulong->double cast test.
2492
2493 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
2494
2495         * mini.c (mono_method_to_ir): Fix a warning.
2496
2497 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
2498
2499         * mini-ops.h: Add OP_SWITCH.
2500
2501         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
2502         CEE_SWITCH in back-end code, use OP_SWITCH instead.
2503
2504 2007-12-11  Geoff Norton  <gnorton@novell.com>
2505
2506         * mini-s390x.c: Minor change to the MAX() define to allow
2507         it to compile with other gcc versions.
2508
2509 2007-12-11  Geoff Norton  <gnorton@novell.com>
2510
2511         * cpu-s390x.md:
2512         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
2513
2514 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
2515
2516         exceptions-arm.c (mono_arch_get_restore_context): Restore
2517         the frame pointer.
2518
2519         exceptions-arm.c (throw_exception): Save the frame pointer.
2520         This is a partial fix for #323747. Only the client side is
2521         fixed.
2522
2523 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
2524
2525         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
2526         was using an unrelated variable to log the class which
2527         needed the cctor to be called. This was crashing on arm.
2528
2529 2007-12-09  Robert Jordan  <robertj@gmx.net>
2530
2531         * mini-x86.c (mono_arch_emit_epilog):
2532         Consider all kinds of 64-bit types. Fixes #323114.
2533
2534 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
2535
2536         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
2537
2538 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
2539
2540         * mini-amd64.c (peephole_pass): Add a missing instruction check.
2541
2542 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
2543
2544         * mini.c: run type ctor before allocating an object, not only
2545         when running it's constructor method (fixes at least part of bug #342507).
2546
2547 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
2548         
2549         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
2550         
2551         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
2552         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
2553         function.
2554
2555         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
2556         mono_generic_class_init_trampoline () the same as it is done with the other
2557         trampolines.
2558
2559         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
2560         aot-runtime.c aot-compiler.c: Implement AOT support.    
2561
2562 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2563
2564         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
2565         build for archs which don't have the vtable trampoline defined
2566         yet.
2567
2568 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
2569
2570         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
2571
2572         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
2573
2574         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
2575
2576         * tramp-<ARCH>.c: Use the new helper function.
2577
2578 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2579
2580         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
2581         trampoline call, which takes a vtable argument.
2582
2583         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
2584         OP_TRAMPCALL_VTABLEs like other calls.
2585
2586         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
2587         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
2588         call.  Implemented a support function which fetches the vtable
2589         from a register set.
2590
2591         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
2592         Implemented a generic class init trampoline, using the
2593         OP_TRAMPCALL_VTABLE opcode.
2594
2595         * mini.c: Implemented static field access when sharing generic
2596         code.  This implies initing the class using the new
2597         OP_TRAMPCALL_VTABLE call.
2598
2599 2007-12-07  Mark Probst  <mark.probst@gmail.com>
2600
2601         * mini.c: Don't compile methods with sharing enabled if their
2602         classes are disabled for sharing.
2603
2604 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
2605
2606         * inssel.brg: Add a missing sign extension to the GETCHR and array access
2607         opcodes. Fixes #346563.
2608
2609         * objects.cs: Add a new test.
2610
2611         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
2612
2613         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
2614         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
2615
2616 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
2617
2618         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
2619
2620 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
2621
2622         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
2623         code stream.
2624
2625 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
2626
2627         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
2628
2629         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
2630         optimization in the AOT case.
2631         
2632 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
2633
2634         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
2635         
2636         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
2637
2638         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
2639
2640         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
2641
2642         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
2643         is created by the inlined delegate ctor.
2644
2645         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
2646
2647         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
2648
2649 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
2650
2651         * cpu-x86.md: Fix the length of ckfinite.
2652
2653 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
2654
2655         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
2656         
2657         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
2658         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
2659
2660         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
2661
2662         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
2663         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
2664
2665 2007-11-28  Martin Baulig  <martin@ximian.com>
2666
2667         * mini-x86.c
2668         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
2669         after creating the trampoline.
2670
2671 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
2672
2673         * aot-runtime.c (load_aot_module): Check runtime version if needed.
2674
2675         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
2676         the same version.
2677
2678         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
2679         instead of the calling method to help AOT.
2680
2681         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
2682
2683 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
2684
2685         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
2686         is defined.
2687
2688 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
2689
2690         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
2691         
2692         * aot-compiler.c (compile_method): Correct check for generic method definitions.
2693         (encode_method_ref): No need to handle generic method definitions specially.
2694
2695         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2696
2697         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
2698         decode_klass_info.
2699
2700         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
2701         encode_klass_info.
2702         (compile_method): Enable generic sharing.
2703
2704 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
2705
2706         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
2707         (mini_method_compile): Add preliminary support for AOTing shared generic code.
2708
2709         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
2710         generic code.
2711
2712         * mini-trampolines.c: Fix a warning.
2713
2714         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
2715         NEW_PCONST.
2716         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
2717         (generic_class_is_reference_type): Remove unused function.
2718
2719         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
2720         in the generic vtable trampoline case.
2721
2722         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
2723         
2724         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
2725         return an AOT method based on a vtable slot.
2726
2727         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
2728
2729         * mini.c (mini_get_vtable_trampoline): Export this.
2730
2731 2007-11-22  Martin Baulig  <martin@ximian.com>
2732
2733         * debug-debugger.h
2734         (MonoDebuggerInfo): Move `debugger_version' up.
2735
2736 2007-11-22  Martin Baulig  <martin@ximian.com>
2737
2738         * mini-amd64.c
2739         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
2740
2741         * mini-trampolines.c
2742         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
2743         after compiling the method.
2744
2745 2007-11-20  Martin Baulig  <martin@ximian.com>
2746
2747         * debug-mini.c
2748         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
2749         (mono_debugger_remove_breakpoint): Likewise.
2750         (mono_debugger_check_breakpoints): Likewise.
2751
2752         * debug-debugger.c: Implement the new breakpoint interface here.
2753
2754 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
2755
2756         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
2757         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
2758
2759         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
2760
2761 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
2762
2763         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
2764
2765         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
2766         mini.c.
2767
2768         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
2769         mini.c.
2770
2771         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
2772         returning a vtype in a register.
2773
2774         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
2775         here from the arch specific code.
2776
2777         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
2778         mini.c.
2779
2780         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
2781         (mono_arch_emit_prolog): Increment maximum prolog size.
2782
2783         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
2784         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
2785
2786         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
2787         MonoGenericSharingContext.
2788
2789         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
2790         MonoGenericSharingContext. Allocate memory from the cfg mempool.
2791
2792 2007-11-15  Mark Probst  <mark.probst@gmail.com>
2793
2794         * mini.c, mini.h, generic-sharing.c: Functions for producing code
2795         which extract fields out of the runtime generic context.  Full
2796         sharing of the NEWARR opcode.
2797
2798 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
2799
2800         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
2801         --enable-minimal=ssa.
2802
2803 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
2804
2805         * mini-trampolines.c (mono_delegate_trampoline): Update after 
2806         mono_marshal_get_delegate_invoke () signature change.
2807
2808 2007-11-13  Mark Probst  <mark.probst@gmail.com>
2809
2810         * mini.c: Removed the shared context in favor of the generic
2811         sharing context.  Allocate the MonoJitInfo structure with room for
2812         the generic sharing context if it's needed.
2813
2814         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
2815         domain-internals.h now.
2816
2817         * mini-x86.c: Pass the generic sharing context to get_call_info ().
2818
2819         * generic-sharing.c: Several changes for working without a shared
2820         context and instead operating on open types instead.
2821
2822 2007-11-12  David S. Miller  <davem@davemloft.net>
2823
2824        * inssel-sparc.brg: Fix double instruction emit.
2825
2826 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
2827
2828         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
2829         Get/Set/Address methods.
2830         
2831         * mini.c debug-debugger.c mini-trampolines.c: Update after 
2832         mono_marshal_get_delegate_invoke signature change.
2833
2834 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2835
2836         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
2837         This can happens with dynamic methods. Fixes the other bug in #322722.
2838
2839 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2840
2841         * tramp-arm.c (mono_arch_patch_callsite): Support patching
2842         BX call sequence.
2843
2844         * mini-arm.c (arm_patch): Implement patching of BX call
2845         sequence. Fixes one of the bugs in #322722.
2846
2847 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
2848
2849        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
2850        under Linux.  We only need to flush every 32-byte cache line.    
2851
2852 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
2853
2854         * mini.c:
2855         move_basic_block_to_end: Add branches when needed, eventually creating
2856         a new BB.
2857         optimize_branches: added a parameter that tells if it's ok to create
2858         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
2859         and avoid calling move_basic_block_to_end when it's not ok.
2860         Fixes bug 318677.
2861
2862 2007-11-07  Mark Probst  <mark.probst@gmail.com>
2863
2864         * mini.c: Abort inlining call to InitializeArray if something
2865         looks wrong.  Let the icall handle it, which now has proper safety
2866         checks.
2867
2868 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2869
2870         * mini.c (mono_spill_call): add support for soft-float.
2871
2872         * mini.c (mono_method_to_ir): add support for soft-float
2873         to inlined functions that return float.
2874
2875         * mini.c (mono_method_to_ir): add support for soft-float
2876         to cee_stsfld opcode on float fields.
2877
2878 2007-11-05  Geoff Norton  <gnorton@novell.com>
2879
2880         * mini-x86.h: Fix the structure access for X86 Leopard.
2881
2882
2883 2007-11-05  Martin Baulig  <martin@ximian.com>
2884
2885         * mini-trampolines.c
2886         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
2887         after compiling the method to notify the debugger.
2888
2889 2007-11-05  Martin Baulig  <martin@ximian.com>
2890
2891         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
2892
2893 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
2894
2895         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
2896         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
2897
2898 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
2899
2900         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
2901         native-to-managed wrappers.
2902         
2903 2007-11-01  Geoff Norton  <gnorton@novell.com>
2904
2905         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
2906         members.
2907
2908 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
2909
2910         * mini.c, mini-x86.c: when getting back from unmanaged code
2911         to managed via a marshaled delegate we also need to set the
2912         right domain.
2913
2914 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
2915
2916         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
2917         for amd64.
2918
2919 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
2920
2921         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
2922         let the debugger or other external agents to tell the JIT when
2923         a sw breakpoint has been inserted in the code that the JIT needs
2924         to be able to inspect.
2925
2926 2007-10-31  Martin Baulig  <martin@ximian.com>
2927
2928         * debug-debugger.h
2929         (MonoDebuggerInfo): Remove `runtime_class_init'.
2930
2931 2007-10-30  Martin Baulig  <martin@ximian.com>
2932
2933         * debug-mini.h
2934         (mono_debugger_thread_created): Added `MonoThread *' argument.
2935         (mono_debugger_extended_notification): New public method.
2936         (mono_debugger_trampoline_compiled): New public method.
2937
2938         * debug-mini.c
2939         (MonoDebuggerThreadInfo): Added `thread' and
2940         `extended_notifications' fields.
2941
2942         * debug-debugger.c
2943         (debugger_executable_code_buffer): New static variable.
2944
2945         * debug-debugger.h
2946         (MonoDebuggerInfo): Added `executable_code_buffer',
2947         `executable_code_buffer_size', `breakpoint_info_area',
2948         `breakpoint_table' and `breakpoint_table_size'.
2949
2950 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
2951
2952         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
2953         that IP  either is an unused value or the vtable pointer. IMT 
2954         calls use vtable + offset now. Reduced by almost half the size
2955         of IMT entries.
2956
2957 2007-10-26  Jonathan Chambers <joncham@gmail.com>
2958
2959         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
2960         defines to access param registers. Replace long usage with
2961         gsize as sizeof(long) != sizeof(void*) on Win64.
2962
2963         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
2964         on Win64. Fix intrinsic, use _AddressOfReturnAddress
2965         instead of non-existant _GetAddressOfReturnAddress.
2966
2967         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
2968         param registers. Save/restore %rdi and %rsi in MonoLMF.
2969
2970         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
2971         param registers. Modify (throw_exception) signature to take 
2972         %rdi and %rsi on Win64. 
2973
2974         Code is contributed under MIT/X11 license.
2975
2976 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
2977
2978         * helpers.c: unlink debugging output files.
2979
2980 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
2981
2982         * mini.c: Move mono_create_ftnptr () to object.c.
2983
2984 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2985
2986         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
2987         optional. This function can now be used to disassemble code generated
2988         outside the JIT such as trampolines and IMT thunks.
2989
2990         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
2991
2992         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
2993         vtable pointer from a ldr instruction.
2994
2995         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
2996         new IMT call sequence.
2997
2998         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
2999         call sequence for interface invocations.
3000
3001         * mini-arm.c (mono_arch_emit_imt_argument): added, required
3002         for imt support. This function is empty since IMT on ARM requires no
3003         special handling on the IR side.
3004
3005         * mini-arm.c (mono_arch_find_imt_method): added, required for
3006         imt support.
3007
3008         * mini-arm.c (mono_arch_find_this_argument): added, required
3009         for imt support.
3010
3011         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
3012         a ldr instruction to load a value stored in the code stream.
3013
3014         * mini-arm.c (mono_arch_build_imt_thunk):added, required
3015         for imt support.
3016
3017
3018 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
3019
3020         * mini.c (mini_init): Install the jump trampoline callback.
3021
3022 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3023
3024         * mini-trampolines.c: handle synchronized methods with the common
3025         vtable trampoline (bug #335601).
3026
3027 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
3028
3029         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
3030
3031         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
3032         64 bit platforms.
3033
3034         * mini-ia64.h mini-ia64.c: Add support for IMT.
3035
3036         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
3037         prolog. Fixes #331958.
3038
3039 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
3040
3041         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
3042
3043 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3044
3045         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
3046         trampoline.
3047
3048 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3049
3050         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
3051         trampoline.
3052
3053 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
3054
3055         * mini-x86.c, mini-x86.h: x86 support for the common vtable
3056         trampoline.
3057
3058 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
3059
3060         * mini-trampolines.c: changed the magic rampoline to understand
3061         the common vtable trampoline method: the method to invoke is
3062         determined by the vtable displacement of the call.
3063
3064 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3065
3066         * mini.c, mini.h: register the common vtable trampoline if the
3067         architecture supports it.
3068
3069 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3070
3071         * cpu-amd64.md: use the correct max length for tls_get.
3072
3073 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
3074
3075         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
3076         CEE_STELEM_ANY. Fixes #333696.
3077
3078 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
3079
3080         * exceptions-x86.c: provide more graceful handling of the case where
3081         we followed a bogus function pointer from managed code (bug #332866).
3082
3083 2007-10-11  Mark Probst  <mark.probst@gmail.com>
3084
3085         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
3086         replaces the generic_shared flag and will carry more information
3087         in the future.
3088
3089         * generic-sharing.c: Added mini_type_stack_size() which allows
3090         allows open types if given a generic sharing context.
3091         mini_get_basic_type_from_generic() takes a
3092         MonoGenericSharingContext* instead of a MonoCompile* now.
3093
3094         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
3095         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
3096         mini-sparc.c, mini-x86.c: Trivial changes required by the two
3097         changes above.  Just passing arguments through to the right
3098         places.
3099
3100 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
3101
3102         * mini-arm.c: unify the call emission to emit_code_seq().
3103
3104 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
3105
3106         * tramp-arm.c: reduced the trampoline size.
3107
3108 2007-10-10  Mark Probst  <mark.probst@gmail.com>
3109
3110         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
3111         variable handling out of arch-specific code.
3112
3113 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
3114
3115         * mini-arm.c: implemented fast delegate dispatch.
3116
3117 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
3118
3119         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
3120         that fp elimination is turned off if the space required by locals is too
3121         big. Fixes #331958.
3122
3123 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3124
3125         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
3126         ARM to the new style trampoline.
3127
3128 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
3129
3130         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
3131
3132         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
3133
3134 2007-10-09  Martin Baulig  <martin@ximian.com>
3135
3136         * debug-debugger.h
3137         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
3138         `field_info_offset_offset'.     
3139
3140 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
3141
3142         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
3143         removed more internal usage of the r11 register and made it available
3144         to the register allocator.
3145
3146 2007-10-08  Mark Probst  <mark.probst@gmail.com>
3147
3148         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
3149         when sharing generics and treat type variables as references.
3150
3151 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
3152
3153         * mini-ppc.c: started removing the internal uses of register r11
3154         to eventually allow the register allocator to manage it as an
3155         additional available register.
3156
3157 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
3158
3159         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
3160
3161 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
3162
3163         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
3164         specific trampolines as they are not performance critical as a jump
3165         target (maybe align as before only for AOT code?). This saves about
3166         200 KB of native code on x86 for monodevelop startup.
3167
3168 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
3169
3170         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
3171         monodevelop startup.
3172
3173 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
3174
3175         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
3176
3177         * mini-sparc.h mini-sparc.c: Implement IMT support.
3178
3179         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
3180         its smaller and doesn't clobber sparc_g1.
3181
3182         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
3183
3184 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
3185
3186         * mini-ppc.c: optimized the size of the IMT thunks a bit.
3187
3188 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
3189
3190         * mini-ppc.c: implemented fast delegate invocation.
3191
3192 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
3193
3194         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
3195
3196 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
3197
3198         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
3199         code to the new style trampoline in preparation for IMT support.
3200
3201 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
3202
3203         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
3204         systems already. This also reduces the specific trampiline sizes and
3205         prepares for the use of r12 as the IMT identifier register.
3206
3207 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3208
3209         * mini-mips.h: endianess fix (simplified from a patch by
3210         Thomas Kunze <thommy@tabao.de>, bug #323737).
3211
3212 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
3213
3214         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
3215         to access ucontext fields and enable netbsd support
3216         (partially from Magnus Henoch <mange@freemail.hu>).
3217
3218 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3219
3220         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
3221         use the preprocessor from the CPP env var if it is set.
3222
3223 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
3224
3225         * mini-trampolines.c: fixed an assertion and moved it earlier in the
3226         code, before interface_offset gets used.
3227
3228 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
3229
3230         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
3231         mono_class_setup_vtable () before accessing klass->vtable.
3232
3233 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
3234
3235         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
3236         hackish.
3237
3238 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3239
3240         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
3241         IMT slots (this saves hundreds of KB of memory in programs like
3242         IronPython and Monodevelop).
3243
3244 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
3245
3246         * mini.c: print the delegate counter.
3247
3248 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
3249
3250         * mini-x86.c: make it easier to enable the debugging code for IMT
3251         slots.
3252
3253 2007-09-28  Martin Baulig  <martin@ximian.com>
3254
3255         * debug-debugger.h
3256         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
3257         `mono_method_klass_offset' and `mono_method_token_offset'.
3258
3259 2007-09-20  Mark Probst  <mark.probst@gmail.com>
3260
3261         * mini.c: First generics sharing implementation.  Can only share
3262         in very simple cases.  If sharing doesn't work it falls back to
3263         dedicated compilation.
3264
3265         * mini.h: Flag in MonoCompile to specify whether generic
3266         compilation is shared.  Flags enum for marking which generic inst
3267         of a context is used.  Prototypes for helper functions.
3268
3269         * generic-sharing.c: Helper functions for generic method sharing.
3270
3271         * optflags-def.h: Optimization flag (gshared) for enabling generic
3272         method sharing added.
3273
3274         * Makefile.am: generic-sharing.c added.
3275
3276 2007-09-19 Daniel Nauck <dna@mono-project.de>
3277
3278         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
3279
3280 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
3281         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
3282         fixes bug 325507.
3283
3284 2007-09-19  Martin Baulig  <martin@ximian.com>
3285
3286         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
3287         mono_debug_cleanup() is now part of mono_cleanup().
3288
3289 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
3290
3291         * driver.c (mono_main): Fix a warning.
3292
3293 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
3294
3295         * aot-compiler.c: Optimize various parts when processing large assemblies.
3296         Fixes ##325568.
3297
3298         * mini.c (mono_patch_info_hash): Improve hash function.
3299
3300 2007-09-14  Jonathan Chambers <joncham@gmail.com>
3301
3302         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
3303         
3304         Code is contributed under MIT/X11 license.
3305
3306 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
3307
3308         * mini.c (mini_init): Fix a leak.
3309
3310         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
3311
3312 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3313
3314         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
3315
3316 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
3317
3318         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
3319
3320 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
3321
3322         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
3323         variance tests.
3324
3325         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
3326
3327         * mini.c (handle_alloc): Enable managed allocators in AOT code.
3328
3329         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
3330
3331         * aot-runtime.c (decode_patch_info): Ditto.
3332
3333 2007-09-12  Jonathan Chambers <joncham@gmail.com>
3334
3335         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
3336         static case. Cache delegates in architecture specific code, 
3337         based on number of parameters.
3338         
3339         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
3340         in architecture specific code, based on number of parameters.
3341         
3342         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
3343         caching happen in architecture specific code now.
3344         
3345         Code is contributed under MIT/X11 license.
3346
3347 2007-09-12  Jonathan Chambers <joncham@gmail.com>
3348
3349         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
3350         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
3351         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
3352
3353         Code is contributed under MIT/X11 license.
3354
3355 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
3356         * mini.c: (mono_thread_abort) Fixed bug #82416.
3357
3358 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
3359
3360         * mini.: hook the new managed GC allocation feature into the JIT.
3361
3362 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
3363
3364         * mini.c: implementation for the new runtime tls opcode.
3365
3366 2007-09-11  Martin Baulig  <martin@ximian.com>
3367
3368         * debug-debugger.h
3369         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
3370         `mono_method_inflated_offset'.
3371
3372 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
3373
3374         * driver.c mini.h mini.c: Add a new devel command line option for injecting
3375         async exceptions into a method.
3376
3377         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
3378         purpose of testing whenever the unwinder works at every instruction.
3379
3380 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
3381
3382         * mini.c: check accessibility of method used in ldftn (fixes
3383         bug #82635).
3384
3385 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
3386
3387         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
3388
3389         * inssel.brg: Fix a warning.
3390
3391 2007-09-03  Martin Baulig  <martin@ximian.com>
3392
3393         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
3394         now takes the `main_method' as argument.
3395
3396 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
3397
3398         * cpu-sparc.md (endfilter): Add missing src1:i argument.
3399
3400 2007-08-30  Jonathan Chambers <joncham@gmail.com>
3401
3402         * driver.c: include the cil-coff.h header on Windows.
3403         
3404         Code is contributed under MIT/X11 license.
3405
3406 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
3407
3408         * mini.c, driver.c: don't include the cil-coff.h header.
3409
3410 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
3411
3412         * mini.c: flag places that needs fixes fo soft-float support.
3413
3414 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
3415
3416         * mini.h, inssel-float.brg: fix soft-float constant loads on big
3417         endian systems (partially from Dean Jenkins, bug #81924).
3418
3419 2007-08-28  Mark Probst  <mark.probst@gmail.com>
3420
3421         * mini.c (check_linkdemand): Remove embedded reference object in
3422         call to LinkDemandSecurityException.
3423         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
3424         with an IntPtr instead of a reference object.
3425
3426 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
3427
3428         * mini.c (handle_initobj): Handle alignment properly.
3429
3430         * inssel.brg (mini_emit_memset): Ditto. 
3431
3432         * inssel.brg (mini_emit_memcpy): Ditto. 
3433
3434         * inssel-sparc.brg: Ditto.              
3435
3436         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
3437
3438 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
3439
3440         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
3441         exceptions raised in unmanaged code. Fixes part of #82594.
3442
3443 2007-08-24  Mark Probst  <mark.probst@gmail.com>
3444
3445         * mini.c (mono_method_to_ir), declsec.c
3446         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
3447
3448 2007-08-22  Martin Baulig  <martin@ximian.com>
3449
3450         * debug-mini.h
3451         (MonoDebuggerThreadInfo): New typedef.
3452         (mono_debugger_thread_table): New global variable.
3453         (mono_debugger_thread_created): New public function.
3454         (mono_debugger_thread_cleanup): New public function.
3455
3456         * debug-debugger.h
3457         (MonoDebuggerInfo):
3458         - removed `get_current_thread' and `lookup_assembly'.
3459         - removed `data_table'.
3460         - added `thread_table'.
3461
3462         * mini.c
3463         (mono_thread_start_cb): Call mono_debugger_thread_created().
3464         (mono_thread_attach_cb): Likewise.
3465         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
3466         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
3467         initial domain.
3468
3469         * driver.c (mono_main): Move mono_debug_init() up, before calling
3470         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
3471
3472 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3473
3474         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
3475         together when passing several arguments of type double (gives a small
3476         speedup and saves a few bytes of generated code).
3477
3478 2007-08-20  Jb Evain  <jbevain@novell.com>
3479
3480         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
3481
3482 2007-08-20  Jb Evain  <jbevain@novell.com>
3483
3484         * mini.c (mono_method_to_ir): throw MethodAccessException
3485         and FieldAccessException instead of InvalidProgramException.
3486
3487 2007-08-20  Mark Probst  <mark.probst@gmail.com>
3488
3489         * mini.c: CoreCLR security checks.
3490
3491         * mini.h: Removed MonoSecurityMode (moved to
3492         metadata/security-manager.h) and mono_security_mode global var
3493         (replaced by set/get functions in security-manager.h).
3494
3495         * driver.c: Added "core-clr-test" security mode for testing.  Used
3496         set-function for setting security mode.
3497
3498 2007-08-17  Mark Probst  <mark.probst@gmail.com>
3499
3500         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
3501         the new jit_info_table.
3502
3503         * driver.c: Test code for the new jit_info_table (enabled by the
3504         define MONO_JIT_INFO_TABLE_TEST).
3505
3506 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
3507
3508         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
3509         detection of call <REG> instruction sequence. Fixes build on freebsd.
3510
3511 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
3512
3513         * mini-exceptions.c: Fix a warning.
3514
3515 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
3516
3517         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
3518         stack overflow handling code on amd64 too.
3519
3520         * mini-exceptions.c (mono_setup_altstack): Make this use 
3521         mono_thread_get_stack_bounds ().
3522
3523         * mini-x86.h: Disable sigaltstack on solaris x86.
3524
3525 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
3526
3527         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
3528
3529 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
3530
3531         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
3532
3533 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
3534
3535         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
3536
3537         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
3538
3539 2007-08-03  Neale Ferguson <neale@sinenomine.net>
3540
3541         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
3542         due to alignment.
3543
3544 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
3545
3546         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
3547         to be emitted (bug #82281).
3548
3549 2007-08-01  Martin Baulig  <martin@ximian.com>
3550
3551         Merged the `debugger-dublin' branch.
3552
3553         * debug-debugger.h (MonoDebuggerInfo):
3554         Removed the `old_*' compatibility entries.
3555         Added `debugger_version' and `data_table'.
3556         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
3557         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
3558
3559         * debug-mini.c
3560         (MiniDebugMethodBreakpointInfo): Add `address_list'.
3561         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
3562         instead of a `gconstpointer'.
3563         (mono_debugger_insert_method_breakpoint): Return a
3564         `MonoDebugMethodAddressList *'.
3565
3566 2007-06-28  Martin Baulig  <martin@ximian.com>
3567
3568         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
3569
3570 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
3571
3572         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
3573         __builtin_frame_address () since it is broken on older gcc versions.
3574
3575 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
3576
3577         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
3578         on the stack overflow handling and made the managed stack overflows
3579         catchable in most cases using soft guard pages.
3580         * exceptions-x86.c: added code to restore the protection in the soft
3581         guard pages at the end of exception handling.
3582
3583 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
3584
3585         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
3586
3587 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3588
3589         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
3590         exception handling.
3591
3592 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3593
3594         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
3595         signal handling support until it has been ported to the new mechanism.
3596         * mini.c: fixed stack overflow detection and use the new
3597         architecture code  to handle signals on the altstack.
3598
3599 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
3600
3601         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
3602         stack overflows on the alt stack.
3603
3604 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
3605
3606         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
3607         stack overflows on the alt stack.
3608
3609 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
3610
3611         * exceptions-ppc.c: cleanup preparing for altstack support.
3612
3613 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3614
3615         * exceptions-arm.c: cleanup preparing for altstack support.
3616
3617 2007-07-27  Mark Probst  <mark.probst@gmail.com>
3618
3619         * mini.c (print_jit_stats): Output hazard pointer stats.
3620
3621 2007-07-26  Mark Probst  <mark.probst@gmail.com>
3622
3623         * driver.c, mini.c: Replaced security mode flags with a single
3624         enum variable.
3625
3626 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3627
3628         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
3629
3630 2007-07-25  Mark Probst  <mark.probst@gmail.com>
3631
3632         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
3633         (which doesn't do anything yet) for activating Core CLR
3634         (Silverlight) security.
3635
3636 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
3637
3638         * mini-codegen.c: work around a possible gcc bug on arm.
3639
3640 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
3641
3642         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
3643         message for platforms that don't support AOT compilation.
3644
3645 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
3646
3647         * mini.h, mini.c, driver.c: temporary smcs hack.
3648
3649 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
3650
3651         * mini-arm.h, mini-arm.c: arm EABI fixes.
3652
3653 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
3654
3655         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
3656         case.
3657
3658         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
3659         trampolines taking a method argument.
3660
3661         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
3662
3663         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
3664         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
3665
3666         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
3667         JIT compilation throws an exception. Fixes #82050.
3668
3669 2007-07-19  Mark Probst  <mark.probst@gmail.com>
3670
3671         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
3672         with the MONO_EXCEPTION_ defines.
3673
3674 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
3675
3676         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
3677         #82117.
3678         
3679         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
3680         the cause of an assertion.
3681
3682 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
3683
3684         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
3685         removed.
3686
3687 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
3688
3689         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
3690         assert. Should fix #82103.
3691
3692 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
3693
3694         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
3695         here too. Fixes #82095.
3696
3697         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
3698         addresses.
3699
3700         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
3701
3702         * mini-amd64.h: Enable IMT for amd64.
3703         
3704         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
3705
3706 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
3707
3708         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
3709
3710 2007-07-12  Mark Probst  <mark.probst@gmail.com>
3711
3712         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
3713         as soon as check_linkdemand sets an exception_type.
3714
3715 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
3716
3717         * mini-x86.c: fixed offsets for IMT call sequence.
3718         * mini-x86.h: enable IMT again.
3719
3720 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
3721
3722         * trace.c (mono_trace_enter_method): Decode MonoType too.
3723
3724         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
3725
3726         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
3727
3728         * mini-amd64.c: Add preliminary IMT implementation.
3729         
3730 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
3731
3732         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
3733         understand the new IMT-base interface invocation (thanks to
3734         Daniel Nauck for the report and the remote debugging session).
3735
3736 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
3737
3738         * mini-x86.c: size and speed optimizations for the IMT bsearch.
3739
3740 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
3741
3742         * Makefile.am (aotcheck): Make this actually use the AOTed code.
3743
3744 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
3745
3746         * mini-trampolines.c: implement AOT IMT support.
3747         * mini-x86.h: enable IMT support for wider testing.
3748
3749 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3750
3751         * inssel.brg (emit_imt_argument): Add aot support here.
3752
3753         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
3754
3755 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3756
3757         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
3758         of the IMT implementation, partially from massi, with my
3759         implementation of the bsearch sequence. Disabled by default until
3760         the AOT code is implemented.
3761
3762 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
3763
3764         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
3765
3766         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
3767
3768 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3769
3770         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
3771         arch-independent IMT JIT code from Massimiliano
3772         Mantione (massi@ximian.com) with small cleanups from me.
3773
3774 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3775
3776         * Makefile.am: fix svn invocation to get the svn revision to be
3777         independent of the local language (build fix).
3778
3779 2007-07-09  Mark Probst  <mark.probst@gmail.com>
3780
3781         * mini.c (inline_method): Reset cfg->exception_type if the
3782         inlining is aborted.  Fixes: 82049.
3783
3784 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
3785
3786         * mini.c: remove assert from exception handling code when exception_ptr
3787         is not set.
3788
3789 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3790
3791         * mini.c (mono_codegen): Add an assert.
3792
3793         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
3794         enter and leave code.
3795         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
3796
3797 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3798
3799         * mini-ppc.c: fixed memory corruption for localloc(0)
3800         (bug #81852).
3801
3802 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
3803         
3804         * mini.c: Fix warnings.
3805
3806 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
3807
3808         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
3809         to emit better double->int conversions.
3810
3811 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
3812
3813         * mini.c: the provided Min/Max optimizations are valid for unisgned
3814         ints.
3815
3816 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
3817
3818         * 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
3819
3820 2007-06-28  Miguel de Icaza  <miguel@novell.com>
3821
3822         * mini.c (mono_running_on_valgrind): Add support for reporting the
3823         method and  its boundaries to valgrind.
3824
3825 2007-06-28  Martin Baulig  <martin@ximian.com>
3826
3827         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
3828
3829 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
3830
3831         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
3832
3833         * generic.2.cs: Add new test case.
3834
3835 2007-06-25  Martin Baulig  <martin@ximian.com>
3836
3837         Merged the `debugger-dublin' branch.
3838
3839         * debug-mini.c
3840         (mono_debugger_insert_method_breakpoint): New public method.
3841         (mono_debugger_remove_method_breakpoint): Likewise.
3842         (mono_debugger_check_breakpoints): New static method.
3843         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
3844
3845         * debug-debugger.h (MonoDebuggerInfo):
3846         Renamed (to keep backward compatibility in the vtable):
3847         `insert_breakpoint' -> `old_insert_breakpoint'.
3848         `remove_breakpoint' -> `old_remove_breakpoint'.
3849         `create_string' -> `old_create_string'.
3850         `lookup_class' -> `old_lookup_class'.
3851         `lookup_type' -> removed; changed into a dummy field.
3852         `lookup_assembly' -> `old_lookup_assembly'.
3853         Added (same functionality, but different signature):
3854         `create_string', `lookup_class', `lookup_assembly'
3855         Added new:
3856         `get_method_addr_or_bpt', `remove_method_breakpoint',
3857         `runtime_class_init'.
3858
3859         * debug-debugger.c: Merged the `debugger-dublin' branch.
3860
3861 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
3862
3863         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
3864         well.
3865         (peephole_pass): Likewise.
3866
3867 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
3868
3869         * driver.c: hopefully make setaffinity work also for ancient
3870         versions of linux.
3871
3872 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
3873
3874         * driver.c : win32 build fix.
3875
3876 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3877
3878         * driver.c: check for the MONO_NO_SMP env var and bind to a single
3879         processor if it is set.
3880
3881 2007-06-21  Martin Baulig  <martin@ximian.com>
3882
3883         * debug-mini.h: New file.
3884
3885         * debug-mini.c
3886         (mono_debugger_insert_breakpoint_full): Moved here from
3887         ../metadata/mono-debug-debugger.c.
3888         (mono_debugger_remove_breakpoint): Likewise.
3889         (mono_debugger_breakpoint_callback): Likewise.
3890
3891 2007-06-15  Raja R Harinath  <rharinath@novell.com>
3892
3893         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3894         changes in MonoGenericClass.
3895
3896 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
3897
3898         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
3899
3900 2007-06-14  Raja R Harinath  <rharinath@novell.com>
3901
3902         * jit-icalls.c (mono_helper_compile_generic_method): Update to
3903         removal of MonoGenericMethod.
3904
3905 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3906
3907         * mini-exceptions.c: hooks for the exception events profiling API.
3908
3909 2007-06-14  Randolph Chung  <tausq@debian.org>
3910
3911         * Makefile.ma: Add hppa target.
3912         * mini-arch.h: Include mini-hppa.h
3913         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
3914         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
3915         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3916
3917 2007-06-14  Randolph Chung  <tausq@debian.org>
3918
3919         * inssel.brg: Add rules for "chained" compare-branch operations so that
3920         a single compare op can affect multiple branches.  Adjust cost for
3921         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
3922         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
3923         cost for some rules so that they can more easily be overridden by
3924         per-arch rules (with fixes from lupus).
3925         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3926
3927 2007-06-13  Randolph Chung  <tausq@debian.org>
3928
3929         * mini-ops.h: Reorder branch ops so that they match the order of the
3930         corresponding CEE_* ops.  The code expects them this way.
3931         Add new ops for HPPA target.
3932         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3933
3934 2007-06-13  Randolph Chung  <tausq@debian.org>
3935
3936         * mini-exceptions.c: Handle cases where the stack grows towards
3937         larger addresses.
3938         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
3939
3940 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
3941
3942         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
3943         counter.
3944         * driver.c: explain where a non-matching corlib is found.
3945
3946 2007-06-13  Mark Probst  <mark.probst@gmail.com>
3947
3948         * mini.c (print_jit_stats): Output dynamic code allocation stats.
3949
3950 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
3951
3952         * mini-exceptions.c: Generate a method profile leave event during
3953         an exception to ensure that the profiler gets notified.
3954
3955 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
3956
3957         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
3958         branch.
3959
3960         * cpu-amd64.md: Add long_and/or/xor opcodes.
3961
3962 2007-06-06  Wade Berrier  <wberrier@novell.com>
3963
3964         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
3965         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
3966         length of instruction shr_imm (expected 8, got 10)
3967
3968 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
3969
3970         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
3971
3972 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3973
3974         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3975         MonoInternalHashTable again (fixed bug in the internal hash table
3976         code).
3977
3978 2007-06-06  Mark Probst  <mark.probst@gmail.com>
3979
3980         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
3981         Have to figure out what makes it crash the SWF regression.
3982
3983 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
3984
3985         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
3986
3987 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3988
3989         * mini.c: optimize out the type check when storing null in a
3990         reference array.
3991
3992 2007-06-04  Mark Probst  <mark.probst@gmail.com>
3993
3994         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
3995         MonoInternalHashTable.
3996
3997 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
3998
3999         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
4000         signed integer methods.
4001
4002 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
4003
4004         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
4005         permanently since the current approach doesn't work.
4006
4007 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
4008
4009         * inssel.brg (stmt): Only call delegate->invoke_impl if 
4010         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
4011
4012 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
4013
4014         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
4015         the sreg2==rdx case.
4016         
4017         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
4018         account if it contains a rex prefix.
4019         (peephole_pass): Handle OP_FMOVE as well.
4020
4021 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
4022
4023         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
4024         as it causes regressions.
4025
4026 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
4027
4028         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
4029         static case as well.
4030
4031         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
4032
4033         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
4034         (mono_arch_get_this_arg_from_call): Ditto.
4035
4036         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
4037
4038         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
4039         invoke_impl field.
4040
4041         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
4042         (mono_arch_get_this_arg_from_call): Ditto.
4043
4044         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
4045         
4046         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
4047         try to create optimized invoke code and use that for further invocations. 
4048         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
4049
4050         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
4051
4052 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
4053
4054         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
4055         sealed classes or methods.
4056         *devirtualization.cs: tests for the new optimization
4057
4058 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
4059
4060         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
4061         by the update_volatile () function.
4062
4063 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
4064
4065         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
4066         require it.
4067
4068         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
4069
4070 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
4071
4072         * mini.c: Add configure checks for header files.
4073         * mini-x86.c: Add configure checks for header files.
4074         * trace.c: Add configure checks for header files.
4075         * aot-runtime.c: Add configure checks for header files.
4076         * aot-compiler.c: Add configure checks for header files.
4077         * driver.c: Add configure checks for header files.
4078         * mini-codegen.c: Add configure checks for header files.
4079         
4080         Code is contributed under MIT/X11 license.
4081
4082 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
4083
4084         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
4085         icompare_imm -128 + op_iclt. Fixes #81703.
4086
4087 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
4088
4089         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
4090
4091 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
4092
4093         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
4094         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
4095         so that all isinst checks now use "interface_bitmap".
4096
4097 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
4098
4099         * cpu-amd64.md (jmp): Fix a warning.
4100
4101         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
4102
4103         * basic.cs: Add new regression test.
4104
4105         * basic.cs: Remove test which is now in basic-long.cs.
4106
4107         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
4108
4109         * basic-long.cs: Add new test.
4110         
4111 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
4112
4113         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
4114
4115 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
4116
4117         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
4118
4119         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
4120         places.
4121         
4122         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
4123         throwing code a bit.
4124
4125         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
4126         the exception throwing code a bit.
4127
4128         * mini-x86.c (get_call_info): Allocate result from a mempool.
4129
4130 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
4131
4132         * aot-compiler.c (find_typespec_for_class): Fix the assert.
4133
4134         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
4135
4136         * mini.h (MonoCompile): Add 'token_info_hash' field.
4137
4138         * mini.c: Save token->method associations during compilation so the AOT 
4139         compiler can use it.
4140         
4141         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
4142         which reference generic classes and methods.
4143
4144 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
4145
4146         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
4147
4148         * aot-compiler.c (compile_method): Fix a typo in a comment.
4149
4150         * aot-runtime.c (decode_cached_class_info): Skip generic types.
4151
4152         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
4153         everything generic.
4154
4155         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
4156
4157 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
4158
4159         * mini.h (MonoCompile): Add 'args' field.
4160
4161         * mini.c (mono_compile_create_vars): Store variables representing the arguments
4162         into cfg->args.
4163
4164         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
4165
4166 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
4167
4168         * mini.c (mono_compile_get_interface_var): Remove this unused function.
4169
4170         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
4171
4172         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
4173         opcodes for some opcodes.
4174
4175         * mini.h *.brg *.c: Use the new opcodes.
4176
4177 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
4178
4179         * mini.h: Bumped aot revision.
4180
4181         * inssel.brg: modified code generation of type checks for interfaces
4182         to use the new "MonoClass.interface_bitmap" instead of the old
4183         "MonoClass.interface_offsets".
4184
4185 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
4186
4187         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
4188
4189 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
4190
4191         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
4192         64 bit platforms.
4193
4194 2007-04-27  Neale Ferguson <neale@sinenomine.net>
4195
4196         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
4197
4198 2007-04-27  Wade Berrier  <wberrier@novell.com>
4199
4200         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
4201         mini.h) to fix build.
4202
4203 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
4204
4205         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
4206         
4207         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
4208         causes the corlib unit tests to fail.
4209
4210 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
4211
4212         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
4213
4214         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
4215
4216         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
4217         opcodes to the comparison relations.
4218
4219         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
4220         opcodes to their types.
4221         
4222         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
4223
4224         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
4225         it in cfg->arch.cinfo.
4226
4227         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
4228
4229         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
4230         cfg->cil_offset_to_bb.
4231
4232 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
4233
4234         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
4235         created becase of initlocals.
4236
4237 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
4238
4239         * mini-alpha.c cpu-alpha.md: More alpha port work from 
4240         Sergey Tikhonov <tsv@solvo.ru>.
4241
4242 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
4243
4244         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
4245
4246 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
4247
4248         * cpu-s390.md (break): Correct the length of break instruction.
4249
4250 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4251
4252         * mini.c: fix a couple of soft-float issues and comments.
4253
4254 2007-04-15  Miguel de Icaza  <miguel@novell.com>
4255
4256         * trace.c (is_filenamechar): - is also a filename char.
4257
4258 2007-04-15  Neale Ferguson <neale@sinenomine.net>
4259
4260         * mini-s390.c: Correct checking for enum type in return value processing.
4261
4262 2007-04-14  Raja R Harinath  <rharinath@novell.com>
4263
4264         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
4265         (version.h): Makefile is in the build directory.
4266
4267 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
4268
4269         * mini-amd64.h: fix for assertion failure on Solaris/amd64
4270
4271 2007-04-11  Martin Baulig  <martin@ximian.com>
4272
4273         * mini.c (can_access_member): Fix handling of generic classes;
4274         fixes #81259.
4275
4276 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
4277
4278         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
4279
4280 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
4281
4282         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
4283
4284 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
4285
4286         * mini-codegen.c: make sure the right spill amount is
4287         used for fp or integer registers (fixes the float_sub_spill() on ppc).
4288
4289 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
4290
4291         * mini-ppc.c: fixes for the fp_branch_nan test.
4292
4293 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
4294
4295         * basic.cs: Comment out new test which still fails on ia64.
4296
4297 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4298
4299         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
4300
4301 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
4302
4303         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
4304
4305 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
4306
4307         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
4308         on 64 bit machines. Fixes part of #80738.
4309
4310         * basic.cs: Add regression test.
4311
4312 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
4313
4314         * inssel.brg basic.cs: Revert previous change to fix build.
4315
4316         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
4317         platforms.
4318         
4319         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
4320
4321         * basic.cs: Add new regression test.
4322
4323 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
4324
4325         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
4326         many arguments.
4327
4328 2007-03-16  Neale Ferguson <neale@sinenomine.net>
4329
4330         * cpu-s390x.md: Correct length of break instruction.
4331
4332 2007-03-16  Neale Ferguson <neale@sinenomine.net>
4333
4334         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
4335         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
4336
4337 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
4338
4339         * *.c: Begin WIN64 port.
4340         * mini.c:  Use correct register in profiler.
4341         * mini-amd64.c: No inline assembly on Win64.
4342         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
4343         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
4344         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
4345         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
4346         mono_arch_ip_from_context for Win64.
4347         
4348         Contributed under MIT/X11 license.
4349
4350 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
4351
4352         * exceptions-amd64.c (seh_handler): Ditto.
4353
4354         * exceptions-x86.c (seh_handler): Fix a memory leak.
4355
4356 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
4357
4358         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
4359         mini-s390x.c: fixed peephole optimizations to deal
4360         correctly with 1 and 2 byte reload avoidance.
4361
4362 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
4363
4364         * cpu-s390.md, cpu-s390x.md: update localloc length.
4365
4366 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
4367
4368         * cpu-g4.md: added missing descriptions.
4369
4370 2007-03-14  Miguel de Icaza  <miguel@novell.com>
4371
4372         *  Makefile.am: Add support so the tail tests are not executed on
4373         PowerPC as that is a known limitation of the PowerPC port.
4374
4375 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
4376
4377         * runmdesc.bat:  Move to msvc directory.
4378         
4379 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
4380
4381         * runmdesc.bat:  Run executable that was produced by the current
4382         target and sent via an argument.
4383         
4384 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
4385
4386         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
4387         #81102.
4388
4389         * generics.2.cs: Add regression test.
4390
4391 2007-03-09  Wade berrier  <wberrier@novell.com>
4392
4393         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
4394
4395 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
4396
4397         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
4398         AOT code depends on this.
4399
4400 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
4401
4402         * mini.c: more precise tracking of types in the eval stack
4403         (part of fix for bug #81044).
4404
4405 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
4406
4407         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
4408
4409         * aot-compiler.c (encode_patch): Remove an obsolete comment.
4410
4411 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
4412
4413         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
4414
4415         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
4416
4417 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
4418
4419         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
4420         a pointer on 64 bit systems. Fixes #80190.
4421
4422         * iltests.il: Add new regression test.
4423
4424 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
4425
4426         * mini.c: inline a constant for Environment.IsRunningOnWindows.
4427
4428 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
4429
4430         * trace.c: Remove an erroneous alignemnt check when tracing.
4431           Fixes --trace on OSX86.
4432
4433 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
4434
4435         * mini-$(arch).h: initialize SP in context for all the archs.
4436
4437 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
4438
4439         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
4440         regressions in the thread tests.
4441
4442 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
4443
4444         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
4445         - fixed implementation of LOCALLOC opcode
4446         - implemented non-un compare for floats
4447         - code cleanup
4448         - implementation of FDIV and CKFINITE opcodes
4449         - fixes for latest mono updates
4450         - additional arch opcodes
4451
4452 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
4453
4454         * Makefile.am: simplify and merge rules for cross-compilation.
4455
4456 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
4457
4458         * local-propagation.c: Actually *apply* the fix for bug 80591...
4459
4460 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
4461
4462         * mini-exceptions.c: backuot part of the last change
4463         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
4464
4465 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
4466         * inssel.brg: Fix bug 59286.
4467
4468
4469 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
4470
4471         * mini-exceptions.c: patch from Zoltan to correctly check for
4472         stack boundaries (using the stack register, not the frame register),
4473         fixes bugs #80724, #79717.
4474
4475 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
4476
4477         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
4478         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
4479
4480         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
4481         presence of frame pointer elimination.
4482
4483 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
4484         
4485         * mini-x86.h: NetBSD UCONTEX_REG defines.
4486
4487 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
4488
4489         * inssel-amd64.brg: Fix amd64 build.
4490
4491 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
4492
4493         * mini.h: remove extern to workaround what looks likes gcc bug 26905
4494         on amd64.
4495
4496 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
4497
4498         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
4499         ends.
4500
4501         * mini-<ARCH>.c: Use mono_is_regsize_var ().
4502
4503 2007-01-30 Mark Mason <mason@broadcom.com>
4504
4505            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
4506            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
4507            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
4508            beginning support for CEE_JMP [not quite working yet]
4509            * tramp-mips.c: LMF handling now works
4510         
4511 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
4512
4513         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
4514
4515         * mini.h (NULLIFY_INS): New macro.
4516
4517 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4518
4519         * mini.c: statistical profiler fix for windows, patch
4520         from Tor Lillqvist (tml@novell.com).
4521
4522 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
4523         * local-propagation.c: Fix bug 80591.
4524
4525 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
4526
4527         * Makefile.am: put back the --export-dynamic option as with
4528         the previous gmodule flags (thanks to Robert Jordan).
4529
4530 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
4531
4532         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
4533
4534         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
4535         simplify and speed up the local register allocator. Also rename some fields
4536         like iassign->vassign.
4537         
4538         * regalloc.c: Remove some functions which are no longer used since their
4539         inlined version is in mini-codegen.c.
4540         
4541         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
4542
4543         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
4544
4545 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
4546
4547         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
4548         narrowing. Fixes #80622.
4549
4550         * iltests.il: Add new regresssion test. 
4551
4552 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
4553
4554         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
4555         debug-debugger.c, debug-debugger.h: warning fixes.
4556         * driver.c: updated copyright year and made it fit in one line.
4557
4558 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
4559
4560         * aot-runtime.c: updated to use mono-dl instead of gmodule.
4561
4562 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
4563
4564         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
4565
4566         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
4567
4568         * iltests.il: Add new test for bug #80507.
4569
4570 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
4571
4572         * mini-arm.h: use soft-float also on vfp for now.
4573
4574 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
4575
4576         * mini.c: fix some more soft-float issues.
4577
4578 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
4579
4580         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
4581
4582 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
4583         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
4584         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
4585         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
4586
4587 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
4588
4589         * mini-arm.c: typo fix.
4590
4591 2007-01-23  Neale Ferguson <neale@sinenomine.net>
4592
4593         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
4594
4595 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
4596
4597         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
4598         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
4599
4600         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
4601
4602         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
4603
4604         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
4605         
4606         * inssel.brg: Fix a warning.
4607
4608         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
4609
4610         * abcremoval.c ssa.c ssapre.c: Update after this change.
4611         
4612         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
4613
4614         * dominators.c (df_set): Use mono_bitset_union_fast.    
4615
4616 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
4617
4618         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
4619         mini-codegen.c: reduce relocations and memory usage for the cpu
4620         description.
4621
4622 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
4623
4624         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
4625
4626         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
4627         to reduce their size.
4628
4629 2007-01-19 Mark Mason <mason@broadcom.com>
4630
4631         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
4632         * mini-mips.c: more configuration macros, support long conditional branches, additional
4633         asserts, fix epilog instrumentation.
4634         * mini-mips.h: use standard stack walk
4635         * cpu-mips.md: increase size of div, rem and conditional branches
4636         
4637 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
4638
4639         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
4640         to cpu spec data.
4641
4642 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
4643
4644         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
4645         (compile_method): Ditto.
4646
4647         * aot-runtime.c (decode_klass_info): Ditto.
4648
4649         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
4650         needed by the code generated by inssel.brg. Also fix a warning.
4651
4652 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
4653
4654         * mini.c: deal with enums that become genericinsts by
4655         being nested in a generic class (bug #79956).
4656
4657 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
4658
4659         * mini.c: match the generic definition to check for
4660         private access with generic types (bug #78431).
4661
4662 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
4663
4664         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
4665         to make life easier for people cross-compiling that insist on not
4666         using scratchbox.
4667
4668 2007-01-17 Mark Mason <mason@broadcom.com>
4669
4670         * inssel-long.brg: patch to deal with mips missing flags
4671         * inssel-long32-mips.brg: implement overflow checks
4672         * insset-mips.brg: implement overflow checks
4673         * mini-mips.h: implement conditional exception handling
4674         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
4675           Remove unused code, minor cleanups.
4676         * exceptions-mips.c: minor cleanups
4677         * mini-ops.h: add mips conditional exception ops
4678         * cpu-mips.md: add mips conditional exception ops
4679
4680         
4681 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
4682
4683         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
4684         to deal with mips missing of flags.
4685
4686 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
4687
4688         * exceptions-ppc.c: execute fault handlers.
4689
4690 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
4691
4692         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
4693
4694 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
4695
4696         * mini.c: handle also floating point values in initialize_array.
4697
4698 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
4699
4700         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
4701         array initialization and make it conditional on the intrins option.
4702
4703 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
4704
4705         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
4706         relocations and put the patch info names close to the enum definition.
4707
4708 2007-01-15 Mark Mason <mason@broadcom.com>
4709
4710         * basic.cs, exceptions.cs: break up large tests to increase debugability.
4711
4712 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4713
4714         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
4715
4716 2007-01-12  Raja R Harinath  <rharinath@novell.com>
4717
4718         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
4719
4720 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
4721
4722         * Makefile.am: distribute the mips sources.
4723
4724 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4725
4726         * mini-codegen.h: handle bug #80489 here, by excluding ecx
4727         directly.
4728
4729 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
4730
4731         * cpu-x86.md: back out for now as this triggers other regressions.
4732
4733 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
4734
4735         * cpu-x86.md: force src1 and dest regpair for long shift instructions
4736         to eax:edx, so ecx can't get allocated to them (bug #80489).
4737
4738 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
4739
4740         * mini.c, mini-exceptions.c: enabled running fault handlers
4741         (bug #80469).
4742
4743 2007-01-03  Miguel de Icaza  <miguel@novell.com>
4744
4745         * driver.c: If nothing fail, do not use the string "failed",
4746         because it makes it very annoying to view test result logs on the
4747         web. 
4748
4749 2006-12-30  Miguel de Icaza  <miguel@novell.com>
4750
4751         * debug-debugger.c (mono_debugger_main): Rename "main" to
4752         "main_method" to prevent a warning.
4753
4754         Remove a warning for unused field.
4755
4756 2006-12-28  Martin Baulig  <martin@ximian.com>
4757
4758         * debug-debugger.c
4759         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
4760
4761 2006-12-22  Martin Baulig  <martin@ximian.com>
4762
4763         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
4764         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
4765         seperate `.mdb_debug_info' section, so we can access it from the
4766         debugger even if the binary is stripped.
4767
4768         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
4769         from the `.mdb_debug_info' here to prevent the linker from
4770         removing that section.
4771
4772         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
4773         mdb-debug-info64.s.
4774
4775 2006-12-19  Robert Jordan  <robertj@gmx.net>
4776
4777         * mini-x86: enable the code to return small structures in
4778         registers for FreeBSD as well. Fixes bug #80278.
4779         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
4780
4781 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4782
4783         * mini-x86.c: align the stack when calling the profiler
4784         function instrumenting the prolog (on OSX).
4785
4786 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
4787
4788         * mini.c: emit a break opcode where Debugger.Break () is called.
4789
4790 2006-12-13  Miguel de Icaza  <miguel@novell.com>
4791
4792         * mini.c (mono_method_to_ir): Provide useful information on this
4793         assert, to prevent others from debugging like I did.
4794
4795 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4796
4797         * mini.c: enable code which was incorrectly commented
4798         (bug #80235).
4799
4800 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4801
4802         * mini-x86.c: enable on OSX, too, the code to return small
4803         structures in registers.
4804
4805 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
4806
4807         * mini-x86.c: remove the use of the dynamic code manager here, too.
4808
4809 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
4810
4811         * mini.h, debug-debugger.c, tramp-*.c: fixed 
4812         mono_debugger_create_notification_function() to use
4813         mono_global_codeman_reserve () instead of a dynamic code manager.
4814
4815 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
4816
4817         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
4818         ves_array_element_address() jit icall and use a generated
4819         managed method instead (which is about 4 times faster for a rank 3
4820         array access).
4821
4822 2006-11-29  Mark Mason  <mason@broadcom.com>
4823
4824         * basic-calls.cs: additional tests for passing
4825         structures as function arguments.
4826
4827 2006-11-29  Mark Mason  <mason@broadcom.com>
4828
4829         * mini-mips.h: disable custom exception handling
4830         * mini-mips.c: throw/rethrow should use jalr to call
4831         exception stubs.  Fixed bug with passing structures
4832         by value. More support for tracing floating point
4833         functions.
4834
4835 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
4836
4837         * mini.c: fixed typo in the soft-float ldind.r4 handling
4838         (bug #80086).
4839
4840 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4841
4842         * mini.c, mini.h, driver.c: added --runtime command line
4843         option to select a different runtime than the autodetected one.
4844         * jit.h: added API for embedders to initialize with a specific
4845         runtime version.
4846
4847 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
4848
4849         * mini.c: handle also boxing of r4 values (bug #80024).
4850
4851 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
4852
4853         * mini-ppc.c: force indirect calls until we reserve
4854         enough address space for all the generated code.
4855
4856 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
4857
4858         * exceptions-arm.c: workaround bugs in the libc definition
4859         of struct ucontext.
4860
4861 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
4862
4863         * inssel.brg: fixes from me and Mark Mason.
4864
4865 2006-11-23  Dick Porter  <dick@ximian.com>
4866
4867         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
4868         semaphore display now we've fixed the initial value
4869
4870 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4871
4872         * inssel.brg: partially revert the last change to fix the build.
4873
4874 2006-11-21  Mark Mason  <mason@broadcom.com>
4875
4876         * inssel.brg: Add and use compare-and-branch macros to support
4877         architectures that do not have condition code registers (ie. MIPS).
4878         * *-mips.{c,brg,md}: Fix copyright statements
4879
4880 2006-11-20  Mark Mason  <mason@broadcom.com>
4881
4882         * Makefile.am: remove mini-codegen.c from list of MIPS sources
4883         * mini.c: Allow GET_CONTEXT to be specified by the arch port
4884         * mini.h: Added declaration for mono_print_ins()
4885         * mini-codegen.c: added ins_spec initializer for MIPS
4886         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
4887         vreg to be virtual and hreg to be non-virtual.
4888         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
4889         is not yet working/implemented correctly.
4890         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
4891         non-static, fixup calls to print_ins() from other parts in the file.
4892
4893 2006-11-20  Mark Mason  <mason@broadcom.com>
4894
4895         * basic-calls.cs: added tests for passing structures as arguments
4896         to calls.
4897
4898 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
4899
4900         * inssel-long32.brg: optimize signed division by power of two.
4901
4902 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
4903
4904         * mini-arm.c: added support for interworking with thumb code
4905         (mono must be still be built using the ARM instruction encoding).
4906
4907 2006-11-19  Miguel de Icaza  <miguel@novell.com>
4908
4909         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
4910         verifier has different rules for it.   Fixes a few verifier issues
4911         in the test suite.
4912
4913         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
4914         at the end, so people know what happened.
4915
4916 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
4917
4918         * brach-opts.c: in optimize_exception_target() make sure we
4919         are in a catch clause (fixes bug #79871).
4920
4921 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4922
4923         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
4924         more soft-float support fixes.
4925
4926 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
4927
4928         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
4929         that are passed half on the stack and half in registers.
4930
4931 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
4932
4933         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
4934         more mips integration work from Mark E Mason 
4935         <mark.e.mason@broadcom.com>.
4936
4937 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
4938
4939         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
4940         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
4941         tramp-mips.c: added sources for the mips port, not
4942         integrated in the build yet. Contributed by
4943         Mark E Mason <mark.e.mason@broadcom.com>.
4944
4945 2006-11-14  Neale Ferguson <neale@sinenomine.net>
4946
4947         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
4948
4949 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
4950
4951         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
4952         put the soft-float rules in its own file since it seems to
4953         break s390 compilation.
4954
4955 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
4956
4957         * mini-arm.c: fixed wrnings.
4958
4959 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
4960
4961         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
4962         inssel-arm.brg: ARM support for soft-float.
4963
4964 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
4965
4966         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
4967         loads and stores of 32 bit fp values.
4968
4969 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
4970
4971         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
4972
4973         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
4974         works. Fixes #79852 and #79463.
4975
4976 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
4977
4978         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
4979         more soft-float support WIP and fixes.
4980
4981 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
4982
4983         * mini-arm.c: some VFP updates.
4984
4985 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
4986
4987         * mini-exceptions.c: 0 is a valid local var offset in some
4988         architectures, don't assert (bug #78508).
4989
4990 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
4991
4992         * exceptions-arm.c: fixed off by one error in stack walk code.
4993
4994 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
4995
4996         * mini.h, mini.c: more precise tracking of type load exceptions.
4997
4998 2006-11-03  Robert Jordan  <robertj@gmx.net>
4999
5000         * Makefile.am: [WIN32] Add monow.exe target.
5001         * driver.c: [WIN32] Don't detach the console when debugging.
5002         Fixes bug #79797.
5003         
5004 2006-10-30  Miguel de Icaza  <miguel@novell.com>
5005
5006         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
5007
5008 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
5009
5010         * aot-compiler.c (emit_method_info): Add a case missed earlier.
5011
5012         * driver.c (mini_regression): Fix --regression with AOT.
5013
5014         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
5015
5016 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
5017
5018         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
5019
5020         * mini-sparc.h: Don't use sigaction on sparc/linux.
5021
5022         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
5023
5024         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
5025
5026         * mini-exceptions.c: Add proper include files for getpid ().
5027
5028 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
5029
5030         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
5031         address instead of a MonoJitInfo* to avoid decoding the exception info for the
5032         method.
5033
5034         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
5035         name cache to reduce its size.
5036
5037         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
5038
5039 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
5040
5041         * mini-x86.c: Save/restore the current LMF structure more efficiently using
5042         the mono_lmf TLS variable.
5043
5044         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
5045         trampoline lmf frames.  
5046
5047         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
5048
5049 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
5050
5051         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
5052         the mono_lmf TLS variable.
5053
5054         * mini-exceptions.c: Access the LMF structure through accessors.
5055
5056         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
5057         variable instead of in jit_tls->lmf.
5058
5059         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
5060         
5061         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
5062         trampoline lmf frames.
5063
5064         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
5065
5066 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
5067
5068        * mini.c trace.c mini-x86.c: Revert these too.
5069         
5070        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
5071        signature change.
5072
5073 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
5074
5075         * genmdesc.c: removed now dead code.
5076
5077 2006-10-09  Robert Jordan <robertj@gmx.net>
5078
5079         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
5080
5081 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
5082
5083         * mini.h: do not leave gaps in the opcode values.
5084
5085 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
5086
5087         * jit-icalls.h: flag functions as internal here, too.
5088
5089 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
5090
5091         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
5092         functions with the internal attribute.
5093
5094 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
5095
5096         * aot-compiler.c: fclose the file descriptor in the profile read loop.
5097
5098 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
5099
5100         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
5101         for soft-float.
5102
5103 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
5104
5105         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
5106         tail calls as on other platforms.
5107
5108         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
5109
5110         * iltests.il: Add a few tailcall tests.
5111
5112 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5113
5114         * driver.c: fix loop for old compilers (bug #79521).
5115
5116 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
5117
5118         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
5119
5120         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
5121
5122         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
5123         metadata without any code.
5124
5125         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
5126         more precise debugging information using gdb.
5127
5128 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
5129
5130         * inssel-ia64.brg: Make the helper methods static.
5131
5132 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
5133
5134         * inssel-x86.brg: make the helper methods static.
5135
5136 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
5137
5138         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
5139
5140 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
5141
5142         * mini.c: updates for monoburg changes.
5143         * inssel.brg: make a few helper functions static as they should.
5144
5145 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
5146
5147         * Makefile.am: Move mini-codegen.c to common_sources.
5148
5149 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5150
5151         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
5152         instructions.
5153         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
5154         mini-ppc.h: port to use the common local register allocator.
5155
5156 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
5157
5158         * mini.h: Remove the comment too then.
5159
5160 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
5161
5162         * mini.h: put back backend.data which is to be used shortly and
5163         doesn't increase the size of MonoInst. If any 64 bit arch aligned
5164         pointers on 4 byte boundaries it'd have much bigger issues running
5165         and you can ifdef it out anyway.
5166
5167 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
5168
5169         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
5170         MonoInst size by 4 bytes on 64 bit machines.
5171
5172 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
5173
5174         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
5175         replacement with more meaningful field names. Arch maintainers, please
5176         check the assigned names are good enough for your arch.
5177
5178 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
5179
5180         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
5181         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
5182
5183 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
5184
5185         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
5186         relocations and memory requirements, put the optimization flags
5187         definitions in their own file.
5188
5189 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
5190
5191         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
5192
5193         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
5194
5195 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
5196
5197         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
5198
5199 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
5200
5201         * inssel.brg: use the correct function to get the size of an item
5202         in an array, given an element class.
5203         * aot-compiler.c: do not access class->class_size directly.
5204
5205 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
5206
5207         * mini.h, debug-mini.c: added a debugging function to print
5208         info about local variables and arguments in a jitted method.
5209
5210 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
5211
5212         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
5213
5214         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
5215
5216 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
5217
5218         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
5219         inner and outer loops when passing vtypes.
5220
5221 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
5222
5223         * mini-ppc.c: take into account the cpu errata for cache flushing
5224         which caused some random errors (bug #79381).
5225
5226 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
5227
5228         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
5229         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
5230
5231 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
5232
5233         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
5234         loaded.
5235
5236         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
5237         freebsd ports tree.
5238
5239         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
5240         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
5241
5242         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
5243         displacement.
5244
5245 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
5246
5247         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
5248
5249 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
5250
5251         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
5252         macro does not have to be changed during debugging.
5253
5254         * 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>.
5255
5256         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
5257
5258         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
5259         
5260         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
5261         MONO_ARCH_NO_EMULATE_MUL is defined.
5262
5263         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
5264
5265         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
5266
5267         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
5268
5269         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
5270         
5271 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
5272
5273         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
5274         stuff to mini-exceptions.c where it is used.
5275
5276         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
5277         setup code, the real one is in mini-exceptions.c.
5278
5279         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
5280         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
5281         some changes from the freebsd ports tree.
5282
5283         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
5284         constants.
5285         
5286         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
5287
5288 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
5289
5290         * mini.c: on Linux, check for /proc to be mounted
5291         (bug# 79351, novell bug#201204).
5292
5293 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
5294
5295         * mini.c: handle cases where pthread_attr_getstack() behaves
5296         incorrectly (bug #78096).
5297
5298 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
5299
5300         * mini-arm.c: support larger stack frames (bug #79272).
5301
5302 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
5303
5304         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
5305
5306         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
5307         tokens.
5308
5309         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
5310         mono_class_from_name () to find a class from its name.
5311
5312         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
5313
5314 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
5315
5316         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
5317
5318 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
5319
5320         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
5321
5322 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
5323
5324         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
5325         callinfo->trampoline.
5326
5327         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
5328         fixes #79271.
5329         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
5330         future.
5331
5332 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
5333
5334         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
5335
5336 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
5337
5338         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
5339         stats.method_trampolines, it is already done by the generic trampoline code.
5340
5341         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
5342         
5343 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
5344
5345         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
5346
5347         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
5348
5349         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
5350
5351         * mini.c (print_jit_stats): Print mscorlib mempool size too.
5352         
5353         * mini.c (print_jit_stats): Print new stats.
5354
5355         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
5356
5357 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
5358
5359         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
5360         Address on two dimensional arrays. Fixes #78729.
5361
5362         * mini.h (MonoCompile): Add a 'skip_visibility' field.
5363
5364         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
5365         a method.
5366
5367         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
5368
5369         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
5370         #79130.
5371         
5372         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
5373         a race condition.
5374         (mini_get_ldelema_ins): Ditto.
5375
5376 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
5377
5378         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
5379         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
5380         Fixes #79213.
5381
5382 2006-08-29 Neale Ferguson <neale@sinenomine.net>
5383
5384         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
5385         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
5386
5387         * exceptions-s390x.c: Cosmetic change.
5388
5389         * tramp-s390.c: Fix warning.
5390
5391         * cpu-s390.md: Correct length of mul_imm.
5392
5393 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
5394
5395         * aot-compiler.c: added binary writer with ELF backend
5396         implementation (only on Linux/x86 for now).
5397
5398 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
5399
5400         * Makefile.am: Don't run net 2.0 AOT tests.
5401
5402         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
5403         (mono_compile_assembly): Skip net 2.0 assemblies as well.
5404
5405         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
5406
5407 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
5408
5409         * aot-compiler.c: simplified and refactored the asm-writing code
5410         to allow different backends.
5411
5412 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
5413
5414         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5415
5416         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
5417         little. Share patches of type TYPE_FROM_HANDLE as well.
5418
5419         * mini.c (mono_patch_info_equal): New helper function.
5420         (mono_patch_info_hash): Ditto.
5421
5422         * aot-compiler.c (emit_method_code): Fix s390 build.
5423
5424         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
5425         is not handled because it is stored as a flag and not as a type ctor. Fixes
5426         #79016.
5427
5428 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
5429
5430         * aot-compiler.c: Fix computation of GOT slot statistics.
5431         
5432         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
5433         Also remove support for not PIC AOT.
5434
5435         * mini.h: Bump AOT file format version.
5436
5437         * objects.cs: Add a test for #78990.
5438
5439         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
5440         (peter.dettman@iinet.net.au). Fixes #79087.
5441
5442         * basic-long.cs: Add a test for the above.
5443
5444 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
5445
5446         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
5447         
5448         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
5449         code somewhat.
5450
5451 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
5452
5453         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
5454         exceptions.
5455
5456 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
5457
5458         * mini.c: Don't verify COM proxy invoke calls
5459         
5460
5461 2006-08-10  Dick Porter  <dick@ximian.com>
5462
5463         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
5464         which process is holding semaphores locked.
5465
5466 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
5467
5468         * mini-ia64.c mini-amd64.c: Fix #79027.
5469
5470         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
5471
5472         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
5473
5474         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
5475         implicit arguments in a vararg call. Fixes #79027.
5476
5477 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
5478
5479         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
5480         (mono_get_array_new_va_signature): Ditto.
5481
5482 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
5483
5484         * aot-runtime.c: Call init_plt lazily.
5485
5486         * inssel-long.brg: Fix unsigned long->int conversion.
5487
5488         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
5489
5490         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
5491         that most data is now in the .rss/.data section.
5492
5493 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
5494
5495         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
5496
5497         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
5498
5499         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
5500
5501         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
5502
5503         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
5504         virtual call. Fixes #79010.
5505
5506         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
5507         and use the result as the this argument in the real call.
5508
5509         * generics.2.cs: Add a new test for #79010.
5510         
5511 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
5512
5513         * mini-x86.c: Fix a warning.
5514
5515         * aot-compiler.c: Add a bunch of statistics.
5516
5517         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
5518
5519 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
5520
5521         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
5522
5523 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
5524
5525         * 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>.
5526
5527 2006-07-13  Miguel de Icaza  <miguel@novell.com>
5528
5529         * mini.c (mono_method_to_ir): Obtain the original method in the
5530         CIL stream and use this to perform validation.
5531
5532         Fixed: #78816
5533
5534 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
5535
5536         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
5537         (mono_arch_call_opcode): Ditto.
5538
5539         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
5540         #78826.
5541
5542         * mini.c (mono_patch_info_dup_mp): New helper function.
5543         
5544         * aot-compiler.c (compile_method): Fix some of the memory allocated during
5545         compilation. Fixes #78827.
5546
5547 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
5548
5549         * declsec.c: Use original security informations for
5550           MONO_WRAPPER_MANAGED_TO_MANAGED.
5551
5552 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
5553
5554         * mini.c: Allow Com Interop methods/classes and
5555         don't verify COM wrapper calls
5556         
5557
5558 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
5559
5560         * inssel-long32.brg: Fix long->i4 checked conversion.
5561
5562         * exceptions.cs: Add a test for the above.
5563
5564 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
5565
5566         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
5567
5568         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
5569         leaks.
5570
5571         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
5572         #78775.
5573
5574 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
5575
5576         * mini.c: Fix solaris/x86 exception handling.
5577
5578         * Makefile.am: Get rid of $(ICU_LIBS).
5579
5580 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
5581
5582         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
5583         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
5584         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
5585
5586         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
5587
5588         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
5589         this function causes a SIGSEGV.
5590
5591 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
5592
5593         * mini.c: Remove unused solaris/x86 includes.
5594
5595 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
5596
5597         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
5598
5599 2006-06-20  Jb Evain  <jbevain@gmail.com>
5600
5601         * cpu-g4.md: fix max length of start_handler instruction.
5602
5603 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
5604         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
5605
5606 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
5607         * ssa.c: Fixed bug 78653 for SSA based deadce.
5608         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
5609         MonoInst.flags, used in SSA based deadce.
5610         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
5611         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
5612
5613 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
5614
5615         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
5616         it can end up using non executable memory on ppc64 systems
5617         running ppc32 userspace (fix from Johannes Berg).
5618
5619 2006-06-14  Dick Porter  <dick@ximian.com>
5620
5621         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
5622         4.1.1
5623
5624 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
5625         * mini.c: Made so that inline is locally disabled if it would
5626         trigger a .cctor, because too many apps depend on this behavior
5627         (which seems to be also the one of the MS CLR).
5628
5629 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
5630
5631         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
5632         No idea why this worked before.
5633
5634         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
5635         which branch to outer exception clauses since they could skip the
5636         inner finally clauses. Fixes #78633.
5637
5638         * exceptions.cs: Add a test for the above.
5639
5640         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
5641         Fixes #78629.
5642
5643         * iltests.il: Add a test for the above.
5644
5645 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
5646
5647         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
5648         after the end of a try bblock, to prevent asserts in mini_method_compile ().
5649
5650         * iltests.il: Add a test for the above.
5651
5652 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
5653
5654         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
5655         
5656         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
5657         methods as instrinsics.
5658
5659 2006-06-09  Wade Berrier <wberrier@novell.com>
5660
5661         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
5662         (simple-cee-ops.h ssapre-mini-ops.h)
5663
5664 2006-06-09  Neale Ferguson <neale@sinenomine.net>
5665
5666         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
5667         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
5668         instruction).
5669         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
5670         * cpu-s390x.md: Fix max. length values for a couple of instructions.
5671
5672 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
5673
5674         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
5675
5676 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
5677
5678         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
5679         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
5680         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
5681         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
5682         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
5683         of opcodes, so that bug 78549 should not happen again.
5684         * ssapre.c: Updated to use the renamed files.
5685
5686 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
5687
5688         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
5689         in OP_ATOMIC_EXCHANGE_I4.
5690
5691 2006-06-07  Wade Berrier <wberrier@novell.com>
5692
5693         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
5694         in mono_debugger_create_notification_function)
5695
5696 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
5697
5698         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
5699         
5700         * mini.c (type_from_stack_type): Disable some changes which do not
5701         seem to work.
5702
5703         * driver.c: Reenable opts.
5704
5705         * mini.h (MonoStackSlot): New structure to keep track of the verification state
5706         of the evaluation stack.
5707         
5708         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
5709         evaluation stack trace at entry to the bblock.
5710
5711         * mini.c (merge_stacks): New function to perform verification of stack merges.
5712         Turned off by default.
5713
5714         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
5715         STACK_MP.
5716         
5717 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
5718
5719         * local-propagation.c: Fixed bug 78549.
5720
5721 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
5722
5723         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
5724
5725 2006-06-02  Miguel de Icaza  <miguel@novell.com>
5726
5727         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
5728         tramp-arm.c, tramp-ia64.c
5729         (mono_debugger_create_notification_function): Update signature to
5730         new signature and use new protocol for creating the notification
5731         function.  
5732
5733         Should fix the build.
5734
5735 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
5736
5737         * exceptions-ppc.c (mono_jit_walk_stack)
5738         (ves_icall_get_frame_info): Fix the build
5739
5740 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
5741
5742         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
5743
5744 2006-05-31  Raja R Harinath  <rharinath@novell.com>
5745
5746         * il2tests.2.il: New file for generics CIL tests.  Add test for
5747         #78019.
5748         * Makefile.am: Update.
5749
5750         Fix #78019
5751         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
5752         to nullable types.
5753
5754 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
5755
5756         * aliasing.c: Fixed bug 78311.
5757
5758 2006-05-29  Martin Baulig  <martin@ximian.com>
5759
5760         * mini-exceptions.c (mono_find_jit_info): When computing the
5761         native offset, check whether we're actually inside the method's
5762         code; call mono_debug_print_stack_frame() to format the frame.
5763         (ves_icall_System_Exception_get_trace): Call
5764         mono_debug_print_stack_frame() to format the stack frame.
5765         (ves_icall_get_trace): Update to the new debugging API.
5766         (mono_jit_walk_stack_from_ctx): Likewise.
5767         (ves_icall_get_frame_info): Likewise.
5768
5769         * mini.c (get_method_from_ip): Use the new debugging API.
5770         (mono_print_method_from_ip): Likewise.
5771
5772         * exceptions-ppc.c
5773         (mono_jit_walk_stack): Use the new debugging API.
5774         (ves_icall_get_frame_info): Likewise.   
5775
5776 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
5777
5778         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
5779
5780 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
5781
5782         * mini.c: Added "limitator" to inline for debugging.
5783
5784 2006-05-24  Martin Baulig  <martin@ximian.com>
5785
5786         * debug-debugger.c (mono_debugger_init): Create a private,
5787         malloc()-based code manager for the notification function and
5788         intentionally leak it on exit.  This fixes the crash-on-exit race
5789         condition.
5790
5791         * tramp-amd64.c
5792         (mono_debugger_create_notification_function): Added
5793         `MonoCodeManager *' argument.
5794
5795         * tramp-x86.c
5796         (mono_debugger_create_notification_function): Added
5797         `MonoCodeManager *' argument.
5798
5799 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
5800
5801         * aliasing.c: Fixed 64 bit issue.
5802         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5803         default since all known bugs are fixed (one more time!).
5804
5805 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
5806
5807         * mini.c: write barrier support.
5808
5809 2006-05-23  Martin Baulig  <martin@ximian.com>
5810
5811         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
5812         check at the top of the file.
5813
5814 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
5815
5816         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
5817         reverting changes without reason and without changelog entries.
5818
5819 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
5820
5821         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
5822         to a few opcodes. Fixes #78439.
5823
5824         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
5825         consistency with other archs.
5826
5827         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
5828
5829 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
5830
5831         * debug-debugger.c: fix the build.
5832
5833 2006-05-17  Martin Baulig  <martin@ximian.com>
5834
5835         * debug-debugger.c
5836         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
5837         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
5838         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
5839         (debugger_attach): Call GC_mono_debugger_add_all_threads().
5840
5841 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
5842
5843         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
5844
5845 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
5846
5847         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
5848         MONO_TYPE_GENERICINST.
5849         
5850         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
5851         MONO_TYPE_GENERICINST.
5852
5853 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
5854
5855         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
5856         #78325.
5857
5858 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
5859
5860         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
5861         mempool.
5862         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
5863
5864 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
5865
5866         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
5867         mono_trace_cleanup ().
5868
5869         * iltests.il: Fix problem with the newly added test.
5870
5871         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
5872         due to register constraints, free up the previous hreg. Fixes #78314.
5873
5874         * iltests.il: Add new test for #78314.  
5875
5876         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
5877         Interlocked.Add. Fixes #78312.
5878
5879         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
5880         
5881 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
5882
5883         * inssel.brg (mini_emit_virtual_call): Fix a warning.
5884
5885 2006-05-05  Martin Baulig  <martin@ximian.com>
5886
5887         * debug-mini.c (mono_debug_open_block): New method.
5888
5889         * mini-amd64.c
5890         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5891         the beginning of each basic block.
5892
5893         * mini-x86.c
5894         (mono_arch_output_basic_block): Call mono_debug_open_block() at
5895         the beginning of each basic block.
5896
5897 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5898
5899         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5900         default until I understand why they break the build on amd64.
5901
5902 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
5903
5904         * mini.c (mini_cleanup): Call mono_cleanup ().
5905
5906         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
5907         errors.
5908
5909 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
5910
5911         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
5912         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
5913         default since all known bugs are fixed, and I cannot reproduce bug
5914         77944... I'm asking Matt Hargett to test again after this commit.
5915
5916 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
5917
5918         * mini-codegen.c: Fixed typo that thrashed inline.
5919
5920 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
5921
5922         * dominators.c (compute_dominators): Avoid using a worklist since
5923         it is not correct in some cases. Instead, iterate over all bblocks as
5924         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
5925
5926 2006-04-28  Miguel de Icaza  <miguel@novell.com>
5927
5928         * mini.c (mono_jit_compile_method_inner): Use
5929         mono_prepare_exception_from_error that resets the value
5930         internally.
5931
5932 2006-04-27  Miguel de Icaza  <miguel@novell.com>
5933
5934         * mini.c: Move the mini_loader_error_to_exception to metadata. 
5935         
5936 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5937
5938         * aliasing.c: Fixed bug 78210.
5939
5940 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
5941
5942         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
5943         default until all their problems (or the ones they trigger) are fixed.
5944
5945 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
5946
5947         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
5948         
5949         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
5950         as loaded only after resolving patches since that could invoke the same method.
5951
5952         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
5953
5954         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
5955         functions.
5956
5957         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
5958         AOT loader.
5959
5960         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
5961         stack.
5962
5963         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
5964         made from AOT code through the PLT table.
5965
5966         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
5967         holding the plt offset when a call is made to the aot plt trampoline.
5968         
5969 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
5970
5971         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
5972         amd64 AOT support.
5973
5974         * Makefile.am (common_sources): Fix build breakage.
5975
5976         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
5977         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
5978         intra-assembly calls if possible.
5979         
5980         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
5981
5982         * mini-trampolines.c: Handle PLT entries.
5983
5984         * mini.c: Avoid creating a GOT var for calls.
5985
5986         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
5987         from mscorlib code.
5988
5989         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
5990         from mscorlib code.
5991
5992         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
5993         AOT code.       
5994
5995         * mini.h: Bump AOT file format version.
5996         
5997         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
5998         covers more cases.
5999
6000 2006-04-25  Martin Baulig  <martin@ximian.com>
6001
6002         * driver.c: Disable copyprop, consprop and inline when running
6003         inside the debugger.
6004
6005 2006-04-25  Martin Baulig  <martin@ximian.com>
6006
6007         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
6008         with `get_current_thread' and added `detach'.
6009         (MonoDebuggerMetadataInfo): Added `thread_size',
6010         `thread_tid_offset', `thread_stack_ptr_offset' and
6011         `thread_end_stack_offset'.
6012
6013 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
6014
6015         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
6016         aot-runtime.c.
6017
6018         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
6019         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
6020
6021         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
6022
6023         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
6024
6025         * aot.c: Add support for ADJUSTED_IID.  
6026
6027 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
6028
6029         * aot.c (emit_method_order): Don't align method_order_end.
6030
6031         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
6032         the interface ID changes.
6033
6034 2006-04-21  Dick Porter  <dick@ximian.com>
6035
6036         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
6037         cleaning up a thread.  Fixes the new part of bug 77470.
6038
6039 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
6040
6041         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
6042         to managed wrapper.
6043                      
6044 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
6045
6046         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
6047         
6048         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
6049         SIGSEGV. Fixes #78072.
6050
6051         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
6052         unregister our SIGABRT handler.
6053
6054 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
6055
6056         * mini.c: Disabled inline where it can alter the call stack in a
6057         way visible from managed code.
6058         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
6059         default.
6060
6061 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
6062
6063         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
6064         on other platforms. Fixes #78089.
6065
6066 2006-04-13  Martin Baulig  <martin@ximian.com>
6067
6068         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
6069         determine whether we're inside the debugger.
6070
6071         * debug-debugger.h
6072         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
6073
6074 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
6075
6076         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
6077         handler clauses. Fixes #78024.
6078
6079         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
6080         in the CALL_MEMBASE opcodes. Fixes #78088.
6081         (mono_arch_get_vcall_slot_addr): Ditto.
6082
6083 2006-04-10  Martin Baulig  <martin@ximian.com>
6084
6085         * debug-debugger.c: The thread handling code has now been moved
6086         into ../metadata/threads.c.
6087
6088 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
6089
6090         * driver.c (mono_main): Fix --with-gc=none build.
6091
6092         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
6093         (mono_spillvar_offset_float): Ditto.
6094         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
6095         hreg, not when its !global, since on ia64, there is a third category: stacked
6096         registers.      
6097
6098 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
6099
6100         * mini.c: set MonoInst->klass for load field address and a few other
6101         places.
6102
6103 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
6104
6105         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
6106
6107 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
6108
6109         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
6110         the branch opt changes.
6111
6112 2006-04-06  Dick Porter  <dick@ximian.com>
6113
6114         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
6115         
6116         * wapihandles.c (mini_wapi_seminfo): 
6117         * driver.c (mono_main): Add semaphore info option
6118
6119 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
6120
6121         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
6122         branch optimization changes. Fixes #78009.
6123
6124 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
6125
6126         * mini.c: ignore accessibility of methods in managed->native wrappers.
6127
6128 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
6129
6130         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
6131         
6132         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
6133
6134 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
6135
6136         * mini.c: Modify the branch optimizations to preserve the invariant that
6137         the entries inside the in_bb and out_bb arrays are unique.
6138         (mono_unlink_bblock): Avoid creation of new arrays.
6139
6140 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
6141
6142         * mini.c (mono_unlink_bblock): Fix regression caused by previous
6143         change (#77992).
6144
6145 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
6146
6147         * mini.c (optimize_branches): Remove the "optimizations" in
6148         the cbranch1/cbranch2 -> branch cases which were causing several
6149         problems in the past. Fixes #77986.
6150
6151 2006-03-31  Chris Toshok  <toshok@ximian.com>
6152
6153         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
6154         default optimizations :(
6155
6156 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
6157
6158         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
6159         branch.
6160
6161 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
6162
6163         * local-propagation.c: Added comments to structs and removed
6164         "Mono" prefixes from local tree mover types.
6165
6166 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
6167
6168         * Makefile.am (arch_sources): Define this for each architecture so 
6169         libmono_la_SOURCES is defined in one place.
6170
6171 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
6172
6173         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
6174         from handles/.
6175
6176 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
6177
6178         * driver.c: print the GC name supplied by configure.
6179
6180 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
6181
6182         * local-propagation.c: Added tree mover, and moved here all the
6183         local propagation code from mini.c
6184         * mini.c: Added support for treeprop, and moved all the local
6185         propagation code to local-propagation.c
6186         * mini.h: Added support for treeprop
6187         * driver.c: Added support for treeprop, enabled consprop, copyprop,
6188         treeprop, inline and deadce by default
6189         * Makefile.am: Added local-propagation.c
6190
6191 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
6192
6193         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
6194
6195 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
6196
6197         * debug-debugger.c: make it compile without the Boehm GC.
6198
6199 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6200
6201         * mini.c: fixed issue with mismatch when an icall is registered
6202         with multiple names but same address.
6203
6204 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
6205
6206         * declsec.c, mini-exceptions.c: use write barrier to set reference
6207         fields of managed objects.
6208
6209 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
6210
6211         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
6212         (can_access_internals): Fix a warning.
6213
6214         * mini.c (print_method_from_ip): Rename this to 
6215         mono_print_method_from_ip so it gets exported.
6216
6217         * trace.c: Deal with strings inside StringBuilder's containing garbage
6218         and fix memory leaks. Fixes #77848.
6219
6220 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
6221
6222         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
6223         fixes #77787.
6224
6225 2006-03-16 Neale Ferguson <neale@sinenomine.net>
6226         
6227         * mini-s390.c: Remove OP_X86_TEST_NULL.
6228
6229 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
6230
6231         * mini.c: use the correct GetHashCode() for the moving collector.
6232
6233 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
6234
6235         * liveness.c: Regalloc spill cost tuning.
6236
6237 2006-03-15 Neale Ferguson <neale@sinenomine.net>
6238         
6239         * mini-s390x.h: Correct S390_LONG macro.
6240
6241         * mini-s390x.c: Cleanup unused code.
6242
6243 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
6244
6245         * jit-icalls.h: New file.
6246
6247         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
6248         icalls and include that instead of including jit-icalls.c.
6249
6250         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
6251         OP_X86 opcodes.
6252
6253 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
6254
6255         * mini.c: when checking for member accessibility, also check for
6256         friend assemblies and for explicit interface implementations.
6257
6258 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
6259
6260         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
6261
6262         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
6263
6264         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
6265         common cases are done first.    
6266
6267         * mini-ops.h: Only define platform specific opcodes on the given platform.
6268
6269         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
6270         branch.
6271         
6272 2006-03-14  Martin Baulig  <martin@ximian.com>
6273
6274         Revert Paolo's change from r57348:
6275
6276         * mini.h: don't use gboolean for bitfields.
6277         * mini.c: verifier changes for fields and methods accessibility.
6278
6279 2006-03-13  Neale Ferguson <neale@sinenomine.net>
6280
6281         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
6282
6283         * mini-s390x.c: Fix conv_r_un.
6284
6285         * cpu-s390, cpu-s390x.md: Fix lengths.
6286
6287 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
6288
6289         * mini.c: nested types have access to all the nesting
6290         levels, not just the enclosing types.
6291
6292 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6293
6294         * mini.c: added a few more verification checks.
6295
6296 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
6297
6298         * liveness.c: Merge optimizations from the linear-il branch.
6299
6300 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
6301
6302         * mini-ia64.c (emit_call): Add a comment.
6303
6304         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
6305
6306         * tramp-ia64.c: Fix some warnings.
6307
6308 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
6309
6310         * mini.h: don't use gboolean for bitfields.
6311         * mini.c: verifier changes for fields and methods accessibility.
6312
6313 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
6314
6315         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
6316         lazy icall wrapper changes.
6317
6318         * dominators.c: Replace all the dominator algorithms with faster
6319         ones from the linear-il branch.
6320
6321         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
6322         the mempool.
6323
6324         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
6325         common cases are done first.
6326
6327         * mini-amd64.c: Fix some warnings.
6328
6329         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
6330         from the mempool.
6331
6332         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
6333         added code.
6334
6335         * mini.h: Add a missing prototype.
6336
6337 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
6338
6339         * mini.c: Compile icall wrappers lazily.
6340
6341         * mini-codegen.c: Use printf instead of g_print since its much faster.
6342
6343         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
6344         function.
6345
6346         * mini.c (optimize_branches): Cache the negative result from 
6347         remove_block_if_useless ().
6348
6349         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
6350         Also fix some bblock linking issues.
6351
6352         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
6353         assembly files.
6354
6355         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
6356
6357         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
6358         accessed fields first, for better cache behavior.
6359         
6360 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6361
6362         * mini.c: speedup IList<T> array accesses.
6363
6364 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
6365
6366         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
6367         inline_costs counter. Fixes #77190.
6368
6369 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
6370
6371         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
6372         trace messages. Fixes #77706.
6373
6374 2006-03-04  Martin Baulig  <martin@ximian.com>
6375
6376         * tramp-amd64.c, tramp-x86.c
6377         (mono_debugger_create_notification_function): Use
6378         mono_global_codeman_reserve() to allocate a buffer at runtime and
6379         return it.
6380
6381         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
6382
6383         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
6384         notification function at runtime and then call `initialize' in the
6385         `MONO_DEBUGGER__debugger_info' vtable.
6386
6387 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
6388
6389         * iltests.il: Fix a visibility problem.
6390
6391 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
6392
6393         * driver.c, mini.c: add hooks for the counters API.
6394
6395 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
6396
6397         * driver.c: show disabled options.
6398
6399 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6400
6401         * linear-scan.c: always use cost-driven selection.
6402
6403 2006-02-28  Raja R Harinath  <rharinath@novell.com>
6404
6405         * jit-icalls.c (helper_compile_generic_method): Revert change from
6406         2006-02-24.
6407
6408 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
6409
6410         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
6411
6412 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
6413
6414         * inssel.brg: style fixes, mostly to force the updated monoburg
6415         to run for people using svn.
6416
6417 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
6418
6419         * mini.c: match monoburg changes.
6420
6421 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6422
6423         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
6424         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
6425         declaration in the header file.
6426
6427 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
6428
6429         * helpers.c: reduce relocations and mem usage.
6430
6431 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
6432
6433         * mini.h, mini-codegen.c: disable logging features if
6434         requested by configure.
6435
6436 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
6437
6438         * mini.c: tiny verifier changes.
6439
6440 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
6441
6442         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
6443         cpu-pentium.md: stack alignment changes for osx/x86,
6444         partially from Geoff Norton <gnorton@customerdna.com>.
6445
6446 2006-02-24  Raja R Harinath  <harinath@gmail.com>
6447
6448         * jit-icalls.c (helper_compile_generic_method): Update to changes
6449         in metadata/class.c.
6450
6451 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
6452         
6453         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
6454         
6455         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
6456         interface calls with large offsets.
6457
6458 2006-02-23  Raja R Harinath  <rharinath@novell.com>
6459
6460         * jit-icalls.c (helper_compile_generic_method): Document the
6461         special-case we depend on so that we can inflate the method twice
6462         with the same context with no bad side-effects.
6463
6464 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
6465
6466         * mini-x86.c, mini-amd64.c: fix for case when xen support
6467         is disabled.
6468
6469 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
6470
6471         * mini-x86.c, mini-amd64.c: generate code to access tls items
6472         in a faster way for Xen systems.
6473
6474 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
6475
6476         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
6477         updates and compilation fixes for the OSX/x86 port, mostly from
6478         Geoff Norton <gnorton@customerdna.com>.
6479
6480 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6481
6482         * inssel.brg: faster interface call implementation
6483         to sync with the interface_offsets MonoVTable changes.
6484
6485 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
6486
6487         * mini.c: more verification checks.
6488
6489 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
6490
6491         * mini.c: added a few more verification checks.
6492
6493 2006-02-17      Neale Ferguson <neale@sinenomine.net>
6494
6495         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
6496         facility on the processor and use it if available.
6497
6498 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
6499
6500         * driver.c, aot.c, mini.c: throw exception if the IL code is
6501         invalid or unverifiable.
6502
6503 2006-02-17  Raja R Harinath  <rharinath@novell.com>
6504
6505         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
6506         m.StructField.
6507
6508 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
6509
6510         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
6511
6512 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6513
6514         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
6515         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
6516         handling of instantiated generic valuetypes.
6517
6518 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
6519
6520         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
6521         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
6522         instead.
6523
6524         * generics.2.cs: Revert the nullable reftypes tests.
6525
6526 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
6527
6528         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
6529         using __builtin_frame_address (1) as it doesn't work in the presence
6530         of optimizations. Hopefully fixes #77273.
6531
6532         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
6533         -> generics.cs change as it doesn't work with some automake versions.
6534
6535 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6536
6537         * mini.c: handle systems that sue a different way to
6538         retrieve the stack address of the current thread.
6539
6540 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
6541
6542         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
6543         it specially in the makefile.
6544
6545         * generics.2.cs: Add tests for nullable reference types.
6546
6547 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6548
6549         * mini.c: always handle the case when mono_jit_init()
6550         is called in a thread different from the main thread,
6551         confusing libgc (bug #77309).
6552
6553 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
6554
6555         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
6556
6557 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6558
6559         * mini.c: change optimize_branches () to use a single loop
6560         and introduce a new optimization to simplify some range checks.
6561
6562 2006-02-03  Martin Baulig  <martin@ximian.com>
6563
6564         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
6565         and merged with debugger_thread_manager_add_thread().
6566         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
6567         inform the debugger about the main thread.
6568
6569 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
6570
6571         * basic.cs: Add test for div.un/rem.un constant folding.
6572
6573 2006-02-03  Neale Ferguson <neale@sinenomine.net>
6574
6575         * cpu-s390x.md: correct int_xor_imm length
6576
6577 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
6578
6579         * generics.2.cs: New test for #77442.
6580
6581         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
6582         #77442.
6583
6584 2006-02-02  Martin Baulig  <martin@ximian.com>
6585
6586         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
6587         <mono/metadata/mono-debug-debugger.h>   
6588
6589         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
6590
6591 2006-02-02  Martin Baulig  <martin@ximian.com>
6592
6593         * debug-debugger.h: New header file for debug-debugger.c.
6594
6595         * debug-debugger.c: Big API cleanup; don't run the managed Main()
6596         function is a separate thread anymore; add support for attaching.
6597
6598 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
6599
6600         * tramp-x86.c: Fix a warning.
6601
6602 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
6603
6604         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
6605         on very large methods.
6606
6607         * aot.c (load_patch_info): Fix a warning.
6608
6609 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
6610
6611         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
6612         mini-ops.h: alu membase optimizations.
6613
6614 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
6615
6616         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
6617         to speedup StringBuilder.
6618
6619 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
6620
6621         * dominators.c (mono_compute_natural_loops): Fix detection of
6622         loop body start blocks.
6623
6624         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
6625
6626 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
6627
6628         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
6629         #75145.
6630
6631 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
6632
6633         * aliasing.c: Fixed aliasing issue on 64 bit archs.
6634
6635 2006-01-25  Martin Baulig  <martin@ximian.com>
6636
6637         * debug-debugger.c: Moved the `MonoDebuggerManager' and
6638         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
6639         started to cleanup this file a little bit.
6640
6641 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
6642
6643         * mini.c: optimize a codepath frequently happening in generics code.
6644
6645 2006-01-23  Martin Baulig  <martin@ximian.com>
6646
6647         * Makefile.am: Only compile debug-debugger.c on supported platforms.
6648
6649         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
6650         functions directly.
6651
6652         * driver.c: debug-debugger.c is only available if
6653         `MONO_DEBUGGER_SUPPORTED' is defined.   
6654
6655 2006-01-23  Martin Baulig  <martin@ximian.com>
6656
6657         * debug-debugger.c: Only enable this on platforms where the Mono
6658         Debugger is working (x86 and x86_64).
6659
6660 2006-01-21  Martin Baulig  <martin@ximian.com>
6661
6662         The Mono Debugger is now using the normal `mono' instead of the
6663         `mono-debugger-mini-wrapper' when executing managed code.
6664
6665         * debug-debugger.c: New file; previously known as
6666         debugger/wrapper/wrapper.c.
6667
6668         * debug-mini.c (mono_init_debugger): Removed.
6669
6670         * driver.c (mono_main): Added new `--inside-mdb' command line
6671         argument which is used when running inside the debugger.
6672
6673 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
6674
6675         * liveness.c (mono_analyze_liveness): Remove some unused data
6676         structures.
6677
6678 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
6679
6680         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
6681
6682 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
6683
6684         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
6685         depends on implementation details of monobitset.
6686
6687         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
6688         Fixes #77271.
6689
6690 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
6691
6692         * liveness.c: Update after monobitset changes.
6693
6694 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
6695
6696         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
6697
6698 2006-01-11 Neale Ferguson <neale@sinenomine.net>
6699
6700         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
6701
6702         * mini-s390x.c: Remove warning messages.
6703
6704 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
6705
6706         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
6707
6708 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
6709
6710         * generics.2.cs: Add ldelem/stelem_any test.
6711
6712 2006-01-10 Neale Ferguson <neale@sinenomine.net>
6713
6714         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
6715
6716 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
6717
6718         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
6719         
6720 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
6721
6722         * generics.2.cs: Reenable vtype tests.
6723
6724         * inssel-x86.brg: Remove an icorrect valuetype rule.
6725
6726 2006-01-06 Neale Ferguson <neale@sinenomine.net>
6727
6728         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
6729         initial support for OP_ABS.
6730
6731 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6732
6733         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
6734
6735 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6736
6737         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
6738         conversion and implement LADD/LSUB.
6739
6740         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
6741         architectures.
6742
6743 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6744
6745         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
6746
6747         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
6748         architectures.
6749
6750 2006-01-05 Neale Ferguson <neale@sinenomine.net>
6751
6752         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
6753         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
6754         (stack walk problem).
6755
6756 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
6757
6758         * aot.c (mono_aot_load_method): Fix a warning.
6759
6760 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6761
6762         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
6763
6764 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6765
6766         * iltests.il: Add test for #77148.
6767
6768         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
6769         #77148.
6770
6771 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6772
6773         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
6774
6775 2006-01-03  Neale Ferguson <neale@sinenomine.net>
6776
6777         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
6778         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
6779
6780         * basic-long.cs: Add lconv-to-r4/r8 tests.
6781
6782 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
6783
6784         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
6785
6786         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
6787         here as on other archs.
6788
6789 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6790
6791         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
6792
6793 2005-12-29 Neale Ferguson <neale@sinenomine.net>
6794
6795         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
6796         
6797         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
6798
6799         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
6800         instrument_prolog; Add memory_barrier instruction.
6801
6802 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
6803
6804         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
6805
6806 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
6807
6808         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
6809
6810         * aliasing.c inssel.brg: Fix warnings.
6811
6812         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
6813         could skip initialization of some parts of memory.
6814
6815         * mini.c mini-ia64.c: Fix warnings.
6816
6817         * inssel-sparc.brg: Add an implementation of lneg which actually works.
6818
6819 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
6820
6821         * aliasing.c (mono_build_aliasing_information): Add a workaround for
6822         a crash seen on sparc.
6823
6824         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
6825         
6826         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
6827
6828 2005-12-21 Neale Ferguson <neale@sinenomine.net>
6829
6830         * mini-ops.h: Add s390_backchain instruction
6831
6832         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
6833
6834         * cpu-s390.md: Add s390_backchain instruction
6835
6836         * mini-s390.c: Significant ABI changes
6837
6838         * mini-s390.h: Cater for zero length structures
6839
6840 2005-12-20 Neale Ferguson <neale@sinenomine.net>
6841
6842         * mini-s390.c: ABI fixes
6843
6844         * inssel-s390.brg: Remove debug statements
6845
6846         * cpu-s390.md: Fix length of ATOMIC_xx operations
6847
6848 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
6849
6850         * basic-float.cs: Add float<->long conversion tests.
6851
6852 2005-12-16 Neale Ferguson <neale@sinenomine.net>
6853
6854         * mini-s390.c: Fix LOCALLOC processing.
6855
6856         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
6857
6858 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
6859
6860         * iltests.il: Add tests for some opcodes not covered by the other
6861         tests.
6862
6863 2005-12-15 Neale Ferguson <neale@sinenomine.net>
6864
6865         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
6866         register loading for Tail processing; Correct trace output.
6867
6868         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
6869
6870         * cpu-s390.md: Correct size of jmp instruction. 
6871
6872 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6873
6874         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
6875
6876 2005-12-13 Neale Ferguson <neale@sinenomine.net>
6877
6878         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
6879           Bring s390 up to current level.
6880
6881 2005-12-12  Zltan Varga  <vargaz@gmail.com>
6882
6883         * generics.2.cs: Disable the newly added tests as they do not work yet.
6884         
6885         * generics.2.cs: Add valuetype tests.
6886
6887 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
6888
6889         * basic-long.cs: Add i4->u8 test.
6890
6891         * objects.cs: Add tests for JIT intrinsic.
6892
6893         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
6894         optimizations lost by a mistake.
6895
6896 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
6897
6898         * basic-long.cs: Remove a test moved to objects.cs.
6899
6900         * arrays.cs: Add more array tests.
6901
6902 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
6903
6904         * arrays.cs: Add new tests for multi-dimensional arrays.
6905
6906 2005-12-06  Raja R Harinath  <rharinath@novell.com>
6907
6908         * Makefile.am (test_sources2): Add generics.2.cs.
6909         (EXTRA_DIST): Add test_sources2.
6910
6911 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
6912
6913         Support for boxing and unboxing nullable types as well as the
6914         isinst operation on nullables, per the CLI ammendment.
6915
6916         * inssel.brg (CEE_ISINST): Special case for nullable
6917
6918         * mini.c (handle_unbox_nullable): new method
6919         (handle_box): Special case for nullable types
6920         (mono_method_to_ir): Call handle_unbox_nullable in correct
6921         places.
6922
6923         * generics.2.cs: New test suite
6924
6925         * Makefile.am: Support for regression tests with generics.
6926
6927 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
6928
6929         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
6930         allocated to registers. Fixes #76800.
6931
6932 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
6933
6934         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
6935
6936 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
6937
6938         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
6939         of platforms.
6940
6941 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
6942
6943         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
6944         objects.cs.
6945
6946         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
6947         
6948         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
6949 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
6950
6951         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
6952         single precision before storing to a single precision location.
6953
6954 2005-11-28  Raja R Harinath  <rharinath@novell.com>
6955
6956         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
6957
6958 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
6959
6960         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
6961         correct files.
6962
6963         * basic.cs: Remove test_0_byte_compares test which was moved to
6964         objects.cs a long time ago.
6965
6966 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
6967
6968         * aliasing.c: Fixed aliasing issue on 64 bit archs.
6969
6970 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
6971
6972         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
6973         handlers are called.
6974
6975         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
6976         throwing code.
6977
6978          * mini-ia64.c: Add support for the throw->branch exception 
6979         optimization.   
6980
6981         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
6982
6983 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6984
6985         * mini.c: Enabled "fastpath" deadce :-)
6986         
6987 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
6988
6989         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
6990         alias analysis pass to support it.
6991         * mini.h: Likewise.
6992         * ssa.c: Likewise.
6993         * liveness.c: Likewise (liveness computation can use aliasing
6994         information to be more accurate).
6995         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
6996         moreover made so that "--compile-all" uses the given optimization
6997         flags and not the default ones.
6998         * aliasing.c: Alias analysis (new file).
6999         * aliasing.h: Likewise.
7000         * Makefile.am: added "aliasing.c" and "aliasing.h".
7001         
7002 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
7003
7004         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
7005         OP_L opcodes.
7006
7007 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
7008
7009         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
7010         fp >= end_of_stack exit condition, as it is not needed, and it might
7011         become true for fp eliminated frames.
7012
7013 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
7014
7015         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
7016         coded offsets.
7017
7018 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
7019
7020         * mini-arm.c: fixed alignment of doubles/longs to match
7021         the C ABI (bug #76635).
7022
7023 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
7024
7025         * aot.c: fix compilation with --enable-minimal=aot.
7026
7027 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
7028
7029         * mini-arm.c: fixed compatibility with the new
7030         floating point emulator package for compares.
7031
7032 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
7033
7034         * mini.c : reverted sig->pinvoke changes (r51396-51397).
7035
7036 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
7037
7038         * mini-exceptions.c (print_stack_frame): Output to stderr.
7039         (mono_handle_native_sigsegv): Ditto.
7040
7041 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
7042
7043         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
7044         OP_LCONV_TO_OVF_I implementation.
7045
7046         * mini-amd64.c: Add support for the throw->branch exception 
7047         optimization.
7048
7049         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
7050         when the catch clause catches a more general exception, i.e. Object.
7051
7052 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
7053
7054         * cpu-ia64.md: Remove unused opcodes.
7055
7056         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
7057         specific defines for architectures defining USE_SIGACTION.
7058
7059         * mini-ia64.c: Fix some warnings.
7060
7061         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
7062         version seemed to skip a frame.
7063
7064 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
7065
7066         * mini.c: Clean up the usage of sig->pinvoke flag. Now
7067         only calls which are made to native code use this flag.
7068
7069 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
7070
7071         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
7072         varargs methods as well.
7073         
7074         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
7075         which have save_lmf set. Reorganize methods prologs a bit.
7076
7077         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
7078         debugger to the proper place.
7079
7080 2005-10-29  Martin Baulig  <martin@ximian.com>
7081
7082         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
7083         when running inside the debugger until the debugger has support
7084         for it.
7085
7086 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
7087
7088         * mini.h: Fix a warning.
7089
7090 2005-10-24  Miguel de Icaza  <miguel@novell.com>
7091
7092         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
7093         we expose publicly, this returns the string.
7094
7095 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
7096
7097         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
7098         with fp elimination.
7099
7100 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
7101
7102         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
7103         native stacktrace using the glibc 'backtrace' function if available.
7104
7105 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
7106
7107         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
7108
7109         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
7110         handle SIGSEGVs received while in native code.
7111
7112         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
7113         code, call mono_handle_native_sigsegv which will abort the runtime
7114         after printing some diagnostics, instead of converting it into a
7115         confusing NullReferenceException.
7116
7117 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
7118
7119         * cpu-pentium.md: Remove unused opcodes.
7120
7121 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
7122
7123         * mini-amd64.h (MonoLMF): Add rsp field.
7124
7125         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
7126         the lmf too.
7127
7128 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
7129
7130         * mini-codegen.c (get_register_spilling): Fix some warnings.
7131
7132 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
7133
7134         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
7135         elimination during exception handling. Enable fp elimination by
7136         default.
7137
7138         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
7139         elimination.
7140
7141 2005-10-16  Martin Baulig  <martin@ximian.com>
7142
7143         * mini-exceptions.c
7144         (mono_debugger_run_finally): New public method for the debugger.
7145
7146 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
7147
7148         * debug-mini.c (mono_debug_init_method): Fix warning.
7149
7150         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
7151         the 'exname' parameter const to fix some warnings.
7152
7153 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
7154
7155         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
7156         introduced by the previous patch.
7157
7158 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
7159
7160         * basic-float.cs: Add test for precision of float arithmetic.
7161
7162         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
7163         when loading/storing single values from/to memory.
7164
7165         * mini.c (mono_jit_compile_method_with_opt): Create the function
7166         pointers in the correct domain.
7167
7168 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
7169
7170         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
7171         introduced by previous patch.
7172         
7173         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
7174         when out_filter_idx is NULL.
7175
7176         * mini-exceptions.c: Don't run filter clauses twice during exception
7177         handling. Fixes #75755.
7178
7179 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
7180
7181         * aot.c: Add support for ldflda wrappers.
7182
7183         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
7184         #75902.
7185
7186 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
7187
7188         * mini.c, mini.h: do not consider exception handlers blocks when
7189         setting up interface variables.
7190
7191 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
7192
7193         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
7194
7195 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
7196
7197         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
7198         causes a regression.
7199
7200         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
7201
7202 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
7203
7204         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
7205         of the OP_P definitions.
7206
7207         * TODO: Add a proposal for dealing with the CEE/OP mess.
7208
7209         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
7210         optimizations from the x86 port.
7211
7212         * cpu-amd64.md: Ditto.
7213
7214         * basic.cs basic-long.cs: Add tests.
7215
7216 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
7217
7218         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
7219         Patrik Torstensson's implementation of my exception-handling
7220         optimization idea, when the exception object is not used
7221         (bug #62150).
7222
7223 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
7224
7225         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
7226         of the mul_imm optimizations from the old jit.
7227
7228 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
7229
7230         * mini.c, liveness.c: patch by Patrik Torstensson and
7231         Zoltan Varga to improve performance in methods with
7232         exception clauses.
7233
7234 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
7235
7236         * driver.c: Remove 'Globalization' entry from --version.
7237
7238 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
7239
7240         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
7241         there is a profiler interested in JIT events.
7242
7243         * aot.c: Load profile files produced by the AOT profiling module, and
7244         reorder methods based on the profiling info. Add a 'method_order' table
7245         to the AOT file to make mono_aot_find_jit_info work with the reordered
7246         methods.
7247
7248         * mini.h: Bump AOT file version info.
7249
7250 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
7251
7252         * mini-arm.h: work around what looks like a gcc bug when optimizations
7253         are enabled.
7254
7255 2005-09-28  Raja R Harinath  <rharinath@novell.com>
7256
7257         * Makefile.am (AM_CFLAGS): Don't use += to append inside
7258         conditionals.  Use ...
7259         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
7260
7261 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
7262
7263         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
7264         to determine the amount of memory to copy when passing valuetypes.
7265
7266         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
7267         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
7268
7269 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
7270
7271         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
7272         information about aot.
7273
7274 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
7275
7276         * *.c: Replace the use of {Enter,Leave}CriticalSection with
7277         macros. This will allow a deadlock debugger to easily be plugged
7278         in.
7279
7280 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
7281
7282         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
7283
7284 2005-09-27  Raja R Harinath  <rharinath@novell.com>
7285
7286         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
7287         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
7288         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
7289         ($(arch_built)) [CROSS_COMPILING]: Error out.
7290
7291 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
7292
7293         * aot.c: Add support for the no_special_static flag for classes.
7294
7295 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
7296
7297         * Reapply reverted patches.
7298
7299         * *: Revert r50174 as well.
7300
7301         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
7302
7303 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
7304
7305         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
7306
7307 2005-09-23  Miguel de Icaza  <miguel@novell.com>
7308
7309         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
7310         part of the SIG_HANDLER_SIGNATURE.  
7311
7312 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
7313
7314         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
7315         statistics.
7316
7317         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
7318         introduced by previous patch.
7319
7320 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
7321
7322         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
7323         saved registers too.
7324
7325         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
7326         upon the information returned by get_call_info ().
7327         
7328         * mini-x86.c (add_float): Fix stack size calculation.
7329         (mono_arch_call_opcode): Rewrite this so it works based up the
7330         information returned by get_call_info ().
7331         (mono_arch_get_this_vret_args): Ditto.
7332
7333 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
7334
7335         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
7336         in cinfo to determine the registers which need to be used.
7337
7338 2005-09-20  Miguel de Icaza  <miguel@novell.com>
7339
7340         * driver.c (mono_main): Add --server and --desktop flags. 
7341
7342 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
7343
7344         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
7345         registers as global registers.
7346
7347         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
7348         longer needed with the new register allocator.
7349
7350         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
7351
7352         * cpu-ia64.md: Remove unused opcodes.
7353         
7354         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
7355         
7356 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
7357
7358         * cpu-amd64.md: Remove unused opcodes.
7359
7360         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
7361         needed with the new register allocator.
7362
7363         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
7364         reg-reg moves.
7365
7366 2005-09-16  Raja R Harinath  <rharinath@novell.com>
7367
7368         * Makefile.am (check-local): Don't invoke semdel-wrapper.
7369
7370 2005-09-16  Martin Baulig  <martin@ximian.com>
7371
7372         * exceptions-amd64.c
7373         (throw_exception): Don't call mono_debugger_throw_exception() if
7374         we're a rethrow - see the FIXME in the code.
7375
7376 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
7377
7378         * mini.c (mono_init_exceptions): This only works on some architectures.
7379         
7380 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
7381
7382         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
7383         on ia64.
7384
7385         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
7386
7387         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
7388         now in mini-exceptions.c.
7389
7390 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
7391
7392         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
7393         now in mini-exceptions.c.
7394
7395 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
7396
7397         * exceptions-x86.c: Applied patch from Patrik Torstensson 
7398         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
7399
7400         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
7401         code into mini-exceptions.c. Add some assertions to it.
7402
7403 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
7404
7405         * aot.c (emit_section_change): Applied patch from "The Software Team" 
7406         (<software@solmersa.com>). Fix as errors on windows.
7407
7408 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
7409
7410         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
7411         method info into the LMF.
7412
7413 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
7414         
7415         * mini-ia64.c: Add proper unwind info for method epilogs.
7416
7417         * exceptions-ia64.c: Add some code to help debugging.
7418         
7419         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
7420
7421         * mini-exceptions.c: Fix warning.
7422
7423 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
7424
7425         * mini.c: Really fix build.
7426
7427         * mini-x86.c mini-amd64.c: Fix build.
7428
7429 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
7430
7431         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
7432
7433         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
7434         some Interlocked methods as intrinsics.
7435
7436         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
7437         for Thread methods as well.
7438
7439         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
7440
7441         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
7442
7443         * mini-ia64.c mini-x86.c mini-amd64.c 
7444         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
7445         OP_MEMORY_BARRIER.
7446         
7447         * mini.c (mono_init_exceptions): Fix build breakage.
7448
7449 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
7450
7451         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
7452         of instructions. Use the new ia64_unw_op macros for emitting unwind
7453         info.
7454
7455         * mini.c (mono_init_exceptions): Initialize exception handling
7456         related trampolines at startup.
7457
7458 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
7459
7460         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
7461
7462 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
7463
7464         * mini.c: Handle type loading errors gracefully during compilation and
7465         throw the appropriate exception.
7466
7467 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
7468
7469         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
7470         for the mono binary.
7471
7472 2005-09-09  Martin Baulig  <martin@ximian.com>
7473
7474         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
7475         the release.
7476
7477 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
7478
7479         * mini-arm.h: use emulation for conv.r.un for the release.
7480
7481 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
7482
7483         * mini-arm.c, objects.cs: more fixes and tests for them.
7484
7485 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
7486
7487         * mini-arm.c: align structures to at least 4 bytes to be able
7488         to keep our current optimized memcpy.
7489
7490 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
7491
7492         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
7493
7494 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7495
7496         * mini.c: ignore SIGPIPE.
7497
7498 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
7499
7500         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
7501
7502         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
7503
7504 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
7505
7506         * mini.h: Add prototype for mono_allocate_stack_slots_full.
7507
7508 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
7509
7510         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
7511         exception handling support.
7512         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
7513         patch by Brian Koropoff <briank@marakicorp.com>).
7514
7515 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
7516
7517         * mini.c: revert another 'optimization' which breaks when
7518         items on the eval stack need to be saved at a basic block end
7519         (bug #75940).
7520
7521 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
7522
7523         * jit-icalls.c: for arrays, ensure we always provide
7524         lower bounds.
7525
7526 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
7527
7528         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
7529         
7530         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
7531
7532 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
7533
7534         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
7535         arguments in their original register.
7536
7537 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
7538
7539         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
7540         memset/memcpy.
7541
7542         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
7543         when ssapre is enabled.
7544
7545         * inssel-long.brg: Fix bug in previous patch.
7546
7547         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
7548         multiplication by a constant.
7549
7550 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
7551
7552         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
7553         icc.
7554
7555         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
7556         saving registers.
7557
7558 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
7559
7560         * inssel-arm.brg: apply changes tested by Brian Koropoff
7561         <briank@marakicorp.com>.
7562
7563 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
7564
7565         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
7566         
7567 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
7568
7569         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
7570         to the same register if dreg is just a base register.
7571         (print_ins): Improve printing of membase opcodes.
7572
7573         * inssel-x86.brg: Add optimized ldind(reg) rules.
7574
7575         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
7576
7577 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
7578
7579         * mini.c: when running under valgrind, set the stack bottom for
7580         the GC at the actual approximate stack for the app (fixes running
7581         mono with valgrind).
7582
7583 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
7584
7585         * mini.c: do no break at the first valuetype to init found
7586         (fixes bug #75791).
7587
7588 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
7589
7590         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
7591
7592 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
7593
7594         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
7595
7596 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
7597
7598         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
7599
7600 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7601
7602         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
7603
7604         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
7605         code.
7606
7607         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
7608         code.
7609
7610         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
7611         methods.
7612
7613 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
7614
7615         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
7616
7617 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7618
7619         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
7620         in the tail recursion optimization.
7621
7622         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
7623         debug info into the assembly file.
7624
7625         * iltests.il: Add test for filter regions.
7626
7627         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
7628         initial stack of filter regions. Fixes #75755.
7629
7630 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
7631
7632         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
7633         stack requirements.
7634
7635 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
7636
7637         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
7638         the check for an already compiled method on non-ia64 platforms.
7639         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
7640         proper domain.
7641
7642         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
7643
7644         * inssel-x86.brg: Add some optimized call rules.
7645
7646 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
7647
7648         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
7649         method here.
7650
7651         * mini.h mini-trampolines.c: Pass the trampoline argument to 
7652         mono_arch_patch_delegate_trampoline.
7653
7654         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
7655
7656         * mini-trampolines.c: Fix build.
7657
7658         * mini-amd64.h: Add delegate trampolines.
7659
7660         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
7661
7662         * inssel-amd64.brg: Add optimized call rules.
7663         
7664         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
7665
7666         * inssel-ia64.brg: Add optimized ldind(reg) rules.
7667
7668 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
7669
7670         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
7671         change.
7672
7673         * mini-ia64.c: Remove LMF fixmes.
7674
7675         * mini-ia64.h: Remove most fields from LMF.
7676
7677         * inssel-ia64.brg (stmt): Fix unaligned access errors.
7678
7679         * mini-trampolines.c: Add support for IA64 function descriptors.
7680
7681         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
7682         for IA64 function descriptors.
7683
7684 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
7685
7686         * tramp-arm.c: patch the vtable for virtual calls. Added
7687         support code to register/unregister the LMF.
7688         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
7689         more LMF work.
7690
7691 2005-08-19  Dick Porter  <dick@ximian.com>
7692
7693         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
7694         bit value if needed.
7695
7696 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
7697
7698         * mini.c (mini_get_method): Move handling of wrapper data here.
7699
7700         * mini.c (mono_method_to_ir): Add support for dynamic methods.
7701
7702         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
7703         virtual.
7704
7705         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
7706         bblock->code does not remain empty.
7707
7708 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
7709
7710         * arrays.cs: Add regression test for #75832.
7711
7712         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
7713         rules. Fixes #75832.
7714
7715         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
7716         instruction scheduling.
7717
7718 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
7719
7720         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
7721
7722 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
7723
7724         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
7725
7726         * mini-codegen.c: Fix VC build.
7727
7728         * cpu-pentium.md: Increase length of atomic_exhange_i4.
7729
7730 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7731
7732         * mini.h: fix signature for mono_register_opcode_emulation.
7733
7734 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
7735
7736         * mini.c: Get rid of most of the helper_sig_... constants using
7737         mono_create_icall_signature ().
7738
7739 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
7740
7741         * jit-icalls.c (helper_ldstr): New helper function.
7742
7743         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
7744
7745         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
7746         throw, load the string using a helper call instead of creating a string object.
7747
7748         * aot.c: Update after LDSTR changes.
7749
7750         * mini.h: Bump AOT file version.
7751         
7752         * aot.c: Save class size info into the AOT file. Print more statistics during
7753         compilation.
7754
7755         * mini.h: Bump AOT file version.
7756
7757         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
7758         ordering of disasm cases. Fixes #74957.
7759
7760 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
7761
7762         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
7763         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
7764         the generic code needed for the ARM port.
7765
7766 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
7767
7768         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
7769         inssel-arm.brg: more ARM features and fixes.
7770
7771 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
7772
7773         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
7774         ARM port work in progress.
7775
7776 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
7777
7778         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
7779
7780         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
7781
7782         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
7783
7784         * inssel.brg (mini_emit_memset): Add support for unaligned access.
7785
7786         * *-ia64.*: Ongoing IA64 work.
7787         
7788         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
7789
7790 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
7791
7792         * TODO: Remove out-of-data todo stuff.
7793
7794         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
7795         dead code.
7796
7797         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
7798
7799         * mini.h: Bump corlib version.
7800
7801 2005-07-27  Martin Baulig  <martin@ximian.com>
7802
7803         * mini-codegen.c
7804         (create_copy_ins): Added `const unsigned char *ip' argument; set
7805         `copy->cil_code' from it.
7806
7807 2005-07-27  Martin Baulig  <martin@ximian.com>
7808
7809         * mini-exceptions.c (mono_handle_exception): Don't call
7810         mono_debugger_handle_exception() for filters.
7811
7812 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
7813
7814         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
7815         as well.
7816
7817 2005-07-26  Martin Baulig  <martin@ximian.com>
7818
7819         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
7820
7821         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
7822         helper_compile_generic_method() if the method is actually virtual
7823         and non-final.
7824
7825 2005-07-26  Martin Baulig  <martin@ximian.com>
7826
7827         * mini.c
7828         (trampoline_code): Renamed to `mono_trampoline_code' and made it
7829         public; this is now accessed directly by the debugger.
7830         (mono_generic_trampoline_code): Removed.
7831
7832         * debug-mini.c
7833         (mono_debug_init_method): Also add interncalls and wrappers.
7834
7835 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
7836
7837         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
7838
7839 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
7840
7841         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
7842
7843 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
7844
7845         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
7846
7847 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7848
7849         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
7850         getting TLS offsets on AMD64 too.
7851
7852 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
7853
7854         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
7855
7856 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
7857
7858         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
7859         inssel-arm.brg, mini-arm.h: ARM port work in progress.
7860
7861 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
7862
7863         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
7864
7865         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
7866         to mini.c.
7867
7868         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
7869         mono_sparc_is_virtual_call ().
7870         
7871         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
7872
7873         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
7874         trampoline parameters.
7875
7876         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
7877         
7878         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
7879         to mono_arch_get_vcall_slot_addr.
7880
7881         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
7882         trampoline code.
7883
7884         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
7885
7886 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7887
7888         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
7889
7890 2005-07-19  Martin Baulig  <martin@ximian.com>
7891
7892         * exceptions-amd64.c (throw_exception): Call
7893         mono_debugger_throw_exception() here like we're doing it on i386.
7894
7895 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
7896
7897         * mini-ia64.c: Add optimized TLS access support.
7898
7899 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
7900
7901         * mini-exceptions.c: Ongoing IA64 work.
7902
7903         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
7904
7905         * mini.c: Use the default optimization set when embedding. Fixes
7906         #75194.
7907
7908 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
7909
7910         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
7911         of trampolines to a separate file.
7912
7913         * mini-trampolines.c: New file.
7914
7915         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
7916         separate file.
7917         
7918         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
7919         amd64/ia64 code.
7920
7921         * mini-codegen.c: Fix cygwin build.
7922
7923 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
7924
7925         * mini.c: Add some minor changes needed by the IA64 port.
7926
7927         * *-ia64.*: Ongoing IA64 work.
7928
7929 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
7930
7931         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
7932         trampolines into arch-independent and arch-dependent parts.
7933
7934         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
7935
7936 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
7937
7938         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
7939
7940         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
7941         the xp-regalloc-branch for amd64.
7942
7943         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
7944         xp-regalloc-branch for x86.
7945
7946 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
7947
7948         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
7949
7950 2005-07-06  Martin Baulig  <martin@ximian.com>
7951
7952         * mini.c
7953         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
7954         (mono_jit_runtime_invoke): Likewise.
7955
7956 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
7957
7958         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
7959         on x86 too.
7960         
7961         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
7962         without loading their metadata. Reorganize the file format so exception handling+
7963         debug info is kept separate from normal method info. Create MonoJitInfo 
7964         structures for methods lazily.
7965
7966         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
7967         loading metadata.
7968         (x86_class_init_trampoline): Patch AOT class init trampolines too.
7969
7970         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
7971
7972         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
7973         in AOT code.
7974
7975         * mini.h: Bump AOT file version.
7976
7977 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
7978
7979         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7980
7981 2005-07-01  Raja R Harinath  <rharinath@novell.com>
7982
7983         * Makefile.am (check-local): Call semdel-wrapper.
7984
7985 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
7986
7987         * mini-x86.c: Revert the last change as it seems to break the build..
7988
7989 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
7990
7991         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
7992         
7993         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
7994
7995 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
7996
7997         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
7998         outside of the macro, so strange stuff doesn't happen with gcc4
7999         (NEW_AOTCONST_TOKEN): Likewise.
8000
8001 2005-06-28  Martin Baulig  <martin@ximian.com>
8002
8003         * mini.c (mini_class_is_system_array): New static method; use this
8004         instead of `klass->parent == mono_defaults.array_class' everywhere
8005         since this also works for the new generic array class.
8006
8007 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
8008
8009         * inssel.brg: Remove warnings.
8010
8011 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
8012
8013         * mini-ia64.c: Ongoing IA64 work.
8014
8015         * basic-float.cs: Add float->i1 conversion test.
8016
8017         * iltests.il: Add conv.u4 test.
8018
8019 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
8020
8021         * inssel-long.brg: Fix bug caused by last change.
8022
8023 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
8024
8025         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
8026         BSDs.  Allows the x86 JIT to work on OSX86
8027
8028 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
8029
8030         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
8031         u4->i8 conversion.
8032
8033         * mini-ia64.c: Ongoing IA64 work.
8034
8035 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
8036
8037         * mini-ia64.c: Ongoing IA64 work.
8038
8039         * driver.c: Clean up jit_code_hash as well when using --regression.
8040
8041         * inssel-long.brg: Fix long->i4/u4 conversion rules.
8042
8043         * basic-long.cs: Add tests for long->u4 conversion.
8044
8045 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
8046
8047         * mini.c: Take mono_get_domainvar out of macros. This makes sure
8048         that we do not depend on undefined C behavior: the order stuff
8049         gets evaluated within an expression. Fixes mono when compiled on
8050         GCC 4.
8051
8052 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
8053
8054         * *-ia64.*: Ongoing IA64 work.
8055
8056         * aot.c: Lower memory usage while loading AOT methods.
8057
8058         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
8059
8060         * mini.h: Bump AOT file format version.
8061
8062 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
8063
8064         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
8065
8066 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
8067
8068         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
8069         not on callee assembly). Fixed some comments.
8070
8071 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
8072
8073         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
8074         it gets proper disassembly.
8075         (emit_method_info): Remove some dead code.
8076
8077         * mini.c (mini_method_compile): Allways allocate the GOT var in
8078         mono_method_to_ir for emulating opcodes.
8079
8080 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
8081
8082         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
8083         before freeing the code memory. Fixes #74990.
8084
8085         * objects.cs: Add regression test for #74992.
8086
8087         * liveness.c: Extend live ranges of arguments to the beginning of the
8088         method. Fixes #74992.
8089
8090         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
8091         so it points into the faulting instruction.
8092
8093 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
8094
8095         * jit-icalls.c (mono_imul_ovf): Add exception handling.
8096
8097         * *-ia64.*: Ongoing IA64 work.
8098
8099         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
8100
8101 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
8102
8103         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
8104
8105         * *-ia64.*: Ongoing IA64 work.
8106
8107 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
8108
8109         * basic-long.cs: Add tests for add/sub.ovf.
8110
8111         * basic.cs: Add tests for sub.ovf.
8112
8113         * *-ia64.*: Ongoing IA64 work.
8114
8115 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
8116
8117         * *-ia64.*: Ongoing IA64 work.
8118
8119         * basic.cs: Add conv.ovf.i4.un test.
8120
8121 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
8122
8123         * mini.c: (remove_block_if_useless) Fixed bug 75061.
8124         
8125 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8126
8127         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
8128
8129 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
8130
8131         * *-ia64.*: Ongoing IA64 work.
8132
8133 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8134
8135         * trace.[ch]:
8136         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
8137
8138 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
8139
8140         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
8141
8142 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
8143
8144         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
8145
8146         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
8147         of a call is callable by a near call.
8148
8149 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
8150
8151         * mini-ia64.c: Ongoing IA64 work.
8152
8153 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
8154
8155         * genmdesc.c: Make the generated array non-static.
8156
8157         * inssel-long.brg: Fix LSHR_IMM rule.
8158
8159         * *-ia64.*: Ongoing IA64 work.
8160
8161         * *-ia64.*: Ongoing IA64 work.
8162
8163 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
8164
8165         * *-ia64.*: Ongoing IA64 work.
8166
8167         * *-ia64.*: Ongoing IA64 work.
8168         
8169         * mini-ia64.c: Ongoing IA64 work.
8170
8171         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
8172
8173 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
8174
8175         * objects.cs basic-calls.cs: Move some tests to objects.cs.
8176         
8177         * objects.cs basic-long.cs: Move some tests to objects.cs.
8178
8179 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
8180
8181         * *-ia64.*: Ongoing IA64 work.
8182
8183         * iltests.il: Add a new test.
8184
8185         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
8186         newobj. Fixes #75042.
8187
8188 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
8189
8190         * *-ia64.*: Ongoing IA64 work.
8191         
8192         * *-ia64.*: Ongoing IA64 work.
8193         
8194         * *-ia64.*: Ongoing IA64 work.
8195
8196         * basic.cs objects.cs: Move tests accessing static variables as well.
8197
8198         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
8199
8200 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
8201
8202         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
8203
8204         * driver.c: Always print failed tests.
8205
8206         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
8207         frame pointer.
8208
8209         * *ia64*: Ongoing IA64 work.
8210
8211 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
8212
8213         * basic.cs: Add tests for add.ovf. Fix warnings.
8214
8215 2005-05-18  Miguel de Icaza  <miguel@novell.com>
8216
8217         * driver.c (mono_main): Avoid crash if no argument is passed to
8218         --break;  Do not use g_error, but f_printf.   And fix all other
8219         ocurrences of the same crash.
8220
8221 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
8222
8223         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
8224         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
8225         Fixes #74742.
8226
8227 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
8228
8229         * *-ia64.*: Add beginnings of IA64 backend.
8230
8231         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
8232
8233 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
8234
8235         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
8236         Fixes #74925.
8237
8238         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
8239
8240         * mini-amd64.c: Fix a warning.
8241
8242 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
8243
8244         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
8245         in float_neg. Fixes #74897.
8246
8247         * mini-amd64.c (emit_call): Fix another near call bug.
8248
8249 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
8250
8251         * declsec.c: Keep the appdomain information in the structure. Added a 
8252         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
8253         value gets overwritten).
8254         * declsec.h: Set the default MonoArray for the the stack to 6. Added
8255         an MonoAppDomain member to MonoSecurityFrame.
8256         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
8257         used in the stack walk. Now use a MonoArray which grow (double) when
8258         it gets full.
8259
8260 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
8261
8262         * mini.c: Re-enabled runtime cleanup, since running threads should
8263         now properly stop when exiting.
8264
8265 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
8266
8267         * mini-codegen.c: New file contaning the arch-independent local
8268         register allocator. Not used by any architectures yet.
8269
8270         * mini.h linear-scan.c: Merge some changes from the 
8271         mini-xp-local-regalloc branch.
8272
8273 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
8274
8275         * mini-amd64.c (emit_call): Fix calls to native functions when the
8276         runtime is compiled as a shared library. Fixes #74756.
8277
8278         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
8279         on a literal field. Fixes #74751.
8280
8281 2005-04-25  Raja R Harinath  <rharinath@novell.com>
8282
8283         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
8284
8285 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
8286
8287         * objects.cs: Add missing null casting test.
8288
8289 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
8290
8291         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
8292         in wrapper methods. Also rename 'address' variable to 'offset'.
8293
8294 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
8295
8296         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
8297         warnings.
8298         
8299         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
8300
8301         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
8302         work on windows.
8303
8304 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
8305
8306         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
8307
8308 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
8309
8310         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
8311         just the last bytes.
8312
8313 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
8314
8315         * aot.c (mono_compile_assembly): Fix warning.
8316
8317         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
8318         by the _MSC_VER stuff.
8319
8320 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
8321
8322         * inssel-long.brg: Fix #74588.
8323
8324         * cpu-amd64.md: Fix #74591.
8325
8326         * iltests.il: Add new regression tests.
8327
8328 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
8329
8330         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
8331         valuetype.
8332
8333 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
8334
8335         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
8336
8337         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
8338         from Bill Middleton <flashdict@gmail.com>.
8339
8340 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
8341
8342         * arrays.cs: Add new regression test. Fix warnings.
8343
8344 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
8345
8346         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
8347         and leakage in CKFINITE.
8348
8349         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
8350         this to a null op since it is called on amd64 too.
8351
8352         * exceptions-amd64.c (get_throw_trampoline): Align stack.
8353
8354         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
8355         body since this is not used on amd64.
8356         
8357         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
8358
8359         * mini-amd64.c: Remove obsolete fixmes.
8360
8361         * mini.c (print_method_from_ip): Fix debugging support.
8362
8363 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8364
8365         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
8366         so that expressions that don't give much gain are not reduced.
8367         * ssapre.h: Likewise.
8368
8369 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
8370
8371         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
8372
8373         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
8374
8375         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
8376
8377 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
8378
8379         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
8380
8381         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
8382
8383 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
8384
8385         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
8386         stack touching.
8387
8388         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
8389
8390         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
8391
8392         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
8393
8394         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
8395         MONO_ARCH_USE_SIGACTION. Fixes #74252.
8396
8397         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
8398
8399         * mini-x86.c: Fix up stack overflow handling.   
8400
8401         * exceptions.cs: Add new regression test.
8402
8403 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
8404
8405         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
8406         mono_jit_thread_attach.
8407
8408         * mini.c (mono_method_to_ir): Verify called method is not abstract.
8409
8410 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
8411
8412         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
8413         avoid calling constructors using callvirt.
8414
8415         * inssel.brg: Fix #74073.
8416
8417 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
8418
8419         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
8420         compilation with non-GCC compilers.
8421         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
8422         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
8423
8424 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
8425
8426         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
8427         klass->interface_offsets (will likely fix bug#74073).
8428
8429 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
8430
8431         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
8432
8433 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
8434
8435         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
8436         to amd64_div_reg_size ().
8437         
8438         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
8439
8440 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
8441
8442         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
8443
8444 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
8445
8446         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
8447
8448 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
8449
8450         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
8451         
8452         * mini.c (mono_precompile_assembly): Load and precompile referenced
8453         assemblies as well. Fixes #74015.
8454
8455 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
8456
8457         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
8458
8459 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
8460
8461         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
8462         a lot of checks and (anyway) permissions cannot work until corlib is 
8463         loaded.
8464
8465 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
8466
8467         * mini-ppc.c: fixed ABI issue on sysv/ppc.
8468
8469 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
8470
8471         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
8472         calls (fixes bug#72824).
8473
8474 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
8475
8476         * mini.c: fix tail recursion elimination (see test in bug#73936).
8477
8478 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
8479
8480         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
8481         some fp functions in sse2 mode.
8482
8483 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
8484
8485         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
8486
8487 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
8488
8489         * mini.h mini.c: Add mono_get_jit_tls_key ().
8490
8491         * mini-x86.c: Enable fast TLS support on windows.
8492
8493 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
8494
8495         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
8496         * mini.c: Check for p/invoke method when generating code. If a
8497         p/invoke method, or it's class, isn't decorated with [Suppress
8498         UnmanagedCodeSecurity] then generate code to call System.Security.
8499         UnmanagedDemand (only if the security manager is active).
8500
8501 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
8502
8503         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
8504         last change as it seems to cause strange crashes.
8505         
8506 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8507
8508         * *.c: handle unsafe function pointers where needed.
8509
8510 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
8511
8512         * mini.c (mono_jit_free_method): Remove the fixme too.
8513
8514 2005-03-15  Miguel de Icaza  <miguel@novell.com>
8515
8516         * mini.c: As discussed, make the code actually free the delegate
8517         thunk now, to enable the debugging of delegate problems, use
8518         MONO_DEBUG=1 when running Mono. 
8519
8520         This takes also care of parts of the leaks as seen by Joe.
8521
8522 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
8523
8524         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
8525         thread_tls_offset calculation.
8526
8527 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
8528
8529         * declsec.c: Reworked linkdemand checks for icall. The previous code
8530         was using the declaration code (untrusted) and didn't work as expected
8531         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
8532         specific case.
8533
8534 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
8535
8536         * iltests.il: Add new localloc test.
8537
8538         * mini-amd64.c: Handle large stack allocations the same way as on
8539         windows if stack overflow handling is working.
8540         
8541         * mini-amd64.c: Allocate the signal stack using mmap.
8542
8543         * mini.c (sigsegv_signal_handler): Fix reading of context.
8544
8545         * mini-exceptions.c: Fix up stack overflow handling.
8546
8547         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
8548
8549         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
8550
8551         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
8552
8553         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
8554
8555         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
8556         tramp_init functions as they are no longer needed.
8557
8558 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
8559
8560         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
8561         
8562         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
8563
8564         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
8565         
8566         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
8567         support that now.
8568
8569         * mini-ops.h: Add OP_LMUL_IMM.
8570
8571         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
8572         long mul/div opcodes as intrinsic.
8573
8574         * mini-amd64.c (emit_call): Handle the case when the callee might be
8575         an AOT method.
8576
8577 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
8578
8579         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
8580         extra safe.
8581         
8582         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
8583
8584         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
8585
8586 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
8587
8588         * mini.c (mono_codegen): Don't leak here, to help people running
8589         monogrind.
8590
8591 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
8592
8593         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
8594         conversions in sse2 mode.
8595
8596         * basic-float.cs: Add regression test.
8597         
8598         * mini-amd64.c: Reenable sse2.
8599
8600 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
8601
8602         * mini-amd64.c: Disable sse2 until some regressions are fixed.
8603
8604 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
8605
8606         * driver.c: Copyright text should include 2005.
8607         
8608 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
8609
8610         * cpu-amd64.md (load_membase): Fix more max lengths.
8611
8612 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
8613
8614         * cpu-amd64.md (load_membase): Fix max length.
8615
8616         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
8617
8618         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
8619
8620         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
8621         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
8622
8623         * basic-float.cs: Add rounding regression test.
8624
8625         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
8626
8627 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
8628
8629         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
8630         structures in registers for pinvoke wrappers.
8631
8632 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
8633
8634         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
8635
8636 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
8637
8638         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
8639         wrapper to mono_jit_thread_attach.
8640
8641         * mini.c (mini_jit_thread_attach): New jit icall.
8642
8643         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
8644         native->managed wrappers.
8645
8646         * exceptions.cs: Add new regression test.
8647
8648         * mini.c (optimize_branches): Check regions in the cbranch to throw
8649         block case as well. Fixes #73242.
8650
8651 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
8652
8653         * mini.c: thread safety fixes.
8654
8655 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
8656
8657         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
8658         patching stuff, since delegates use jump trampolines so there is
8659         no caller.
8660
8661         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
8662         jump trampolines.
8663         
8664         * tramp-amd64.c: Fix build.
8665
8666         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
8667         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
8668
8669         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
8670         Rename this to mono_arch....
8671         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
8672
8673         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
8674
8675         * mini-amd64.c (emit_call): If both the caller and the callee is
8676         guaranteed to have 32 bit addresses, emit a normal call.
8677
8678         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
8679
8680         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
8681         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
8682         method_ptr inside delegates.
8683
8684 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
8685
8686         * mini.c (mono_jit_free_method): Free the method info even if the native code is
8687         invalidated. Fixes #73001.
8688
8689         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
8690
8691         * mini-x86.c: Only use stdcall for pinvokes on windows.
8692
8693 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
8694
8695         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
8696         * mini-x86.c: remove unreliable __thread var offset detection,
8697         use the correct accessors and enable by default.
8698
8699 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
8700
8701         * mini.c (mono_jit_free_method): Fix memory leak.
8702
8703 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
8704
8705         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
8706
8707 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
8708
8709         * cpu-amd64.md: Fix lengths of atomic opcodes.
8710
8711 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
8712
8713         * driver.c: try to not imply using ICU is any good.
8714
8715 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
8716
8717         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
8718         functions as inline ops.
8719
8720         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
8721         some Interlocked functions as inline ops.
8722
8723         * mini.c (move_basic_block_to_end): Fix bug in last patch.
8724
8725         * mini.h (MonoBasicBlock): Reorganize fields a bit.
8726
8727         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
8728
8729         * mini.c: Add support for OP_NOT_TAKEN.
8730
8731         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
8732         structures in registers for pinvoke wrappers.
8733
8734         * mini-amd64.c: Fix warnings.
8735
8736 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
8737
8738         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
8739
8740         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
8741
8742         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
8743         address instead of loading the address from it.
8744
8745         * mini-x86.c: Add support for returning small structs in registers
8746         on Win32. Fixes part of #70864.
8747         
8748 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
8749
8750         * trace.c (get_token): Improve error checking.
8751
8752 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
8753
8754         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
8755
8756 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
8757  
8758         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
8759         it can be reused for MonoClass.
8760         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
8761         _LINKDEMAND.
8762
8763 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
8764
8765         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
8766         instead of a MonoReflectionMethod. The method information wasn't used
8767         when displaying SecurityException details (but will be now).
8768
8769 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
8770
8771         * Makefile.am : windows build fix.
8772
8773 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
8774
8775         * iltests.il: Add new regression test.
8776
8777         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
8778         #72522.
8779
8780 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
8781  
8782         * mini.c: Moved linkdemand check into helper function check_linkdemand
8783         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
8784         LDFTN, LDVIRTFTN).
8785
8786 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
8787
8788         * declsec.c: Added statistics counter for different kinds of 
8789         LinkDemands.
8790         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
8791         (and commented) declaration.
8792         * mini.c: Added statistics counter for security Demand code 
8793         generation. Added display of security statistics.
8794
8795 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
8796
8797         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
8798         Fix compilation errors under gcc-2.95.
8799
8800 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
8801
8802         * mini.c, driver.c: Use the new jit trampoline hashtable
8803
8804 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8805
8806         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
8807
8808 2005-02-11  Martin Baulig  <martin@ximian.com>
8809
8810         * debug-mini.c (mono_debug_close_method): Free the line number array.
8811
8812 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8813
8814         * aot.c: Break up large methods into smaller ones. Share GOT slots for
8815         icalls.
8816
8817         * mini.h: Bump AOT file format version. 
8818
8819 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
8820
8821         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
8822         APTC and P/Invoke.
8823         * declsec.h: Added macros to get/set lazyly initialized security 
8824         informations about assemblies. Added new enum for different type of
8825         possible LinkDemand violation. Added function to check LinkDemands.
8826         * mini.h: Added a field to MonoCompile to hold any security violation
8827         detected when JITting a method (so it can be thrown later).
8828         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
8829         and CEE_CALLVIRT. Added code to throw exception at the end of
8830         mini_method_compile (note: the exception is unhandled right now).
8831
8832 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
8833
8834         * mini.c, jit-icalls.c: use the managed implementation of
8835         memset for initobj and memset, to avoid managed <-> unmanaged
8836         transitions.
8837
8838 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
8839
8840         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
8841         optimization if it would need a GOT var.
8842
8843         * basic.cs: Add tests for constant propagation and switch statements.
8844
8845         * ssa.c: Fix out-of-range constant propagation and switch statements.
8846
8847 2005-02-09    <vargaz@freemail.hu>
8848
8849         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
8850
8851 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
8852
8853         * cpu-amd64.md (load_membase): Fix max length of load_membase.
8854
8855 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8856
8857         * mini.c: update to new signature of mono_class_get_allocation_ftn().
8858
8859 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
8860
8861         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
8862         arithmetic operations.
8863
8864 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
8865
8866         * mini-ppc.c: add a workaround for broken user code that
8867         DllImports vararg functions with non-vararg signatures.
8868
8869 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
8870
8871         * mini.c (mono_jit_compile_method_inner): Add detection and a 
8872         meaningfull error message for assemblies written in Managed C++.
8873
8874         * tramp-amd64.c mini-amd64.h: Add support for 
8875         create_trampoline_from_token ().
8876
8877         * aot.c mini-x86.c abcremoval.c: Applied patch from
8878         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
8879
8880 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
8881
8882         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
8883         which takes a MonoImage/token as parameter instead of a MonoMethod.
8884
8885         * aot.c: Use the new trampoline for initializing vtables.
8886
8887         * aot.c: Add support for ldfld/stfld_remote wrappers.
8888
8889         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
8890         rules for compare <MEM>, IMM.
8891
8892         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
8893
8894         * aot.c: Handle inherited finalizers correctly.
8895
8896 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
8897
8898         * inssel.brg (stmt): Add a missing _setup_... ().
8899
8900         * aot.c: Save some parts of the class state to the AOT file and use it
8901         to recompute that state when a class is initialized.
8902
8903         * mini.c: Install AOT hooks into the runtime.
8904
8905         * mini.h: Bump AOT file format version.
8906         
8907         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
8908         Fixes #72148.
8909
8910         * iltests.il: Add new test.
8911
8912 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
8913
8914         * mini.c: fix typo.
8915
8916 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
8917
8918         * mini.c: setup the statistical profiler in the thread attach
8919         callback to cope with the new single thread code.
8920
8921 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
8922
8923         * mini-ppc.c: ensure we have enough room for the profiler
8924         calls (fixed bug#72084).
8925
8926 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
8927
8928         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
8929         it.
8930
8931 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8932
8933         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
8934
8935 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8936
8937         * ssapre.c: Fixed an issue with down safety (this allows IronPython
8938         to succesfully execute parrotbench).
8939         * ssapre.h: Likewise.
8940
8941 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
8942
8943         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
8944         variable for stores to method arguments (fixes a SSAPRE issue).
8945
8946 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
8947
8948         * mini.c: handle value types in dup, fixes gen-112.cs.
8949
8950 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
8951
8952         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
8953         sequence for calls in dynamic methods to avoid thunks.
8954
8955 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
8956
8957         * mini.c: correctly remove dynamic methods from the hashtable.
8958
8959 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
8960
8961         * driver.c: Disabled SSAPRE until fix the bug that appears
8962         in IronPython's parrotbench.
8963
8964 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
8965
8966         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
8967
8968         * mini.c (mono_method_to_ir): Revert the previous change.
8969         
8970         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
8971         when AOT compiling.
8972
8973         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
8974         mono_jit_info_table_find () etc. when running under valgrind.
8975
8976         * inssel.brg: Fix warnings.
8977
8978         * mini-exceptions.c: Fix warnings.
8979
8980 2005-01-31  Martin Baulig  <martin@ximian.com>
8981
8982         * driver.c (compile_all_methods_thread_main): Don't try to compile
8983         generic methods or anything which has type parameters.
8984
8985 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
8986
8987         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
8988
8989         * TestDriver.cs: Add --verbose flags.
8990
8991         * graph.c ssa.c: Fix 64 bit warnings.
8992         
8993         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
8994         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
8995         Fix 64 bit warnings.
8996
8997         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
8998         variable not spotted by gcc.
8999         
9000         * mini-amd64.c inssel-amd64.brg: Applied patch from  
9001         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
9002         X86_COMPARE_MEMBASE opcodes.
9003
9004         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
9005
9006 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
9007
9008         * *: MonoMethod->signature might be NULL now. You *MUST* use
9009         mono_method_signature.
9010
9011 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
9012
9013         * driver.c (compile_all_methods_thread_main): Compile the methods
9014         without invoking cctors.
9015
9016 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
9017
9018         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
9019         * basic-calls.cs: test for the above.
9020
9021 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
9022
9023         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
9024         MonoJitInfo changes.
9025
9026 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
9027
9028         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
9029         eagerly if it contains dynamic methods.
9030         
9031         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
9032
9033         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
9034         trace, it is now computed by an icall from trace_ips.
9035         
9036         * mini-exceptions.c: Fix a warning.
9037
9038 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
9039
9040         * mini-exceptions.c: don't bother getting stack trace info if
9041         it's not going to be used.
9042
9043 2005-01-27  Raja R Harinath  <rharinath@novell.com>
9044
9045         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
9046         ssapre-mini-ops.h.
9047
9048 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
9049
9050         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
9051
9052         * aot.c: Avoid calling mono_method_get_header () if not needed.
9053
9054         * mini.h: Bump AOT file format version.
9055         
9056         * mini.c (mono_emit_native_call): Allocate a GOT var here.
9057
9058         * mini.c (mono_print_tree): Print more info for calls.
9059
9060 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
9061
9062         * declsec.h: Remove warning by adding missing include for marshal.h
9063
9064 2005-01-26  Martin Baulig  <martin@ximian.com>
9065
9066         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
9067         `ip' twice.
9068
9069 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
9070
9071         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
9072         flags.
9073
9074         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
9075
9076         * aot.c (mono_compile_assembly): Fix a warning.
9077
9078 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
9079
9080         * declsec.c: Look for security attributes on the original MonoMethod 
9081         (and not the wrapped one). This fix permissions on icalls.
9082
9083 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
9084
9085         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
9086
9087         * mini.c (mono_allocate_stack_slots): Add a fixme.
9088
9089         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
9090
9091 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
9092
9093         * inssel.brg: optimize casts of sealed types (more
9094         optimizations waiting for fixes in remoting).
9095
9096 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
9097
9098         * inssel.brg (stmt): Add another dummy rule.
9099
9100         * driver.c: Fix warnings.
9101
9102         * driver.c (mono_main): If running under valgrind, instruct glib to use
9103         the system allocation functions so valgrind can track the memory
9104         allocated by the g_... functions.
9105
9106         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
9107
9108         * mini-ops.h: Add OP_DUMMY_STORE opcode.
9109
9110         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
9111
9112         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
9113         variables in try regions.
9114
9115         * mini.c (mini_method_compile): Don't disable optimizations on large
9116         methods when AOT compiling.
9117
9118         * mini.c (mono_allocate_stack_slots): New arch independent method to 
9119         allocate stack slots. Not yet used.
9120
9121 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
9122
9123         * debug-mini.c (mono_debug_close_method): Plug some leaks.
9124
9125 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
9126
9127         * mini-ppc.c: make the branch info relative as the code
9128         buffer can be reallocated.
9129
9130 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
9131
9132         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
9133         * driver.c: Removed the AOT/security restriction. Now initialize the
9134         security manager (in metadata) if --security is used.
9135         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
9136         rather than the pointer to declarative security, when AOT is used.
9137
9138 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
9139
9140         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
9141         basic blocks, reduced intrinsic exception throwing code size.
9142
9143 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
9144
9145         * driver.c (mini_usage): Reorder the usage screen.
9146
9147 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
9148
9149         * mini.c (mono_resolve_patch_target): Fix warning.
9150
9151 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
9152
9153         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
9154         previous patch.
9155
9156         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
9157
9158         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
9159         breaks the amd64 build.
9160
9161         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
9162         register allocation. Fixes #71454.
9163
9164         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
9165
9166         * arrays.cs: Add new regression test.   
9167
9168 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9169
9170         * ssapre.c: Turned usage of snprintf to GString.
9171         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
9172         (I left it on by mistake in my previous commit).
9173
9174 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
9175
9176         * mini.c, cfold.c, basic-calls.cs: preserve side effects
9177         on cond branch optimization (fixes bug# 71515).
9178
9179 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9180
9181         * abcremoval.c: Fixed bug 71062.
9182         * abcremoval.h: Likewise.
9183
9184 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
9185
9186         * mini.c: Added a new functionality to optimize_branches, the removal
9187         of useless basic blocks, and fixed some problem in the removal of
9188         critical edges; some utility functions added for both purposes.
9189         * ssapre.c: Added complex expression support, and fixed bug 70637.
9190         * ssapre.h: Likewise.
9191         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
9192         enabled in SSAPRE.
9193         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
9194         * driver.c: Re-enabled SSAPRE.
9195
9196 2005-01-19  Martin Baulig  <martin@ximian.com>
9197
9198         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
9199         the result of mono_get_method_constrained().
9200
9201 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
9202
9203         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
9204         manager.
9205
9206 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
9207
9208         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
9209         be detected.  Fixes #59296.
9210
9211 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
9212
9213         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
9214         which can happen. Fixes #71361.
9215
9216 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
9217
9218         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
9219         manager.
9220
9221 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
9222
9223         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
9224         appdomain-unload.exe to fail.
9225         
9226         * mini.c: Fix some memory leaks.
9227
9228 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
9229
9230         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
9231         Fixed bug and sped up some codepaths.
9232
9233 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
9234
9235         * mini.c: Fix some memory leaks.
9236
9237         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
9238         conversion.
9239
9240         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
9241
9242         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
9243         #71320.
9244
9245         * iltests.il: Add regression test for #71320.
9246
9247 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
9248
9249         * mini.c (mono_codegen): Fix installation of profiler hooks.
9250
9251         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
9252
9253 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
9254
9255         * mini.h, mini.c, cfold.c: optimize access to enum
9256         readonly fields, too. Eval conditional branches if possible
9257         to perform unreachable code removal in more cases.
9258
9259 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
9260
9261         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
9262
9263         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
9264         code manager.
9265
9266         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
9267         WinXP DEP. Fixes #71244.
9268
9269 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
9270
9271         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
9272
9273 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
9274
9275         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
9276
9277 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
9278
9279         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
9280         changes.
9281
9282         * mini.h: Bump AOT version.
9283
9284         * mini.h (MonoCompile): Change exvar to a hash table.
9285
9286         * mini.c: Allocate a separate exvar for each handler block.
9287
9288         * mini.c: Get rid of the computation of filter_lengths, its not needed.
9289
9290         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
9291         ex var with the pending exception and only throw if the two are equal.
9292         Fixes #68552.
9293         
9294         * exceptions.cs: Add tests for rethrow and nested catch clauses.
9295
9296         * mini-x86.c: Fix warnings.
9297
9298         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
9299         used by all the ports now.
9300
9301         * aot.c: Add write-symbols and save-temps options.
9302
9303 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
9304
9305         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
9306
9307 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
9308
9309         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
9310         operations.
9311
9312         * tramp-s390.c: Check vtable slot belongs to the domain.
9313
9314         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
9315         as per other platforms.
9316
9317         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
9318
9319 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
9320
9321         * driver.c: we don't run the Main() code in a subthread anymore.
9322
9323 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
9324
9325         * mini.c: added experimental rtc support in the statistical
9326         profiler: if the user has the permission, more accurate statistics
9327         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
9328         The MONO_RTC value must be restricted to what the linux rtc allows:
9329         power of two from 64 to 8192 Hz.
9330
9331 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
9332
9333         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
9334
9335 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
9336
9337         * mini-ppc.c: better icache flush for smp.
9338
9339 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
9340
9341         * mini-amd64.c (emit_move_return_value): Fix memory leak.
9342
9343         * mini-x86.c (get_call_info): Add the get_call_info () code from the
9344         amd64 port, not yet used.
9345
9346 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
9347
9348         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
9349         a struct type.
9350
9351 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
9352
9353         * driver.c: Added --security option to activate the security manager.
9354         Right now this will allow code generation for declarative demands and
9355         is disabled when AOT is specified.
9356         * mini.c: Add code generation for declarative security demands.
9357         * mini.h: Add mono_use_security_manager as an extern gboolean.
9358
9359 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
9360
9361         * aot.c (mono_compile_assembly): Speed up compilation a bit by
9362         emitting more dense assembly code.
9363
9364         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
9365         exception throwing stuff.
9366
9367 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
9368
9369         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
9370         dead code.
9371
9372         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
9373         left in by mistake.
9374
9375         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
9376         fixed.
9377
9378         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
9379
9380         * tramp-*.c: Only patch vtable slots if the object is in the current
9381         domain. Fixes appdomain-unload.exe.
9382
9383         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
9384         
9385         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
9386         x86 branch.
9387
9388 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
9389
9390         * mini.c (reverse_branch_op): New helper function.
9391
9392         * mini.c (optimize_branches): Run the new optimization only on 
9393         platforms which support it. Also reverse all kinds of branches.
9394
9395         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
9396
9397         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
9398         a throw statement.
9399
9400         * mini.c (optimize_branches): Reverse not-equals branches if the false
9401         bblock is a throw. This happens a lot of time with argument checking in
9402         corlib.
9403
9404         * mini.c (mono_codegen): Add support for placing basic blocks after
9405         the function epilogue.
9406
9407         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
9408         function epilogue.
9409         
9410 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
9411
9412         * mini.c (setup_stat_profiler): Only set this up if the platform
9413         supports ITIMER_PROF.
9414
9415 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
9416
9417         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
9418         previous patch.
9419
9420         * inssel.brg: Fix a warning.
9421
9422 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
9423
9424         * mini.c: added support for statistical profiler 
9425         (run with: --profile=default:stat).
9426
9427 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
9428
9429         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
9430
9431         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
9432
9433         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
9434         related to global registers from the amd64 port.
9435
9436 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
9437
9438         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
9439
9440         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
9441         with global registers.
9442         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
9443
9444         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
9445
9446 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
9447
9448         * debug-mini.c (encode_value): Fix off-by-one.
9449
9450         * aot.c (encode_value): Likewise.
9451
9452         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
9453
9454 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
9455
9456         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
9457         AOT.
9458
9459         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
9460         
9461         * aot.c (emit_method_info): Increase size of temp buffer.
9462
9463         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
9464         the AOT case.
9465
9466 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
9467
9468         * aot.c (emit_method_info): Fix build.
9469         
9470         * aot.c: Further rework of the AOT file format to reduce the size of
9471         the method info data.
9472
9473         * mini.h: Bump AOT file format version.
9474
9475 2004-12-27  Martin Baulig  <martin@ximian.com>
9476
9477         * mini.c (mini_get_method): New static method; call
9478         mono_get_method_full() and mono_get_inflated_method().
9479         (mono_method_to_ir): Use mini_get_method() instead of
9480         mono_get_method_full(). 
9481
9482 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
9483
9484         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
9485
9486 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
9487
9488         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
9489
9490         * inssel-amd64.brg: Add some optimization rules.
9491
9492 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
9493
9494         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
9495         standard not GC'd stuff is fine.
9496
9497 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
9498
9499         * aot.c: Rework the AOT file format to get rid of most of the global
9500         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
9501
9502         * mini.h: Bump AOT file format version.
9503         
9504 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
9505
9506         * mini.h: Bump AOT file format version.
9507
9508         * aot.c (mono_aot_is_got_entry): New function to determine if an 
9509         address is inside a GOT.
9510
9511         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
9512
9513         * cpu-pentium.md: Increase the maximum size of some instructions which
9514         might involve a got access.
9515         
9516         * mini.c (get_method_from_ip): Another debug helper function.
9517
9518         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
9519         when got var accesses are created during the decompose phase.
9520
9521         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
9522
9523         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
9524         argument mini_compile_method and to MonoCompile, and use this to
9525         determine whenever a given method is compiled for AOT. This allows the
9526         other methods compiled during AOT compilation to be free of AOT stuff,
9527         so the backends does not need to add special support for them by
9528         creating a fake GOT etc.
9529
9530         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
9531         longer needed.
9532
9533 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
9534
9535         * mini.c (mono_method_to_ir): It turns out that some of the
9536         x-appdomain wrappers are lax with types, so just ignore this for
9537         all wrappers.
9538
9539         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
9540         at the vtable->klass. If it is non-shared code we can just use the
9541         vtable.
9542
9543 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
9544
9545         * mini-ppc.c: access MonoDomain from tls, too.
9546
9547 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
9548
9549         * declsec.c: Removed unused variable (and related warning ;-)
9550
9551 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
9552
9553         * iltests.il: New test for LDELEMA on an array of ref types.
9554
9555         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
9556         all ldelema's on reftypes.
9557         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
9558         it was the wrong place to put it.
9559
9560         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
9561         register to pop to make this cleaner, at the request of Paolo.
9562
9563 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
9564
9565         * mini-ops.h (OP_GETHASHCODE): New op.
9566
9567         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
9568
9569         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
9570         operation.
9571
9572         For a microbenchmark, this reduces the cost of Hashtable.get_Item
9573         by 25%.
9574         
9575         * mini-x86.c (mono_arch_output_basic_block): Rather than
9576
9577         add ebp, 4
9578
9579         Emit
9580
9581         pop edx
9582
9583         The first is 3 bytes while the second is 1. This saves 36 kb on
9584         mscorlib, quite a big saving. When bootstraping mcs, I was able to
9585         see a small boost because of icache locality.
9586
9587         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
9588
9589 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
9590
9591         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
9592         started code sharing with the generic code.
9593
9594 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
9595
9596         * mini-ppc.c, cpu-g4.md: added code for direct access to
9597         tls data slots.
9598
9599 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
9600
9601         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
9602          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
9603         to OP_TLS_GET.
9604
9605 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
9606
9607         * declsec.c|h: Added functions to cache the declarative stack modifiers
9608         in MonoJitInfo and to create a security frame from a MonoJitInfo 
9609         structure.
9610         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
9611         created. Register internal calls for System.Security.SecurityFrame::
9612         _GetSecurityFrame and _GetSecurityStack.
9613         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
9614         the definitions for the new stack walk/callback mechanism.
9615         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
9616         first security frame for LinkDemands and InheritanceDemands) and
9617         GetSecurityStack for Demands. Both use the new mono_walk_stack code
9618         from lupus.
9619         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
9620         walk initialization (lupus).
9621
9622 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
9623
9624         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
9625         idiom.
9626         (handle_loaded_temps): Do not create a temporary variable for
9627         things that we know are temps. They will never be modified.
9628         (mono_spill_call): Set MONO_INST_IS_TEMP
9629         (mono_emulate_opcode): ditto
9630         (emit_tree): ditto
9631         (mono_method_to_ir.CEE_DUP): ditto
9632
9633 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
9634
9635         * mini.c (type_to_eval_stack_type): Make this handle the void type
9636         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
9637         (emit_tree): use ip_in_bb to special case some common idioms
9638         Update all callers to pass in the IP.
9639         (mono_method_to_ir): Make CEE_CALL* do the above as well.
9640
9641         This gives us a nice 2% speedup in mcs bootstrap.
9642
9643         * mini-x86.c (peephole_pass): Peephole pass to make
9644         mov  [foo], eax
9645         push [foo]
9646
9647         into
9648
9649         mov [foo], eax
9650         push eax
9651
9652         * mini.c (ip_in_bb): new method.
9653         (mono_method_to_ir): use this method rather than doing the hash
9654         lookup ourselves.
9655
9656         * linear-scan.c (mono_linear_scan): When expiring actives, you
9657         don't need to keep around variables that expire on this
9658         instruction. This makes it so that:
9659              a = b + 1
9660         will turn into:
9661              store (ebx add (ebx, 1))
9662         which will become
9663              add ebx, 1
9664
9665 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
9666
9667         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
9668         combination to avoid doing two copies. Fix up problems with previous
9669         patch.
9670
9671         * mini.c: Fix 64 bit warnings.
9672
9673         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
9674
9675 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
9676
9677         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
9678         changes from the x86 code.
9679
9680         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
9681
9682 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
9683
9684         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
9685         throwing code to reduce its size, unify the AOT and non-aot code and 
9686         get rid of relocations in the AOT case.
9687
9688         * mini-x86.h mini.c exceptions-x86.c 
9689         (mono_arch_get_throw_corlib_exception): New arch specific function to 
9690         raise corlib exceptions which doesn't require relocations in the 
9691         caller.
9692
9693         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
9694
9695 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
9696
9697         * mini.c (mono_emit_method_call): Only allocate the got var when it is
9698         needed.
9699
9700         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
9701         in the AOT case.
9702
9703 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9704
9705         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
9706         with add function when used from Inc/dec atomic 
9707         functions. Re-enabled optimization on x86.
9708         * mini-ops.h: renamed atomic_add functions to
9709         allow _add to match the Interlocked::Add and
9710         _add_next to match Interlocked::Inc/Dec.
9711
9712 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
9713
9714         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
9715         linking of BBs to the end BB, and enabled SSAPRE also with
9716         consprop and copyprop (which was prevented by that bug).
9717
9718 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9719
9720         * mini-x86.c: disabling the Interlocked optimizing code. 
9721
9722 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
9723
9724         * aot.c (load_aot_module): Move reading of got_addr after the AOT
9725         file version check.
9726         
9727 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
9728
9729         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
9730         interlocked optimization due lack of support on x86, rewrote 
9731         exchange to take into account that base may be in eax.
9732         
9733         xsp works again; activated Interlocked optimizing code.
9734         
9735 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
9736
9737         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
9738
9739 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
9740
9741         * mini-ops.h: Add new opcodes.
9742
9743         * mini.h: Add new patch types. Add got_var to MonoCompile.
9744
9745         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
9746         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
9747         make it work with all kinds of patchable code.
9748
9749         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
9750         address of the GOT, and referencing entries in the GOT.
9751
9752         * mini.c: Add code to load the GOT address if needed by an opcode.
9753
9754         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
9755         independent AOT code on the x86 using an elf-style Global Offset Table.
9756
9757 2004-12-14  Raja R Harinath  <rharinath@novell.com>
9758
9759         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
9760
9761 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9762
9763         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
9764         when running xsp.
9765
9766 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
9767
9768         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
9769         of Interlocked:Increment/Decrement/Add as inline ops.
9770         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
9771
9772 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
9773
9774         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
9775         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
9776
9777 2004-12-12  Duncan Mak  <duncan@ximian.com>
9778
9779         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
9780         again. `patch_info->table_size' is no longer valid after Zoltan's
9781         commit #37636.
9782
9783 2004-12-12  Martin Baulig  <martin@ximian.com>
9784
9785         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
9786         if we are the "real" method, ie. not an inlined method inside it.
9787
9788 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
9789
9790         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
9791         before we look in the special fields table. This fixes
9792         ../tests/thread-static-init.cs.
9793
9794 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9795
9796         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
9797         for Array get_Rank and get_Length. Fixes bug #70465.
9798
9799 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
9800
9801         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
9802         separate structure to reduce the size of MonoJumpInfo.
9803
9804 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
9805
9806         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
9807
9808 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
9809
9810         * mini.c (mini_get_inst_for_method): Changed to allow ports
9811         to return a MonoInst instead of opcode 
9812         (renamed mini_get_opcode_for_method to better reflect the new functionality)
9813         
9814         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
9815         Allow ports to return a created MonoInst instead of op-code, will enable
9816         new optimizations.
9817         (renamed mini_get_opcode_for_method to better reflected the functionality)
9818
9819 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
9820
9821         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
9822
9823 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9824
9825         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
9826         Fixes #69985.
9827
9828 2004-12-08  Martin Baulig  <martin@ximian.com>
9829
9830         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
9831         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
9832
9833 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
9834
9835         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
9836         correctly.
9837
9838         * exceptions.cs: Disable some tests which depend on properties of x86 fp
9839         arithmetic.
9840
9841 2004-12-08  Raja R Harinath  <rharinath@novell.com>
9842
9843         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
9844
9845 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
9846
9847         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
9848         bug introduced by the previous patch.
9849
9850 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9851
9852         * mini-ppc.c, objectc.cs: handle large structs passed by value
9853         (fixes bug #69972).
9854
9855 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
9856
9857         * mini-ppc.c: OP_ARGLIST implementation from
9858         Geoff Norton  <gnorton@customerdna.com>.
9859
9860 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
9861
9862         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
9863         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
9864
9865 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
9866
9867         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
9868
9869 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9870
9871         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
9872         support.
9873
9874 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
9875
9876         * mini-sparc.c: Zero out localled-ed memory.
9877
9878         * iltests.il: Add tests for zeroing out localloc-ed memory.
9879
9880 2004-12-04  Martin Baulig  <martin@ximian.com>
9881
9882         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
9883         mono_method_get_signature_full().       
9884
9885 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
9886
9887         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
9888         and some utility functions (always for SSAPRE), integrated SSAPRE.
9889         * mini.h: Likewise.
9890         * driver.c: Added ssapre option.
9891         * ssa.c: Small fix on OP_ARG handling.
9892         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
9893         * Makefile.am: Likewise.
9894
9895 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
9896
9897         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
9898         now in the xp code.
9899
9900         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
9901         icall.
9902
9903 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
9904
9905         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
9906         
9907         * cpu-s390.md : Increase instruction length of oparglist.
9908
9909         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
9910
9911 2004-11-30  Martin Baulig  <martin@ximian.com>
9912
9913         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
9914         virtual generic methods.  We call a special helper_compile_generic_method()
9915         icall to retrieve the method from the vtable, inflate and compile
9916         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
9917
9918         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
9919
9920 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
9921
9922         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
9923
9924 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
9925
9926         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
9927         Fixes #69929.
9928
9929 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
9930
9931         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
9932         platforms with PIC aot.
9933
9934 2004-11-28  Martin Baulig  <martin@ximian.com>
9935
9936         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
9937         Fixes gen-112.cs.
9938
9939 2004-11-28  Martin Baulig  <martin@ximian.com>
9940
9941         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
9942         the result of mono_type_get_underlying_type() to check whether
9943         we're byref.
9944
9945 2004-11-26  Martin Baulig  <martin@ximian.com>
9946
9947         * mini.c
9948         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
9949         in the g_assert().
9950
9951 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
9952
9953         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
9954         the same way as the other arguments so they won't get clobbered.
9955
9956         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
9957         calls through R11 since it is clobbered by the trampoline code.
9958
9959 2004-11-26  Raja R Harinath  <rharinath@novell.com>
9960
9961         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
9962         pick up in-tree mscorlib.dll.
9963
9964 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
9965
9966         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
9967
9968         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
9969         runtime data/code are now stored in a table similar to the GOT in ELF. 
9970         This allows the code itself to be position independent.
9971
9972         * aot.c: Fix loading of referenced assemblies after the lazy assembly
9973         loading changes.
9974
9975         * aot.c: Attach ELF type (object/function) directives to all global
9976         symbols.
9977
9978         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
9979
9980         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
9981
9982         * mini-amd64.h: Turn on PIC AOT code.
9983
9984         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
9985         returning the offset within an OP_AOTCONST instruction where the GOT
9986         offset needs to be added.
9987
9988         * mini.h: Bump AOT file format version.
9989
9990 2004-11-25  Martin Baulig  <martin@ximian.com>
9991
9992         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
9993         uninflated generic methods.
9994
9995 2004-11-25  Martin Baulig  <martin@ximian.com>
9996
9997         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
9998
9999 2004-11-24  Martin Baulig  <martin@ximian.com>
10000
10001         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
10002         original klass (this only applies for generic instances).
10003
10004 2004-11-24  Martin Baulig  <martin@ximian.com>
10005
10006         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
10007         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
10008         that array).
10009
10010 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
10011
10012         * mini.c (mono_method_to_ir): Disable inlining for methods containing
10013         localloc. Fixes #69678.
10014
10015         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
10016         
10017 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
10018
10019         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
10020         used SSE registers on pinvoke calls. Fixes #69774.
10021
10022 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
10023
10024         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
10025         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
10026
10027 2004-11-23  Raja R Harinath  <rharinath@novell.com>
10028
10029         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
10030         Refer directly to the mcs/ tree.
10031
10032 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10033
10034         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
10035         Check if a trampoline for a synchronized method is required. 
10036
10037 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
10038
10039         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
10040         with localloc if needed. Throe arithmetric exception in
10041         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
10042         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
10043
10044 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
10045
10046         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
10047         types before switching on type.  Fixes #69622.
10048
10049 2004-11-19  Raja R Harinath  <rharinath@novell.com>
10050
10051         * Makefile.am (check-local): New.  Integrate into 'make check'.
10052         (MCS,RUNTIME): Define using in-tree mono and mcs.
10053         (ILASM): New.
10054         (%.exe): Use $(ILASM).
10055
10056 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
10057
10058         * mini-ppc.c: adjust initial prolog size (bug #69691).
10059
10060 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
10061
10062         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
10063         #69664.
10064
10065 2004-11-17  Raja R Harinath  <rharinath@novell.com>
10066
10067         * Makefile.am (clean-local): Rename from 'clean'.
10068
10069 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10070
10071         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
10072         to mono_arch_is_int_overflow. 
10073         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
10074         SIGFPE events.
10075
10076 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
10077
10078         * declsec.c|h: New files to support declarative security attributes.
10079         Added function to check if a method has (applicable) security.
10080         * mini.c|h: Add check for declarative security attributes in
10081         mono_method_check_inlining.
10082         * Makefile.am: Added declsec.c and declsec.h to the build.
10083
10084 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
10085
10086         * mini.c, mini.h: update to keep dynamic code info per-domain.
10087
10088 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
10089
10090         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
10091         (mini_init): Get rid of it from here too.
10092
10093 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
10094
10095         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
10096         implemented OP_RETHROW (patch by Geoff Norton
10097         <gnorton@customerdna.com>).
10098
10099 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
10100
10101         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
10102         between appdomains.  Fixes appdomain-unload on PPC.
10103
10104 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
10105
10106         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10107         mini-exceptions.c: handle the new wrapper types.
10108         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
10109         token value as a MonoClass* when compiling a wrapper.
10110         mono_jit_create_remoting_trampoline now takes an additional
10111         MonoRemotingTarget parameter.
10112         
10113 2004-11-10  Martin Baulig  <martin@localhost>
10114
10115         * mini.c (mono_method_to_ir): Use `generic_container->context'
10116         rather than creating a new one.
10117
10118 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10119
10120         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
10121
10122         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
10123
10124 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
10125
10126         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
10127         the experimental aot cache stuff.
10128
10129 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
10130
10131         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10132         mini-exceptions.c: update to exception clause structure changes.
10133
10134 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
10135
10136         * exceptions-x86.c (throw_exception): Fix warnings.
10137
10138         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
10139         for OP_RETHROW.
10140
10141 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
10142
10143         * exceptions-sparc.c (get_throw_exception): Really fix this.
10144
10145 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
10146
10147         * tramp-*.c: we no longer support icalls without wrappers, so
10148         a bit of code can be removed here
10149
10150 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
10151
10152         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
10153         patch.
10154
10155         * cpu-sparc.md: Add op_rethrow.
10156
10157         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
10158
10159         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
10160
10161         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
10162         * mini-ops.h: Add OP_RETHROW.
10163
10164         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
10165
10166         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
10167
10168 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
10169         
10170         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
10171         Makes the output much easier to read
10172
10173 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
10174
10175         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
10176         prevents another huge leak when compiling with ssa. Secondly, the
10177         performance of doing this rather than freeing the lists is much
10178         better. GList does a lock every time you allocate a list link,
10179         so that it can use a memory pool. So, it is better to just use
10180         a memory pool of our own.
10181         
10182         * ssa.c, linear-scan.c: replace g_list_remove_link with
10183         g_list_delete.  The remove one does not free the GList, so we were
10184         leaking memory. On -O=all --compile-all with corlib, this cut down
10185         3 MB of allocations.
10186
10187 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
10188
10189         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
10190
10191         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
10192
10193         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
10194         into a new function mono_create_jit_trampoline ().
10195
10196 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
10197
10198         * trace.c (get_spec): Allow tracing of classes without a namespace.
10199
10200 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
10201
10202         * mini.c: Fix pointer overwrite in mini_method_compile.
10203
10204 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
10205
10206         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
10207         The darwin ABI needs some special handling for 1 and 2 byte structs
10208         Lets use lbz/lhz instead of lwz everywhere.
10209         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
10210         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
10211         Use stb/sth for the former, and put the latter always on stack instead of in
10212         argument registers.
10213
10214 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
10215
10216         * trace.c (is_filenamechar): Add '_'.
10217
10218 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
10219
10220         * mini-s390.c: Fix prolog length to allow for large trace requirements.
10221
10222         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
10223
10224 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
10225
10226         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
10227         depends on libmonogc. Fixes #68805.
10228
10229 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
10230
10231         * mini.c (mono_jit_free_method): Provide extra information for
10232         this error.  Currently this leaks, but will be turned into a
10233         developer option in the future.
10234
10235 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
10236
10237         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
10238
10239 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
10240
10241         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
10242         boundary. Fixes reading of PATCH_INFO_R4 and R8.
10243         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
10244
10245 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
10246
10247         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
10248         trampolines for AOT code.
10249
10250 2004-10-22    <vargaz@freemail.hu>
10251
10252         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
10253         constructed types. Fixes #68136.
10254
10255 2004-10-21  Martin Baulig  <martin@ximian.com>
10256
10257         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
10258         if it returns true, unwind the stack to the call instruction.
10259
10260 2004-10-21    <vargaz@freemail.hu>
10261
10262         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
10263
10264         * mini.h: Bump AOT version number.
10265
10266         * objects.cs: Add another test for unbox trampolines.
10267
10268         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
10269         valuetype methods.
10270
10271 2004-10-20    <vargaz@freemail.hu>
10272
10273         * driver.c: Add SHARED to the set of optimizations tested.
10274
10275         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
10276
10277         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
10278         used by CEE_NEWARR.
10279
10280         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
10281
10282 2004-10-20  Martin Baulig  <martin@ximian.com>
10283
10284         * mini-exceptions.c (mono_handle_exception): Call
10285         mono_debugger_handle_exception() to tell the debugger about
10286         catch/finally clauses.
10287
10288 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
10289
10290         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
10291
10292         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
10293         #68447.
10294
10295 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
10296
10297         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
10298         methods as their native size, fixed bug #57543, #57545.
10299         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
10300         This saves a temporary register and mullw call down into 1 (minor perf
10301         increase for cases like sum = sum * 5;  This use to translate into:
10302             li r11,5
10303             mullw r28,r28,r11
10304         It now translates to
10305             mulli r28,r28,5
10306
10307 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
10308
10309         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
10310         #68388.
10311
10312 2004-10-11  Martin Baulig  <martin@ximian.com>
10313
10314         * mini.c (mono_method_to_ir): If we're a generic method, get the
10315         MonoGenericContainer from our MonoMethodNormal and create a
10316         MonoGenericContext from it.
10317
10318 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
10319
10320         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
10321
10322         * basic-long.cs: Add test for checked i8->i2 cast.
10323
10324 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10325
10326         * inssel-ppc.brg: added a couple of speedup rules.
10327
10328 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
10329
10330         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
10331         to speed up rebuilds.
10332
10333 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10334
10335         * mini-s390.c: Minor fix to OP_OR_IMM.
10336
10337 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
10338
10339         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
10340         better. Fixes appdomain-unload.exe on sparc.
10341
10342 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
10343
10344         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
10345         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
10346         see bug 67324.
10347
10348 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
10349
10350         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
10351
10352 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
10353
10354         * mini.c: Always generate a field read/write wrapper for members
10355         of the class MarshalByRefObject since the actual instance could
10356         be a CBO.
10357
10358 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
10359
10360         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
10361
10362 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
10363
10364         * driver.c mini.h trace.c: Move the setting of the main assembly into
10365         a separate function called mono_trace_set_assembly () and call it after
10366         actually loading the main assembly. Fixes #66872.
10367
10368 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
10369
10370         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
10371         using the code manager.
10372
10373 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
10374
10375         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
10376
10377 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
10378
10379         * cpu-amd64.md: Fix bug in previous patch.
10380         
10381         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
10382         #66650.
10383
10384 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
10385
10386         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10387         mini-exceptions.c: updates for changed stack walk interface.
10388
10389 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10390
10391         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
10392
10393 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
10394
10395         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
10396
10397 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
10398
10399         * driver.c (mini_regression_list): Do not call mono_assembly_close 
10400         since assemblies can't be unloaded.
10401         
10402 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
10403
10404         * cpu-amd64.md: Fix more instruction lengths.
10405
10406         * cpu-amd64.md: Fix lengths of some instructions.
10407
10408 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
10409
10410         * inssel.brg: Make the array ldelema check aot friendly.
10411
10412 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
10413
10414         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
10415
10416         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
10417
10418 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
10419
10420         * mini-x86.c: Fix build.
10421
10422         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
10423         mono_type_get_underlying_type () helper function to simplify code.
10424         
10425 2004-09-09  Martin Baulig  <martin@ximian.com>
10426
10427         * mini-amd64.c: Don't access `type->data.klass' directly, call
10428         mono_class_from_mono_type() instead since the type may be a
10429         generic instance.
10430
10431 2004-09-09  Martin Baulig  <martin@ximian.com>
10432
10433         * mini-amd64.c (get_call_info): Fix support for generic instances.
10434         (add_valuetype): Use mono_class_from_mono_type() to get the class
10435         since we can be a generic instance.
10436
10437 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
10438
10439         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
10440
10441 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
10442
10443         * liveness.c: reset spill costs on each scan: bug 62107
10444
10445 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
10446
10447         * exceptions-sparc.c (mono_arch_find_jit_info): remove
10448         unnecessary line that doesn't compile
10449
10450 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
10451
10452         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
10453         trampolines, make them call an error function so people can fix their
10454         code.
10455
10456 2004-09-06  Martin Baulig  <martin@ximian.com>
10457
10458         * mini.c (mono_method_to_ir): When initializing locals, handle a
10459         generic instances like a valuetype if it's a valuetype and like a
10460         class if it's a class.
10461
10462 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
10463
10464         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
10465         stack. Fixes #64674.
10466
10467         * exceptions.cs: Add test for unwinding of call arguments.
10468
10469 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
10470
10471         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
10472         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
10473         set the carry/borrow flag). The sparc and s390 implementations
10474         can now use optimized versions (and simplify the code). ppc bugfixes.
10475
10476 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
10477
10478         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
10479
10480 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
10481
10482         * inssel-amd64.brg: Remove leftover 32 bit rule.
10483
10484         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
10485
10486 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
10487
10488         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
10489         mono_arch_find_jit_info functions into a new function. Fix a memory
10490         leak.
10491
10492         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
10493         refactored code.
10494         
10495 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
10496
10497         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
10498         as well.
10499         
10500         * exceptions.cs: Add array size tests.
10501
10502         * mini.c: Allocate a separate icall wrapper for each arity of 
10503         mono_array_new_va. Fixes #59509.
10504
10505         * exceptions.cs: Add testcase for 64578.
10506
10507         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
10508
10509         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
10510         
10511 2004-09-02  Martin Baulig  <martin@ximian.com>
10512
10513         * mini.c (mono_method_to_ir): When initializing the locals, call
10514         handle_initobj() on the generic instance itself, not its
10515         underlying type.
10516
10517 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
10518
10519         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
10520         MonoJitInfo for dynamic methods.
10521
10522         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
10523
10524         * mini.c: Add support for freeing JIT data for dynamic methods.
10525         
10526 2004-09-01  Martin Baulig  <martin@ximian.com>
10527
10528         * mini-x86.c (is_regsize_var): Added support for generic
10529         instances.
10530         (mono_arch_emit_prolog): Make this compile again, use
10531         `x86_push_imm_template (code)'.
10532
10533 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
10534
10535         * mini-x86.c: make all push_imm instructions that get
10536         patched always emit the long form
10537
10538 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
10539
10540         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
10541         in a per-domain hash.
10542
10543         * mini-amd64.c (merge_argument_class_from_type): Handle generic
10544         types.
10545
10546 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
10547
10548         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
10549         work.
10550         
10551         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
10552         work.
10553
10554         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
10555         Beginnings of SSE2 support.
10556
10557         * exceptions.cs: Add more tests for checked int<->uint casts.
10558
10559 2004-08-28  Martin Baulig  <martin@ximian.com>
10560
10561         * mini-x86.c (mono_arch_instrument_epilog): Added support for
10562         generic instances.
10563
10564         * mini.c
10565         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
10566         Handle generic instances recursively.
10567
10568 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
10569
10570         * iltests.il: test for conv.u8 on a constant
10571
10572 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
10573
10574         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
10575         LCONV_x4 (shrun_32 (membase)).
10576
10577 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
10578
10579         * inssel-x86.brg: c&p rules for push/setret of long
10580
10581 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
10582
10583         * inssel-x86.brg: c&p rules for compare (base, regvar) and
10584         compare (regvar, base)
10585
10586         * inssel-x86.brg: more burg love
10587
10588         * inssel.brg: more cleanup
10589
10590         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
10591
10592 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
10593
10594         * basic-long.cs, basic-calls.cs: new tests for optimization.
10595
10596 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
10597
10598         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
10599         patch.
10600
10601 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
10602
10603         * mini-amd64.c (read_tls_offset_from_method): Add another case.
10604         
10605 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
10606
10607         * inssel.brg (mini_emit_memcpy): use 
10608         NO_UNALIGNED_ACCESS to disable memcpy optimization
10609
10610 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
10611
10612         * mini-amd64.c: Handle generic types in various places.
10613
10614         * mini.c (mono_method_to_ir): Handle generic types in init locals.
10615
10616 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
10617
10618         * mini.c (handle_box): Fix warning.
10619
10620         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
10621
10622         * mini-amd64.h: Enable the emit_state optimization.
10623
10624         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
10625
10626         * mini-amd64.c: Add some new 64 bit peephole opts.
10627
10628         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
10629
10630         * cpu-amd64.md: sreg1 of div instructions must be %rax.
10631
10632         * mini-amd64.c: Register allocator fixes.
10633
10634         * mini.c: Add an optimization to emit_state to avoid allocation of new
10635         registers on some platforms.
10636
10637 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
10638
10639         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
10640
10641         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
10642         allocation. Fixes #63085.
10643
10644         * basic-long.cs: Add new regression test.
10645
10646         * mini-amd64.c: Register allocator improvements.
10647
10648 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
10649
10650         * mini-amd64.c (read_tls_offset_from_method): Add another code
10651         sequence.
10652
10653         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
10654         instruction sequence for nullifying class init trampolines.
10655
10656         * objects.cs: Add new regalloc test.
10657
10658         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
10659
10660 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
10661
10662         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
10663         
10664         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
10665         arguments.
10666
10667         * driver.c: Fix profiling after TLS changes.
10668         
10669         * driver.c (mono_main): Set mono_stats.enabled if needed.
10670
10671         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
10672         CEE_BOX.
10673
10674 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
10675
10676         * mini-x86.c: use a 1 op rather than a 2 op tls access
10677         instruction -> faster.
10678
10679 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
10680
10681         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
10682         x86 backend.
10683
10684 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
10685
10686         * exceptions-sparc.c (throw_exception): fix typo
10687
10688 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
10689
10690         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
10691         set tree->dreg correctly with tls. Allow any
10692         register to be used.
10693
10694         * mini-x86.c (read_tls_offset_from_method): add new code
10695         generation pattern seen with GCC.
10696
10697
10698 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
10699
10700         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
10701         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10702         exceptions-sparc.c: fix some performance issues in exception
10703         handling and setting of the stack trace for exceptions that were
10704         already thrown.
10705
10706 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
10707
10708         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
10709         x86 backend.
10710         
10711         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
10712         registers.
10713
10714 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
10715
10716         This patch inlines tls access, when possible.
10717         
10718         * mini.h: new arch functions for TLS intrinsics.
10719         All platforms updated with a stub.
10720
10721         * mini.c: use the new intrinsics
10722
10723         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
10724         arch specific intrinsic for tls variables
10725
10726 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
10727
10728         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
10729         under windows.
10730
10731 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
10732
10733         * mini.c: thread local allocation
10734
10735 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
10736
10737         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
10738
10739         * Makefile.am: Link against the static version of libmonogc.
10740         
10741         * Makefile.am: Link the static versions of the convenience libraries
10742         into the mono executable.
10743
10744         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
10745
10746 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
10747
10748         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
10749         on integer overflow.
10750
10751         * mini-amd64.c: Reorganize function call code.
10752
10753         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
10754
10755 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10756
10757         * inssel-x86.brg: use xor eax,eax.
10758         
10759         * basic.cs: new tests
10760
10761 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10762
10763         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
10764         in exception throwing code.
10765         
10766 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10767
10768         * inssel-x86.brg: use xor esi,esi.
10769
10770 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10771
10772         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
10773         can trace methods compiled during mini_init () too.
10774
10775         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
10776         CEE_CONV_U4.
10777
10778 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
10779
10780         * Makefile.am: static link on x86 (r=zoltan)
10781
10782 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
10783
10784         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
10785         code since it causes some programs to fail.
10786
10787 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
10788
10789         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
10790
10791 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10792
10793         * mini.c: ovfops_op_map - add STACK_OBJ case for
10794         CONV_I 
10795         * basic.cs: add test_0_pin_string as test
10796         case for above.
10797
10798 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
10799
10800         * Makefile.am: build C# if srcdir != builddir
10801
10802 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
10803
10804         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
10805         fall-through blocks.
10806
10807 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
10808
10809         * driver.c: enable loop by default again and include abcrem in -O=all.
10810
10811 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
10812
10813         * iltests.il: Add some localloc tests.
10814
10815         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
10816
10817         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
10818         Fixes #62574.
10819
10820         * inssel-amd64.brg: Add some optimizations.
10821
10822         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
10823         for gcc-3.4.
10824
10825         * Makefile.am: Statically link mono against libmono on AMD64.
10826         
10827         * mini-amd64.c inssel-amd64.brg: Optimizations.
10828
10829 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
10830
10831         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
10832
10833         * tramp-amd64.c: Patch calling code in trampolines.
10834
10835 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
10836
10837         * mini-amd64.c: pinvoke struct passing fixes.
10838
10839 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
10840
10841         * mini-sparc.c: redo change, make mono_arch_cpu_init call
10842         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
10843
10844 2004-08-05  Duncan Mak  <duncan@ximian.com>
10845
10846         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
10847         CEE_LDELEM_ANY.
10848
10849 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10850
10851         * mini-amd64.c (emit_move_return_value): Move return value for normal
10852         calls too.
10853
10854 2004-08-05  Martin Baulig  <martin@ximian.com>
10855
10856         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
10857         `type->type'; just modify `type' itself when dealing with enums
10858         and generic instances.
10859         (check_call_signature): Make `simple_type' a `MonoType *'.
10860
10861 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10862
10863         * mini.c: Use OP_PADD to add offsets to addresses.
10864
10865         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
10866
10867 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
10868
10869         * mini-sparc.c (mono_arch_emit_epilog): fix check
10870         for folding last op into restore instruction
10871
10872 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
10873
10874         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
10875         helper methods using the code manager.
10876         
10877         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
10878
10879         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
10880
10881 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10882         
10883         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
10884           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
10885
10886         * mini-s390.c: fix tail processing
10887
10888 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
10889
10890         * mini-ppc.c: mul.ovf.un exception name fix.
10891
10892 2004-08-03  Martin Baulig  <martin@ximian.com>
10893
10894         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
10895         instances; before jumping to `handle_enum', also modify `ptype'.
10896
10897 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
10898
10899         * cpu-sparc.md: fcall maximal length too small.
10900
10901 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
10902
10903         * mini-amd64.c mini.h: Add initial support for passing/returning 
10904         structures to/from pinvoked methods.
10905
10906 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
10907
10908         * mini-ppc.c: reg allocator fix.
10909
10910 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
10911
10912         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
10913
10914         * inssel.brg: Optimize memset on 64 bit machines.
10915
10916         * mini-amd64.c: Fix some vararg cases.
10917
10918 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10919
10920         * mini-s390.c: Corrected macro in emit_float_to_int
10921
10922         * s390-abi.cs: Tests to exercise the s390 ABI
10923
10924 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10925
10926         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
10927         caller saved regs.
10928
10929         * basic.cs: Add a test for add.ovf.un.
10930
10931 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
10932
10933         * mini-sparc.c: add case for OP_IDIV_UN
10934
10935 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10936
10937         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
10938         
10939         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
10940
10941 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
10942
10943         * basic.cs: regression tests.
10944
10945         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
10946         regressions.
10947
10948 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
10949
10950         * basic.cs: Add a new test.
10951
10952         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
10953         and AOT. Various fixes and optimizations.
10954
10955         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
10956
10957 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
10958
10959         * mini-ppc.c: make sure temp regs are not used for global reg
10960         allocation.
10961
10962 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
10963
10964         * cpu-sparc.md: conv_i8 fix for 64bits
10965
10966         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
10967
10968 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
10969         
10970         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
10971         add opcode for cmp BYTE PTR [eax], imm.
10972
10973         * inssel.brg: Make memcpy and memset takes bases.
10974
10975 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10976
10977         * *-amd64.*: More AMD64 work.
10978         
10979 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
10980
10981         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
10982         add a compare-not-equal opcode.
10983         
10984 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
10985
10986         * mini.c: Use mono_init_from_assembly instead of mono_init.
10987         
10988 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
10989
10990         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
10991
10992         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
10993
10994         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
10995
10996         * inssel.brg: 64 bit fixes.
10997
10998         * mini.h (MonoCallInst): Add some AMD64 specific data.
10999
11000         * mini.h: Add some OP_P opcodes.
11001
11002 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
11003
11004         * basic.cs: tests for 61797 and 61740
11005
11006 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
11007
11008         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
11009         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
11010
11011 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
11012
11013         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
11014
11015         * *-amd64*.*: Ongoing AMD64 work.
11016
11017 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
11018
11019         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
11020
11021         * *-amd64*: Ongoing AMD64 work.
11022
11023         * mini-arch.h: Add AMD64 support.
11024
11025         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
11026
11027         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
11028
11029         * mini-ops.h: Add new opcodes.
11030
11031         * Makefile.am: Add AMD64 support.
11032
11033         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
11034         rules into the inssel-long*.brg files.
11035
11036         * *-amd64.*: Add beginnings of AMD64 backend.
11037
11038 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
11039
11040         * mini.c (print_dfn): commenting out the code that prints
11041         the cil. With -O=deadce, this makes -v -v crash.
11042         
11043         * cpu-pentium.md: make checkthis have a length of 2
11044
11045 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
11046
11047         * mini-sparc.h: fix implementations of __builtin
11048         functions for Sun compiler for V9.
11049
11050 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
11051
11052         * mini.c: use the new stelem.ref wrapper
11053         * exceptions.cs, arrays.cs: new stelem.ref tests
11054
11055 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11056
11057         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
11058         new XSP should work with these changes).
11059
11060 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
11061         
11062         * inssel-{long32,x86,}.brg: trivial optimizations.
11063         
11064 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
11065
11066         * mini.c: load value when emitting box operation in
11067         constrained calls.
11068
11069 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
11070
11071         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
11072         is one byte shorter than cmp DWORD PTR [eax], 0.
11073
11074 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
11075
11076         * inssel-ppc.brg: arguments on the stack are always
11077         relative to the stack pointer (spotted by Neale Ferguson).
11078
11079 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11080
11081         * exceptions-x86.c: delay appending the method name to the trace until
11082         after mono_jit_info_table_find is called, as this gets the real
11083         MonoMethod.
11084
11085 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
11086
11087         * aot.c: register roots
11088
11089 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
11090
11091         * aot.c : I could just use PLATFORM_WIN32 flag.
11092
11093 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
11094
11095         * aot.c : Reverting the previous fix. This time it broke linux build.
11096
11097 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
11098
11099         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
11100
11101 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
11102
11103         * mini.c (handle_stack_args): Remove some more debugging code.
11104         
11105         * mini.c (handle_stack_args): Remove debug output left in by mistake.
11106
11107         * driver.c mini.h aot.c: Allow additional options to be specified with
11108         --aot and pass them to mono_compile_assembly.
11109
11110         * aot.c: Add experimental code to AOT compile all loaded assemblies
11111         on demand and save the code into a cache in the filesystem.
11112
11113         * aot.c: Add support for more wrapper methods.
11114         
11115         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
11116         58863.
11117
11118         * cpu-*.md: Remove removed opcodes.
11119
11120         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
11121         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
11122         related icalls to marshal.c.
11123
11124 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
11125
11126         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
11127
11128         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
11129
11130         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
11131
11132 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
11133         * liveness.c: If liveness is recomputated we need to reset the information
11134         for each variable. This way, if the liveness range has been narrowed
11135         by optimizations that happened after the last computation, we can return
11136         a smaller range.
11137         
11138         For example, if you have
11139         
11140         {
11141                 int i = 0;
11142                 
11143                 // Tons of code that does not affect i
11144                 
11145                 i = foo ();
11146                 ...
11147         }
11148         
11149         i = 0 is dead code and will be removed by SSA. However, when
11150         linear scan gets to the code, i will still appear to be live
11151         throughout the entire block. This prevents good register allocation.
11152
11153 2004-07-06  Martin Baulig  <martin@ximian.com>
11154
11155         * debug-mini.c (mono_debug_init_method): Allow
11156         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
11157         (mono_debug_add_icall_wrapper): New method.
11158
11159         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
11160
11161 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
11162
11163         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
11164         optimization.
11165
11166 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
11167
11168         * aot.c (mono_aot_load_method): Fix loading of debug info.
11169
11170 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
11171
11172         * aot.c: Add logging support.
11173
11174 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
11175
11176         * mini.h: Add prototype for mono_print_method_from_ip.
11177
11178         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
11179
11180         * inssel.brg: 64 bit fixes.
11181
11182         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
11183         inssel-long32.brg.
11184
11185         * Makefile.am: Add SPARC64 support.
11186
11187 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
11188
11189         * aot.c: Fix alignment problems on 32 bit platforms.
11190
11191 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
11192
11193         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
11194         SPARC64.
11195
11196         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
11197         problems.
11198
11199         * mini.h: Bump AOT file version. Some 64 bit fixes.
11200
11201 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
11202
11203         * inssel-sparc.brg: Add new rule to avoid register moves.
11204
11205         * inssel.brg: Add ldind_to_load_membase helper function.
11206
11207 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
11208
11209         * mini.c: OffsetToStringData intrinsic.
11210         
11211 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
11212
11213         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
11214
11215         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
11216         regression tests.
11217
11218         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
11219 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11220
11221         * mini.c: reinstated mono_compile_get_interface_var()
11222         on x86, too, since the change breaks the Gtk# build there as well.
11223
11224 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11225
11226         * driver.c: remove loop from the default optimizations: it seems to
11227         interact badly with some of the other options (see bug #60613).
11228
11229 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
11230
11231         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
11232         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
11233
11234 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
11235
11236         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
11237         vararg-using methods.
11238
11239 2004-06-21  Martin Baulig  <martin@ximian.com>
11240
11241         * mini/mini-exceptions.c
11242         (mono_handle_exception): Added `gpointer original_ip' argument.
11243         After calling mono_unhandled_exception(), call
11244         mono_debugger_unhandled_exception() and if that returns true,
11245         restore the context and return.
11246
11247 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
11248
11249         * mini-ppc.c: prefer the use of relative branches so
11250         they won't need to be patched in aot code (patch from Patrick Beard).
11251
11252 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
11253
11254         * aot.c: patch from Patrick Beard to make the output assembly
11255         more correct for the MacOSX assembler. Small tweak to
11256         generate sane images on Linux/PPC, too.
11257
11258 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11259
11260         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
11261         case until bug #59509 is fixed (shows up in #60332).
11262
11263 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11264
11265         * mini.c: make sure the needed wrappers are compiled, too, with
11266         precomp.
11267
11268 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
11269
11270         * driver.c: remove NPTL reference in --version output.
11271
11272 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11273
11274         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
11275         generate valid assembly for the Mach-O assembler.
11276
11277 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
11278
11279         * driver.c: don't include abcrem in the all optimization specifier
11280         since it slows down jit compilation too much for now.
11281
11282 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
11283
11284         * mini.c: use BIGMUL only if both operands have the same signage.
11285         * iltests.il: Test for bug 60056. (errors related to signage in
11286         BIGMUL).
11287
11288         r=lupus.
11289
11290 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
11291
11292         * mini.c, aot.c: memory leak fixes.
11293
11294 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11295
11296         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
11297
11298 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
11299
11300         * Makefile.am: remove the -static hack completely, it links in
11301         statically glib as well.
11302
11303 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
11304
11305         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
11306         * exceptions.cs: make it compile with new mcs/csc.
11307
11308 2004-06-03 Massimiliano Mantione <massi@ximian.com>
11309         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
11310         and added relevant test case.
11311
11312 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
11313
11314         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
11315         regressions in gtk-sharp.
11316
11317 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
11318
11319         * exceptions.cs: New regression tests.
11320
11321         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
11322
11323 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
11324
11325         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
11326
11327 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
11328
11329         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
11330
11331         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
11332
11333 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
11334
11335         * mini.c (mono_jit_runtime_invoke): Init class in this
11336         method instead of trusting mono_jit_compile_method to
11337         do the work (because wrappers can be in object class)
11338
11339 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
11340
11341         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
11342
11343         * basic-long.cs: New regression test.
11344
11345 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
11346
11347         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
11348         and div/rem checks.
11349
11350 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
11351
11352         * Makefile.am: fix miguel's change to build mono statically against
11353         libmono (track build dependencies).
11354
11355 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
11356
11357         * cfold.c: Some glib versions do not have G_MININT32.
11358
11359 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
11360
11361         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
11362         with precision of tan, atan, sin and cos, and implemented related
11363         regressions tests (fixes bug 54467, but one new problem appeared and
11364         is not fixed yet).
11365
11366 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
11367
11368         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
11369
11370         * exceptions.cs: Add test for constant folding && division by zero.
11371
11372         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
11373         since driver.c is in libmono too, so the optimization was useless.
11374
11375         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
11376         variable to driver.c so the compiler can emit more efficient code to
11377         access them.
11378
11379 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11380
11381         * Makefile.am: don't distribute generated inssel.[ch] files.
11382
11383 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
11384
11385         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
11386         into the default appdomain. Fixes #58707.
11387
11388         * jit-icalls.c: Remove the broken approximation for truncl, doing
11389         no conversion is better.
11390
11391         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
11392         Fixes #58863.
11393
11394 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
11395
11396         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
11397         of the mcrxr instruction which is not available on some processors
11398         even if it's documented to be. Implement add and sub overflow correctly
11399         (still not complete for long unsigned). Speed up icalls a bit.
11400
11401 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
11402
11403         * mini.c (mono_jit_compile_method_with_opt): Make sure that
11404         we run .cctor in the current domain instead of target_domain.
11405         
11406         Fixes bug #58558, .cctor not being called in -O=shared.
11407
11408 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
11409
11410         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
11411
11412 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
11413
11414         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
11415         which can be done with an imm8, do it that way.
11416         (mono_arch_output_basic_block): ditto for a jmp
11417         (mono_arch_emit_prolog): Computate maximum offset of a label.
11418
11419 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
11420
11421         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
11422         now tries to allocate prefered physical reg's for virtual
11423         regs. This reduces the number of emited spills/loads with
11424         20-30% on our core assemblies.
11425
11426 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11427
11428         * jit-icalls.c: truncl() is not needed and trunc() is
11429         the correct thing to do anyway (bug #58287).
11430
11431 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
11432
11433         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
11434         if available.
11435
11436 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
11437
11438         * driver.c: enable loop optimizations by default.
11439
11440 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
11441
11442         * mini-x86.c: fix calc of max loop size when aligning loops start.
11443
11444 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
11445
11446         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
11447         the stack.
11448
11449 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
11450
11451         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
11452         should set carry.
11453
11454         * basic-long.cs: Add tests for add/subtract of immediates with carry.
11455
11456         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
11457         
11458         * mini.c (inline_method): Allways inline some wrappers even if the cost
11459         is too large. Fixes #58785.
11460
11461         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
11462         
11463 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
11464
11465         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
11466         (crichton@gimp.org). Beginning of support for sparc/linux.
11467
11468         * mini-sparc.c: Optimize retrieval of LMF address.
11469
11470 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
11471
11472         * exceptions-ppc.c:  handle alloca in methods with clauses.
11473
11474 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
11475
11476         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
11477
11478 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
11479
11480         * mini.c: Delegate most of the abort signal work to 
11481           mono_thread_request_interruption, which also handles Stop and Suspend
11482           states.
11483
11484 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
11485
11486         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
11487         supports the save/restore lmf opcodes.
11488
11489 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
11490
11491         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
11492         by gcc-3.4 as well.
11493
11494         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
11495
11496 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
11497
11498         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
11499         methods which contain array accesses.
11500
11501         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
11502         boundaries. Fixes #58537.
11503
11504         * iltests.il: Add regression test for #58537.
11505
11506 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
11507
11508         * mini-x86.c (mono_arch_local_regalloc): Last part of
11509         fix for bug #58633 (releasing register to early).
11510
11511 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
11512
11513         * basic-long.cs: Add new regression test.
11514
11515 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
11516
11517         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
11518         register too early on the chain.
11519
11520 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
11521
11522         * mini.c (create_helper_signature): Use a helper function to reduce
11523         the code which needs to be written. Also set the calling convention of
11524         icalls on windows. Fixes #57840.
11525
11526 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
11527
11528         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
11529         exceptions-ppc.c: added helper function to get the instruction address
11530         from a signal handler context.
11531
11532 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11533
11534         * helpers.c: use g_get_tmp_dir. Invokes happyness 
11535         from gonzalo.
11536
11537 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11538
11539         * helpers.c: Add new env variable to pass args to objdump.
11540         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
11541
11542 2004-05-17  Radek Doulik  <rodo@ximian.com>
11543
11544         * Makefile.am (common_sources): added abcremoval.h so it get
11545         disted and daily mono packages on go-mono.com will build again
11546
11547 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
11548
11549         * abcremoval.c: Fixed coding style, added copyright header.
11550
11551         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
11552
11553         * mini.h: Added prototype for abc removal main function.
11554
11555         * build_relations_propagation_table.pl: Added copyright header.
11556
11557 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
11558
11559         * basic-long.cs: reg test for complex ceq_long bug.
11560
11561 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
11562
11563         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
11564         reg in long and clob case (bug #58343). Fixed/added comments.
11565
11566 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
11567
11568         * mini.c (mono_jit_runtime_invoke): Follow new convention
11569         of calling the invoke method with an function pointer.
11570
11571 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
11572
11573         * ChangeLog: Fix author of memory leak patch.
11574
11575 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
11576
11577         * Makefile.am: fix make dist as well...
11578
11579
11580 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
11581
11582         * cfold.c: Made so that conversions from pointer to int4 are no-ops
11583         on archs where pointers are 4 bytes long.
11584
11585         * Makefile.am: Added abcremoval.c source file.
11586
11587         * abcremoval.c: Added abcremoval.c.
11588
11589         * abcremoval.h: Added abcremoval.h.
11590
11591         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
11592
11593         * inssel.brg: Enabled bounds check removal.
11594
11595         * mini.c: Added support for abcrem optimization.
11596
11597         * mini.h: Added abcrem optimization label.
11598
11599         * driver.c: Added support for abcrem optimization.
11600
11601         * propagated_relations_table.def: Added propagated_relations_table.def.
11602
11603 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
11604
11605         * mini.c, cfold.c: fix style.
11606
11607 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11608
11609         * mini.c: handle issue with the low-level implementation of
11610         some long opcodes (bug #54209).
11611
11612 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
11613
11614         * basic.cs: test for my new cmov stuff.
11615
11616 2004-05-13      Patrik Torstensson
11617
11618         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
11619         opt and added peephole documentation.
11620
11621 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
11622
11623         * tramp-ppc.c: rewrote the generic trampoline code.
11624
11625 2004-05-11      Patrik Torstensson
11626
11627         * mini-x86.c: optimize long shl/shr asm code (one less branch)
11628
11629 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
11630
11631         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
11632
11633         * mini.h mini.c dominators.c: Applied patch from Derek Woo
11634         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
11635
11636         * mini.c: Add new icalls for AsAny marshalling.
11637
11638 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
11639
11640         * tramp-ppc.c, mini-ppc.c: more cleanups.
11641
11642 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11643
11644         * mini.c: no warnings.
11645
11646 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11647
11648         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
11649
11650 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
11651
11652         * mini.c: In the thread abort signal handler, if the thread is in the
11653         process of being stoped, don't throw the Abort exception, just stop the
11654         thread.
11655
11656 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
11657
11658         * tramp-ppc.c: removed old code.
11659
11660 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11661
11662         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
11663         do some simple speed optimizations on ppc.
11664
11665 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
11666
11667         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
11668         and large offsets in load/store.
11669
11670 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
11671
11672         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
11673         it causes regressions.
11674
11675 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
11676
11677         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
11678         support.
11679
11680 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
11681
11682         * jit-icalls.c: remove warnings.
11683         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
11684         speedups for unsafe code.
11685
11686 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
11687
11688         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
11689
11690 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
11691
11692         * basic-calls.cs: Add new regression test.
11693
11694         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
11695         more portable.
11696
11697         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
11698
11699         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
11700         is no longer used.
11701
11702 2004-05-06      Patrik Torstensson
11703
11704         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
11705         long reg allocation in any reg (not only eax:edx) and implemented 
11706         long shl/shr ops in asm instead of helpers.
11707
11708 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
11709
11710         * mini-sparc.h: Fix warnings.
11711
11712         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
11713         stack.
11714
11715         * mini-exceptions.c (mono_handle_exception): Call the filter in a
11716         separate statement for clarity.
11717
11718         * mini-sparc.c: Update status.
11719
11720 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
11721
11722         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
11723         here.
11724
11725 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11726
11727         * inssel-ppc.brg: another small pre-release workaround:
11728         we don't do overflow detection for long_sub_un.
11729
11730 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11731
11732         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
11733         (also works around a weird ppc bug: 57957).
11734
11735 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
11736
11737         * tramp-ppc.c: trampoline fixes.
11738
11739 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
11740
11741         * mini-ppc.c: fixed typos.
11742
11743 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11744
11745         * mini-ppc.c, exceptions-ppc.c: more code saves registers
11746         at the top of the stack. Fixed typos. Use a frame registers
11747         for all the methods with exception clauses.
11748
11749 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11750
11751         * exceptions-ppc.c: restore fp registers.
11752
11753 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
11754
11755         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
11756         order from the stack top (moved the stack room to save the
11757         return value for trace after the param area). Fixed corruption
11758         in restoring registers on unwind.
11759
11760 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11761
11762         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
11763
11764 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11765
11766         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
11767         and prolog/epilog for methods that use it. Allow
11768         enough param area room for varargs methods. Fix miguel's
11769         breakage in exception handling.
11770
11771 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11772
11773         * Makefile.am: run genmdesc only on current arch.
11774
11775 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11776
11777         * exceptions-x86.c:
11778         * mini-x86.h: fix the build on windows.
11779
11780 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
11781
11782         * 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.
11783
11784         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
11785
11786         * mini-exceptions.c: New file.
11787         
11788         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
11789         Move some parts of the x86 exception handling code to an 
11790         arch-independent file so it can be shared with other ports.
11791
11792 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
11793
11794         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
11795
11796 2004-04-26  David Waite  <mass@akuma.org>
11797
11798         * driver.c: remove comma from end of enumeration declaration
11799
11800 2004-04-26  Jackson Harper  <jackson@ximian.com>
11801
11802         * driver.c: parse config file before loading first assembly. This
11803         allows the user gac to be enabled/disabled. 
11804         
11805 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
11806
11807         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
11808         simpler mechanism: we do not care what is encoded initially
11809         (branch absolute or relative), we care about the code and its
11810         target.  I kept the old code for reference for now.
11811
11812         The new code tries first to determine if the jump is anywhere in
11813         the -/+32 absolute meg range, if it succeeds, it encodes using the
11814         absolute branch;  If not, it tried to find something in the
11815         relative range, if not, it uses the handle_thunk code. 
11816
11817 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
11818
11819         * exceptions-ppc.c: use the correct ip register on macosx.
11820
11821 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
11822
11823         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
11824
11825 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
11826
11827         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
11828         Raise exception on integer divide by zero by hand since the hw
11829         doesn't support it. Handle NaNs in FP compares.
11830
11831 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
11832
11833         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
11834         code reducing duplication between the platforms and enabled
11835         signal exception handling (on linux for now).
11836
11837 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
11838
11839         * exceptions-ppc.c: more macosx support.
11840
11841 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11842
11843         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
11844
11845 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
11846
11847         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
11848
11849 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
11850
11851         * iltests.il: more tests.
11852
11853 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11854
11855         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
11856         vars as well.
11857
11858 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11859
11860         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
11861
11862 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
11863
11864         * liveness.c: Mark variables as volatile in all basic blocks reachable
11865         from exception clauses.
11866
11867 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
11868
11869         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
11870         inlining.
11871
11872 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11873
11874         * iltests.il, basic.cs: more tests for regalloc.
11875
11876 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11877
11878         * iltests.il: Some tests for register allocation modifications
11879         I have locally.
11880
11881 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
11882
11883         * exceptions.cs: Add regression test for bug #56782.
11884
11885         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
11886         original stack trace if an exception is rethrown. Fixes #56782. Oh,
11887         the beauty of fixing the same thing in 5 different files...
11888
11889 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
11890
11891         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
11892         methods.
11893
11894 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
11895
11896         * mini.c: Add support for STRWLPARRAY marshalling convention.
11897
11898 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11899
11900         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
11901         to init the context to setup the regs pointer).
11902
11903 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11904
11905         * exceptions-ppc.c: more exceptions work.
11906
11907 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11908
11909         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
11910         not allowed.
11911
11912 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11913
11914         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
11915         can use the memory directly.
11916
11917         * cpu-pentium.md: Update documentation from a post from Zoltan. 
11918
11919         add x86_add_membase, x86_sub_membase, x86_mul_membase
11920
11921 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
11922
11923         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
11924         GENERAL_REGS they were also hardcoded for all PPC ports.
11925
11926         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
11927
11928         Remove hard-coded limit for floating point registers, use
11929         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
11930
11931         Notice that in MacOS X calling conventions you can fit a lot more
11932         floating point values in registers, so I should update the PInvoke
11933         test to excercise the passing of floating point values on the
11934         stack (currently broken).
11935         
11936 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
11937
11938         * tramp-ppc.c (create_trampoline_code): Added
11939         JUMP_TRAMPOLINE_SIZE. 
11940         (ppc_magic_trampoline): Follow the pattern from
11941         x86_magic_trampoline: if code is set to zero, return. 
11942         (create_trampoline_code): Always pass MonoMethod to the jump
11943         trampoline, before it was passing a null.
11944         (mono_arch_create_jump_trampoline): Implement the jump stub, could
11945         share the code with mono_arch_create_jit_trampoline. 
11946
11947         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
11948         implemented.
11949         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
11950         implemented.  
11951
11952         * cpu-g4.md: Added length for jmp instruction, the worst case
11953         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
11954         for save_lmf).
11955
11956 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
11957
11958         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
11959
11960 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
11961
11962         * mini.c: Only set bblock->real_offset when adding a new bblock, and
11963         before each IL instruction.
11964
11965         * mini.c (CEE_BOX): Fix warnings.
11966
11967 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
11968
11969         * mini.c: removed a few unused vars and extra whitespace.
11970
11971 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
11972
11973         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
11974         checks.
11975         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
11976         index.
11977         (OP_GETCHR): use the above
11978         (CEE_LDELEMA): use the above.
11979
11980         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
11981         version of the generic impl.
11982         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
11983         (CEE_LDELEMA): use the above.
11984
11985 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11986
11987         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
11988         Fixes #56317.
11989
11990         * iltests.il: Added new regression test for #56317.
11991
11992 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
11993
11994         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
11995         under NetBSD. Fixes #56450.
11996
11997         * liveness.c (update_gen_kill_set): Fix previous patch.
11998
11999 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12000
12001         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
12002
12003 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
12004
12005         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
12006         ldsfld and ldsflda.
12007
12008         * inssel-sparc.brg: Add more optimizations.
12009
12010         * mini-sparc.c: Replace multiply/divide with shifts if possible.
12011
12012 2004-04-01  Martin Baulig  <martin@ximian.com>
12013
12014         * mini.c (handle_box): New static function; moved the
12015         implementation of CEE_BOX here.
12016         (mono_method_to_ir): Added `constrained_call' variable.
12017         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
12018         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
12019         mono_method_get_constrained() to get the method.
12020
12021 2004-04-01  Martin Baulig  <martin@ximian.com>
12022
12023         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
12024         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
12025         (mono_method_to_ir): We don't need these macros anymore since
12026         mono_class_get_full() already takes care of it. 
12027
12028 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12029
12030         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
12031         use @function (as doesn't accept #function here) and check the return
12032         value of system and stop if fails.
12033
12034 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12035
12036         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
12037
12038 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
12039
12040         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
12041
12042         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
12043
12044         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
12045         #56223.
12046
12047         * basic-long.cs: Add test for negation of Int64.MinValue.
12048
12049 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
12050
12051         * mini-sparc.c: Update status.
12052
12053         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
12054
12055         * exceptions-sparc.c: Fix return value in filters.
12056
12057         * inssel-sparc.brg: Fix register allocation in some rules.
12058
12059 2004-03-28  Martin Baulig  <martin@ximian.com>
12060
12061         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
12062         if neccessary.  
12063
12064 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
12065
12066         * mini-x86.c (mono_arch_patch_code): Fix warnings.
12067         
12068         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
12069         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
12070         remove unused conv_u4 opcode.
12071
12072         * mini-x86.c: Remove valgrind workaround since it slows down things
12073         even when mono is not run under valgrind.
12074
12075 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
12076
12077         * mini-sparc.c: Update status.
12078
12079         * inssel-sparc.brg: Add some optimizations.
12080
12081         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
12082         future delay slot filling. Add support for varargs, tail calls and JMP.
12083
12084         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
12085         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
12086
12087         * inssel.brg: Fix register allocation in OP_ARGLIST.
12088
12089         * inssel.brg: Fix warnings.
12090
12091 2004-03-25  Martin Baulig  <martin@ximian.com>
12092
12093         * mini.c (inflate_generic_field): Removed.
12094         (mini_get_method): Removed, use mono_get_method_full(),
12095         (mini_get_class): Removed, use mono_class_get_full().
12096         (mono_method_to_ir): Pass our generic context to
12097         mono_field_from_token().        
12098
12099 2004-03-25  Martin Baulig  <martin@ximian.com>
12100
12101         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
12102         of a `MonoMethod *'.
12103         (mini_get_method): Take a `MonoGenericContext *' instead
12104         of a `MonoMethod *'.
12105         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
12106         a new local variable called `generic_context' which holds the
12107         current `MonoGenericContext *'; use it to lookup things.
12108
12109 2004-03-24  Martin Baulig  <martin@ximian.com>
12110
12111         * mini.c (mini_get_class): New static method; if we're inside a
12112         generic instance, inflate the class if neccessary.
12113         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
12114
12115 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
12116
12117         * iltests.il: New regression test for #55976.
12118
12119         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
12120         #55976.
12121
12122 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
12123
12124         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
12125         output.
12126
12127 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
12128
12129         * liveness.c: Consider SSA stores as well as loads when making vars
12130         volatile.
12131
12132         * exceptions.cs: New regression tests for register allocation.
12133         
12134 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
12135
12136         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
12137         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
12138           domain lock only to protect puntual access to data structures.
12139           Added access lock for sighash, jit_icall_hash_name, 
12140           jit_icall_hash_addr and domain->code_mp.
12141
12142 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
12143
12144         * driver.c: Print SIGSEGV handling method.
12145
12146         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
12147
12148         * mini.c (setup_jit_tls_data): Handle case when this is called
12149         multiple times for a thread.
12150
12151         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
12152         is different from fbxx_un. Fixes #54303. Also use constants instead of
12153         magic numbers in a lot of places.
12154
12155 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
12156
12157         * exceptions.cs: Fix cctor test when --regression is used.
12158
12159 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
12160
12161         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
12162         for Linux/ppc.
12163
12164 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
12165
12166         * inssel-ppc.brg: fixed register assignments for some rules.
12167
12168 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
12169
12170         * exceptions.cs: Add test for exceptions in static constructors.
12171
12172         * mini.c (mono_jit_compile_method_with_out): Move the calling of
12173         static constructors outside the domain lock. Fixes #55720.
12174
12175 2004-03-17  Martin Baulig  <martin@ximian.com>
12176
12177         * mini.c (get_generic_field_inst): Removed, this'll never happen.
12178         (inflate_generic_field): Take the `MonoMethod *' instead of the
12179         `MonoClass *' and added support for generic method.
12180         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
12181         have a `field->parent->gen_params', only inflate the field if it's
12182         an open constructed type.
12183
12184 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
12185
12186         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
12187         exception object instead of the preconstructed ones.
12188
12189 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12190
12191         * mini.c: reverted changed to sigsegv_signal_handler commited
12192         accidentally in the previous patch.
12193
12194 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12195
12196         * mini.c:
12197         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
12198         running --aot with an old assembly.
12199
12200 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
12201
12202         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
12203         point values.
12204
12205         * mini-sparc.c: Add support for v9 branches with prediction.
12206
12207 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
12208
12209         * mini.c (mini_init): #warning is GNUC only
12210
12211         * mini-sparc.h: implement __builtin_frame_address
12212         and __builtin_return_address for Sun C compiler
12213
12214 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
12215
12216         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
12217
12218 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
12219
12220         * basic-calls.cs: Add test for unaligned byref long argument passing.
12221
12222         * mini-ops.h: Add sparcv9 compare and branch instructions.
12223
12224         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
12225         v9 instructions if we have a v9 cpu.
12226
12227         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
12228         registers for global allocation.
12229
12230         * exceptions-sparc.c: Fixes.
12231         
12232 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
12233
12234         * liveness.c (mono_analyze_liveness): Optimized version.
12235
12236         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
12237
12238         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
12239         sparc work.
12240
12241         * basic-float.cs basic-calls.cs: New regression tests.
12242
12243 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
12244
12245         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
12246         sigaltstack implementation.
12247
12248         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
12249         
12250         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
12251         stuff if SIGSEGV_ON_ALTSTACK is not defined.
12252
12253 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
12254
12255         * mini.c: Fix warnings.
12256         
12257         * mini.c (mono_resolve_patch_target): New function which contains the
12258         arch independent part of the patching process.
12259
12260         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
12261         patching code to a separate function.
12262
12263 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
12264
12265         * mini.c (add_signal_handler): ifdef out on Windows
12266
12267 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
12268
12269         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
12270         cpu-sparc.md: Add exception handling support + other fixes.
12271
12272         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
12273         typed GC detection in --version.
12274
12275         * basic.cs exceptions.cs: New regression tests.
12276
12277         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
12278         the arch specific code can store data during a compilation.
12279
12280         * mini-ops.h: Add OP_SETFRET.
12281
12282         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
12283         function, register a separate icall for each arity, so the icalls can
12284         get a wrapper.
12285         
12286         * mini.c (mono_print_tree): Print negative offsets in a more readable
12287         form.
12288         
12289         * mini.c: Make signal handling work on sparc.
12290         
12291         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
12292
12293         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
12294
12295         * jit-icalls.c: Emulate truncl by aintl on solaris.
12296
12297         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
12298
12299 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
12300
12301         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
12302
12303 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
12304
12305         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
12306         a MarshalByRef type, inline a method that performs the check, taking into
12307         account that the object can be a proxy. Also implemented tow new opcodes:
12308         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
12309         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
12310         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
12311
12312 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
12313
12314         * mini-ppc.c: if a relative branch displacement is too big
12315         but it points to and area reachable with an absolute branch, 
12316         avoid the thunks.
12317
12318 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
12319
12320         * mini.c: optimize small copies in cpblk.
12321
12322 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
12323
12324         * basic-calls.cs basic-float.cs: New regression tests.
12325
12326         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
12327         negative offsets from %fp. Implement localloc. Fix local register 
12328         allocation. Fix the case when the this argument needs to be saved to
12329         the stack. Implement some missing opcodes.
12330
12331 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
12332
12333         * mini.c (mini_method_compile): Reenable global regalloc in methods
12334         with exception handlers.
12335
12336         * linear-scan.c (mono_varlist_sort): Fix warning.
12337
12338         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
12339
12340         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
12341         regalloc costs.
12342
12343         * liveness.c: Make all variables uses in exception clauses volatile, to
12344         prevent them from being allocated to registers. Fixes #42136.
12345
12346 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
12347
12348         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
12349         causes regressions.
12350
12351         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
12352         argument to mono_arch_regalloc_cost.
12353
12354         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
12355         precisely.
12356
12357 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
12358
12359         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
12360         Make the cost of allocating a variable to a register arch dependent.
12361
12362         * basic-calls.cs: Fix compilation of tests.
12363         
12364         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
12365         helper function to cut back on the number of #ifdefs needed.
12366
12367         * mini-ppc.c: Fix compilation.
12368
12369         * basic-calls.cs: New regression tests.
12370
12371         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
12372
12373         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
12374         of l0 since that is callee saved.
12375
12376         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
12377         to virtual calls.
12378
12379         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
12380         of delay instruction.
12381
12382         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
12383
12384         * mini.h (MonoCallInst): Add 'virtual' flag.
12385
12386         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
12387
12388 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
12389
12390         * *.cs: New regression tests.
12391
12392         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
12393         work.
12394
12395         * mini.c (mono_runtime_install_handlers): Fix build.
12396
12397         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
12398         'signal_stack_size' members.
12399
12400         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
12401         alternate signal stack.
12402
12403         * exceptions-x86.c: Add stack overflow handling.
12404
12405         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
12406         functions to arch independent code.
12407
12408         * mini.c (mono_print_tree): Print more detailed info for load_membase
12409         opcodes.
12410         
12411 2004-02-23  Martin Baulig  <martin@ximian.com>
12412
12413         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
12414
12415 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
12416
12417         * mini-x86.c: fixed reg allocation for div/rem.
12418
12419 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
12420
12421         * driver.c (mono_main): Report some configuratio options on --version.
12422
12423 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
12424
12425         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
12426         low in the address space. Correctly flush memory in thunks where we
12427         output native code.
12428
12429 2004-02-20  Martin Baulig  <martin@ximian.com>
12430
12431         * mini.c (mini_get_method): New static method; inflate all generic
12432         methods and methods in open generic instances.
12433         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
12434         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
12435
12436 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
12437
12438         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
12439
12440         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
12441
12442 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
12443
12444         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
12445
12446         * mini-sparc.c (flushi mono_arch_output_basic_block): make
12447         it compile using Sun's compiler.
12448
12449 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
12450
12451         * 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.
12452
12453         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
12454
12455 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
12456
12457         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
12458         code.
12459         * mini-ppc.c: handle calls outside of the allowed range with thunks
12460         allocated using the code manager.
12461         * tramp-ppc.c: use the code manager to hold generated native code.
12462         Fixed the magic trampoline to just patch vtable entries.
12463
12464 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
12465
12466         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
12467         independent file.
12468
12469 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
12470
12471         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
12472         PPC.
12473
12474         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
12475         if we have a working __thread implementation.
12476
12477         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
12478         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
12479
12480 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
12481
12482         * mini-x86.c: Fix compilation under gcc 2.
12483         
12484 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
12485
12486         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
12487         contains a call to the wrapped function.
12488
12489         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
12490         OP_<CALL>_IMM opcodes, and use them under X86.
12491         
12492         * mini.c (mono_jit_find_compiled_method): Fix warning.
12493
12494         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
12495
12496         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
12497
12498         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
12499         functionality to mini.c.
12500
12501         * mini.c (mono_create_jump_trampoline): New function to create a jump
12502         trampoline. Return a compiled method instead of a trampoline if it
12503         exists. Add a cache for jump trampolines.
12504
12505         * mini.c (mono_jit_find_compiled_method): New function to return a
12506         compiled method if it exists.
12507
12508         * mini-x86.c: Call mono_create_jump_trampoline instead of 
12509         mono_arch_create_jit_trampoline.
12510
12511         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
12512         a jump trampoline. Fixes #52092.
12513         
12514 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
12515
12516         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
12517         which is not up-to-date. Add check_corlib_version () instead.
12518
12519         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
12520         have to call it.
12521         
12522         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
12523         since newer valgrind versions do not need it.
12524
12525         * mini.c (mono_jit_compile_method_with_opt): New helper function to
12526         compile a method with a given set of optimizations.
12527
12528         * mini.c: Compile icall wrappers on-demand instead of at startup.
12529
12530         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
12531         wrapper for an icall.
12532
12533 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
12534
12535         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
12536         #54063.
12537
12538         * iltests.il: Add test for non-empty stack before switch instruction.
12539
12540 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
12541
12542         * mini.c: Add support for new stringbuilder marshalling conventions.
12543
12544         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
12545
12546 2004-02-01  Martin Baulig  <martin@ximian.com>
12547
12548         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
12549         in `ginst->mtype_argv'.
12550
12551 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
12552
12553         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
12554         facilitate grepping.
12555
12556 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
12557
12558         * mini.c: fixed buglet in initobj generic implementation for references.
12559
12560 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
12561
12562         * Makefile.am: make the version script conditional.
12563         * jit-icalls.c: handle missing truncl().
12564
12565 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
12566
12567         * exceptions.cs: Add more tests for double->int conversion.
12568
12569         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
12570         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
12571
12572 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
12573
12574         * driver.c: make --verbose --version emit an error
12575         if the loaded corlib doesn't match the runtime version.
12576
12577 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
12578
12579         * mini-ppc.h: export ppc_patch().
12580         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
12581         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
12582         on par or better than on MacOSX.
12583
12584 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
12585
12586         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
12587         mono_lookup_pinvoke_call.
12588
12589         * mini-x86.c: Under windows, the default pinvoke calling convention is
12590         stdcall. Fixes #52834.
12591
12592         * mini.c (optimize_branches): Add an upper bound to the number of
12593         iterations to prevent infinite loops on strange loops. Fixes #53003.
12594
12595 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
12596
12597         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
12598         and ISINST. Fixes #52093.
12599
12600         * objects.cs (test_0_vector_array_cast): New tests.
12601         
12602 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
12603
12604         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
12605         checking in Array.Set ().
12606
12607         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
12608         #52590.
12609
12610         * object.cs (test_0_multi_array_cast): New regression test.
12611
12612 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
12613
12614         * exceptions-ppc.c: fix build on Linux/PPC.
12615
12616 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
12617
12618         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
12619         running under valgrind.
12620         (x86_magic_trampoline): Fix build bustage.
12621
12622         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
12623         negative values as well. This is needed for the encoding of the line number
12624         info, since sometimes the line numbers are not in increasing order.
12625
12626 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
12627
12628         * cpu-pentium.md (localloc): Increase the size of the localloc 
12629         instruction since it is a loop under Win32.
12630
12631         * debug-mini.c (record_line_number): Get rid of unneccesary memory
12632         allocation.
12633
12634 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
12635
12636         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
12637         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
12638         Max Horn (max@quendi.de). Fix file names in comments.
12639
12640 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
12641
12642         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
12643         avoid stack overflow.
12644         (replace_usage): Avoid uninitialized variable warnings.
12645
12646         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
12647         and taking the address of valuetype variables.
12648
12649 2004-01-03  Patrik Torstensson
12650
12651         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
12652         for other purposes than FP later on.
12653
12654 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
12655
12656         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
12657         of tail calls.
12658
12659 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12660
12661         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
12662
12663 2003-12-30  Patrik Torstensson <p@rxc.se>
12664
12665         * mini-x86.h: Decreased number of availiable fp regs.
12666         Solves corner cases with FP spilling.
12667
12668 2003-12-23  Patrik Torstensson <p@rxc.se>
12669
12670         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
12671         for floating point stack tracking / spilling on x86. 
12672         Fixes bug #49012.
12673         
12674         * basic-float.cs: added float mul overflow test.
12675
12676 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
12677
12678         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
12679
12680 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12681
12682         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
12683         supports for cond branches that overflow the immediate
12684         overflow offset. mcs can compile simple programs.
12685
12686 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
12687
12688         * exceptions-ppc.c: exception handling support wip:
12689         finally handlers get run on exception.
12690
12691 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
12692
12693         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
12694         profiling.
12695
12696 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
12697
12698         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
12699         initial support for stack walking and unwinding.
12700
12701 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
12702
12703         * driver.c (mono_main): Make corlib-out-of-sync message more 
12704         descriptive. Also remove verify_corlib call.
12705
12706 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
12707
12708         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
12709         not overlap with other call's arguments, too.
12710
12711 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
12712
12713         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
12714         move to arch-specific code the choice of arch-specific
12715         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
12716         * mini.c: ensure emulation calls will not interleave
12717         with other calls.
12718
12719 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
12720
12721         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
12722         the magic trampoline stack frame is dropped before executing
12723         the new method.
12724
12725 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
12726
12727         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
12728         and integer to fp conversions. Added support for overflowing
12729         arguments on the stack. Reserve a couple more registers as temps.
12730         Added support for aot compilation (as output still needs to be
12731         tweaked, though).
12732
12733 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12734
12735         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
12736         Don't overwrite return register in some corner cases.
12737
12738 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
12739
12740         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
12741         static constructors when AOT compiling.
12742
12743         * driver.c (mono_main): Call mono_check_corlib_version.
12744
12745 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12746
12747         * cpu-g4.md, basic.cs: fixed div target register.
12748
12749 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
12750
12751         * mini-ppc.c, basic.cs: shl_imm fix with test.
12752
12753 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12754
12755         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
12756         structures by value. Misc fixes.
12757         * objects.cs: more tests.
12758
12759 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
12760
12761         * mini-ppc.c: lconv.ovf.i implemented.
12762
12763 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12764
12765         * mini.c:
12766         (mini_init): don't error out if someone already called g_thread_init.
12767
12768 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
12769
12770         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
12771         to be any type per the spec. Fix abnormal memory usage when
12772         the same object is repeatedly thrown.
12773
12774 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
12775
12776         * mini.c: check for overruns in IL code.
12777
12778 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
12779
12780         * TODO: Add/remove some todo entries.
12781
12782 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
12783
12784         * driver.c (mono_main): Call mono_verify_corlib.
12785
12786 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
12787
12788         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
12789         This has been moved to mini.c
12790         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
12791         type being casted is marshalbyref it could be a proxy, so instead of
12792         emitting the type check code, emit a call to a runtime method that will
12793         perform the check by calling CanCastTo if needed.
12794
12795 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
12796
12797         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
12798         methods with large stack frames under Win32.
12799
12800 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
12801
12802         * Makefile.am: Distribute regression tests.
12803
12804         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
12805         at the end instead of inserting each variable into the sorted list.
12806
12807         * linear-scan.c (mono_varlist_sort): New helper function.
12808         
12809 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
12810
12811         * mini.c: ensure arguments and locals are within bounds.
12812
12813 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
12814
12815         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
12816         related fixes.
12817
12818 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12819
12820         * mini.c (mono_cprop_copy_values): Fix crash.
12821
12822         * aot.c: Set verbosity back to 0.
12823         
12824 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12825
12826         * regalloc.c: complete memory leak fix by Laurent Morichetti
12827         (l_m@pacbell.net).
12828
12829 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
12830
12831         * driver.c (main_thread_handler): Revert the previous patch.
12832
12833         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
12834         under valgrind.
12835
12836         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
12837         memory from the memory pool.
12838
12839         * driver.c (main_thread_handler): Turn on all optimizations when
12840         --aot is used.
12841
12842         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
12843         an array for better performance.
12844
12845         * regalloc.c (mono_regstate_assign): Fix memory leak.
12846
12847         * debug-mini.c (mono_debug_serialize_debug_info): New function to
12848         serialize the debug info.
12849
12850         * debug-mini.c (mono_debug_add_aot_method): New function to load the
12851         debug info from the serialized representation.
12852
12853         * aot.c: Save debug info into the generated file and load it when 
12854         loading a method.
12855
12856         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
12857
12858 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12859
12860         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
12861         More FP-related fixes.
12862
12863 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
12864
12865         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
12866         and register allocation buglet. Hello world now runs.
12867
12868 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
12869
12870         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
12871         * tramp-ppc.c: fixed class init trampoline.
12872         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
12873
12874 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12875
12876         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
12877         mini.c: more ppc changes/fixes.
12878
12879 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12880
12881         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
12882         Also optimize the case when the arguments are the same in the caller 
12883         and in the callee.
12884
12885         * iltests.il: Add tests for tail calls with valuetype arguments.
12886
12887 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12888
12889         * mini-ppc.c: fixes for struct return type.
12890
12891 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
12892
12893         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
12894         mono_spillvar_offset() to arch-specific code.
12895
12896 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
12897
12898         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
12899
12900 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
12901
12902         * exceptions-x86.c: Fix stack space leaks.
12903         
12904         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
12905         registers from the lmf if the method has save_lmf set.
12906
12907 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
12908
12909         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
12910         of icall wrappers into InvokeInDomain, since these are now per-domain.
12911
12912 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
12913
12914         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
12915         make some opcode emulation and intrinsic ops enabled/disabled 
12916         according to the architecture. More fixes.
12917
12918 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
12919
12920         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
12921
12922 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
12923
12924         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
12925         arch-specific handling for 'this' and struct return type to
12926         arch-specific code.
12927
12928 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12929
12930         * aot.c: prevent divide by zero error when reporting (it happened with
12931         Accessibility.dll).
12932
12933 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
12934
12935         * mini.h (inst_switch): Remove unused macro.
12936
12937 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12938
12939         * aot.c:
12940         (load_aot_module): free 'info->methods' and 'info' properly. No more
12941         "free(): invalid pointer blah" messages when you have an old aot
12942         compiled assembly.
12943
12944 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
12945
12946         * jit-icalls.c, mini.c: Added support for context static fields.
12947
12948 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12949
12950         * mini.c (mono_method_blittable): Methods which set LastError are not 
12951         blittable either. Fixes #51108.
12952         
12953 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
12954
12955         * mini.c: flush icache.
12956         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
12957
12958 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
12959
12960         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
12961
12962 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
12963
12964         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
12965         safe on IA32.
12966
12967         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
12968         vararg calls.
12969
12970         * inssel.brg (CEE_MKREFANY): Fix AOT case.
12971
12972 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
12973
12974         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
12975         instruction when the result is discarded.
12976
12977         * iltests.il (test_0_div_regalloc): New regression test.
12978
12979         * arrays.cs: Fix compilation error.
12980
12981 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
12982
12983         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
12984         float rules to inssel-x86.brg: sane architectures with FP registers
12985         don't need to implement these rules.
12986
12987 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
12988
12989         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
12990
12991 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
12992
12993         * mini.h, inssel-long32.brg: fixed endianess issues in int64
12994         implementation of 32 bit systems.
12995
12996 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
12997
12998         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
12999         (Jeroen Zwartepoorte).
13000
13001 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
13002
13003         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
13004         the caller and the callee matches.
13005         
13006         * mini.c (mono_method_to_ir): Add comment.
13007
13008         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
13009         signbit is missing on some platforms.
13010
13011 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
13012
13013         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
13014
13015         * mini.c (setup_jit_tls_data): Call the new function.
13016         
13017         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
13018
13019         * mini-x86.c: Add experimental support for fast access to the lmf
13020         structure under NPTL/Linux 2.6.x.
13021
13022 2003-11-06  Martin Baulig  <martin@ximian.com>
13023
13024         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
13025         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
13026         the debugger.
13027
13028 2003-11-02  Martin Baulig  <martin@ximian.com>
13029
13030         * mini.c (inflate_generic_field): New static method.
13031         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
13032         generic instance and the field is declared in a generic type, call
13033         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
13034
13035 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
13036
13037         * mini.h mini.c (mono_method_same_domain): New function to return
13038         whenever the caller and the callee are in the same domain.
13039
13040         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
13041
13042 2003-10-30  Martin Baulig  <martin@ximian.com>
13043
13044         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
13045         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
13046         method parameters.
13047         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
13048         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
13049
13050 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
13051
13052         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
13053         propagation.
13054
13055         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
13056         object here, so it is in the correct appdomain etc.
13057
13058 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
13059
13060         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
13061         already done.
13062         (mono_method_to_ir): Avoid freeing the type created returned from
13063         mono_type_create_from_typespec, since it is put into an internal cache
13064         by the function. Fixes pointer.exe.
13065
13066         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
13067         trampolines for icalls and pinvokes as well. Fixes #33569.
13068
13069 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
13070
13071         * mini.c: Update after appdomain changes.
13072
13073         * mini.c (mono_jit_compile_method_inner): Allways compile native
13074         method wrappers in the root domain, since there can only be one
13075         instance of them, whose address is stored in method->info.
13076
13077 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
13078
13079         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
13080         environment variable. Instead detect automatically whenever running
13081         under valgrind using the magic macro RUNNING_ON_VALGRIND from
13082         valgrind.h.
13083
13084 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
13085
13086         * trace.c, trace.h: New files that implement the new trace option
13087         parsing. 
13088
13089         * driver.c: Document new --trace options.
13090
13091         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
13092         mini-x86.c: Apply:
13093
13094         -       if (mono_jit_trace_calls)
13095         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
13096
13097         * mini.h: prototypes.
13098         
13099 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
13100
13101         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
13102
13103         * mini.c inssel.brg: Implement typedefbyref opcodes.
13104
13105         * mini.c (mono_jit_compile_method): Remove unused local variable.
13106
13107         * mini.c (mono_jit_compile_method_inner): Ditto.
13108         
13109 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
13110
13111         * tramp-x86.c (x86_class_init_trampoline): Fix build.
13112         
13113         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
13114
13115 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
13116
13117         * mini.c (mono_no_aot): Remove unused global variable.
13118
13119         * mini.c: Thread safety fixes.
13120
13121 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
13122
13123         * mini.c (mono_create_class_init_trampoline): Add a lock around
13124         class_init_hash_addr.
13125
13126         * arrays.cs (test_0_newarr_emulation): Add new regression test for
13127         #30073.
13128
13129         * mini.c: Decompose the NEWARR instruction before decomposing its
13130         arguments. Fixes #30073.
13131
13132 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
13133
13134         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
13135         convention.
13136
13137 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
13138
13139         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
13140
13141         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
13142
13143         * driver.c: Add support for compiling icall wrappers to --compile.
13144
13145 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
13146
13147         * inssel.brg: The empty value in class->interface_offsets is -1, not
13148         0. Fixes #49287.
13149
13150 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
13151
13152         * objects.cs: New test for 'is' operator on an array of interfaces.
13153
13154 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13155
13156         * tramp-ppc.c: update trampoline code to support jumps
13157         and class initialization.
13158
13159 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
13160
13161         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
13162
13163         * inssel.brg (OP_UNBOXCAST): Fix #46027.
13164
13165         * inssel.brg (OP_UNBOX): Remove unused rule.
13166
13167         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
13168         region instead of one for each method. Fixes #47813.
13169
13170 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
13171
13172         * exceptions.cs (test_0_nested_finally): New regression test for
13173         nested exception handlers.
13174
13175         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
13176
13177         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
13178
13179         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
13180         inlining.
13181
13182         * mini.c (mono_method_check_inlining): Make the inlining limit 
13183         configurable by an environment variable.
13184         
13185         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
13186
13187         * mini.h: Bump AOT file version.
13188
13189         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
13190         token, store the image along with the token, since the token might not 
13191         refer to the same image as the method containing the relocation, 
13192         because of inlining.
13193
13194 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
13195
13196         * mini.c (mono_precompile_assemblies): New function to compile
13197         all methods in all loaded assemblies.
13198
13199         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
13200
13201         * regalloc.h regalloc.c (MonoRegState): Change the type of 
13202         iassign and fassign to int*, since they can contain large negative
13203         values if the register is spilled. Also added some comments. Fixes
13204         #45817.
13205
13206         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
13207         under Win32. Fixes #42964.
13208
13209 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
13210
13211         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
13212
13213         * aot.c: Added support for AOT compiling methods which contain calls
13214         to wrappers. Currently, only remoting-invoke-with-check wrappers are
13215         handled.
13216         
13217         * driver.c (compile_all_methods): Run the compilation in a thread
13218         managed by mono. Fixes #44023.
13219
13220         * mini.c (mono_codegen): Print full method name in verbose output.
13221
13222         * mini-x86.c (mono_arch_patch_code): Fix warning.
13223         
13224         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
13225         jumps, since the method we are jumping to might be domain-specific.
13226
13227         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
13228
13229 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13230
13231         * inssel.brg: string chars are unsigned.
13232
13233 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
13234
13235         * TODO: New todo item.
13236
13237         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
13238         which calls mono_runtime_class_init and patches the call site to
13239         avoid further calls.
13240         (mono_arch_create_class_init_trampoline): New arch specific function 
13241         to create a class init trampoline.
13242         (create_trampoline_code): Generalized so it can create
13243         class init trampolines as well.
13244
13245         * mini.c (helper_sig_class_init_trampoline): New helper variable.
13246         (mono_create_class_init_trampoline): New function to create and cache
13247         class init trampolines.
13248         (mono_find_class_init_trampoline_by_addr): New function to lookup the
13249         vtable given the address of a class init trampoline. Used by the
13250         patching process.
13251         (mono_codegen): Generate a call to a trampoline instead of
13252         mono_runtime_class_init in LDSFLD[A].
13253         (mono_codegen): Add relocations for the new trampoline.
13254         
13255         * mini.h mini-x86.c aot.c: Added a new relocation type: 
13256         MONO_PATCH_INFO_CLASS_INIT.
13257
13258         * mini.h: Bump AOT version number.
13259
13260         * aot.c: Create a copy of the loaded code instead of using the original
13261         so methods which call each other will be close in memory, improving
13262         cache behaviour.
13263         
13264         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
13265         patch since it breaks the regression tests.
13266         
13267         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
13268         for the register saving instruction sequence since the 
13269         frame_state_for function in glibc 2.3.2 don't seem to detect it.
13270
13271 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
13272
13273         * TODO: Fix todo item && remove another.
13274
13275 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
13276
13277         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
13278         previous checkin.
13279
13280         * aot.c: Moved the check for MONO_LASTAOT into the initialization
13281         function of the module.
13282
13283         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
13284         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
13285         --no-aot command line option.
13286
13287 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
13288
13289         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
13290         by Bernie Solomon (bernard@ugsolutions.com).
13291
13292         * inssel.brg: Refactor the interface offset table related code into
13293         its separate functions and add support for the AOT case.
13294
13295 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
13296
13297         * aot.c (mono_aot_get_method_inner): Fix memory leak.
13298         
13299         * aot.c: Added mono_aot_verbose variable and made all debugging
13300         output depend on the value of this variable.
13301
13302         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
13303         method_label and info_label.
13304
13305         * mini.h mini-x86.c aot.c: Added a new relocation type 
13306         MONO_PATCH_INFO_IID for klass->interface_id.
13307
13308         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
13309         the MonoJitInfo structure.
13310
13311         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
13312         a non-root appdomain in shared mode.
13313
13314 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13315
13316         * aot.c: make aot loader less verbose. Remove free of unused variable.
13317
13318 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
13319
13320         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
13321
13322         * .cvsignore: Added *.dll.
13323
13324         * mini.c (mono_print_tree_nl): New function callable while debugging.
13325
13326         * mini.c (mono_print_code): Export this.
13327
13328         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
13329         patched code.
13330
13331 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
13332
13333         * mini.h (MonoCompile): Added 'jit_info' field.
13334
13335         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
13336         the cfg structure, since it is needed by the AOT compiler.
13337
13338         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
13339
13340         * aot.c: A major rewrite. Changes include:
13341         - save exception tables for methods which have them.
13342         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
13343         to g_module_symbol.
13344         - reworked the file format so it is now much smaller and needs
13345         fewer relocation entries.
13346         
13347 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
13348
13349         * aot.c (load_aot_module): Fix build bustage on platforms without
13350         Boehm GC.
13351
13352 2003-09-04  Martin Baulig  <martin@ximian.com>
13353
13354         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
13355
13356 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
13357
13358         * TODO: Some new optimization ideas.
13359
13360         * aot.c: Move AOT module loading logic here from mono_assembly_open.
13361
13362         * aot.c: Save the optimization flags used to compile the code into
13363         the AOT module.
13364
13365         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
13366         support emitting domain specific code.
13367         
13368         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
13369         no longer domain neutral. It can be made domain neutral by compiling 
13370         with --optimize=shared.
13371
13372         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
13373         between appdomains.
13374
13375         * driver.c mini.h mini.c: New --no-aot debugging option which disables
13376         loading of AOT code.
13377
13378         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
13379         
13380         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
13381         if there is no domain neutrality information.
13382
13383 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
13384
13385         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
13386         format version into the generated library.
13387
13388         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
13389         callee method into the caller since one of them could be shared.
13390
13391         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
13392         system exceptions from AOT code now works.
13393
13394         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
13395         method if it is domain neutral and the callee is not.
13396
13397         * graph.c (cfg_emit_one_loop_level): Fix warning.
13398
13399 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
13400
13401         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
13402         last checkin.
13403
13404 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
13405
13406         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
13407         is needed  by code which is executed before mono_runtime_init ().
13408         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
13409         
13410         * mini.c (mono_thread_abort): Fix warning.
13411         (mono_jit_compile_method): Call static constructor in the AOT case too.
13412
13413         * aot.c (mono_compile_assembly): Fix warning.
13414
13415 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13416
13417         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
13418
13419 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
13420
13421         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
13422
13423         * cpu-pentium.md: Fix the length of call opcodes so they include the
13424         ESP restoring instruction. Fixes #47968.
13425
13426 2003-08-28  Martin Baulig  <martin@ximian.com>
13427
13428         * mini-x86.c (mono_arch_call_opcode): Added support for
13429         MONO_TYPE_GENERICINST.
13430
13431         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
13432
13433 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
13434
13435         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
13436         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
13437
13438         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
13439         metadata_section.
13440
13441 2003-08-26  Martin Baulig  <martin@ximian.com>
13442
13443         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
13444         when reporting an error, set this to the actual error location.
13445         (mono_method_to_ir): Report the correct error location if
13446         get_basic_blocks() returned an error.
13447
13448 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
13449
13450         * mini.c (mono_type_blittable): OBJECT is not blittable.
13451         (mono_method_blittable): Methods which have marshalling descriptors
13452         are not blittable either. Fixes #47842.
13453
13454 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
13455
13456         * driver.c mini.c: Use an environment variable instead of a global 
13457         variable. Also fix the build.
13458
13459         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
13460         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
13461         reporting this. 
13462
13463         * driver.c mini.c: Added --with-valgrind option to turn off some
13464         code which prevents mono from running under valgrind.
13465
13466         * mini.c (mono_emit_call_args): Fixed warning.
13467
13468         * mini.c (mono_emulate_opcode): Fixed warning.
13469
13470 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13471
13472         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
13473         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
13474         regalloc.c, regalloc.h: specify available registers in arch-specific
13475         code and support floats in the regallocator (patch by Laurent Morichetti 
13476         <l_m@pacbell.net>)
13477
13478 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13479
13480         * mini.c: mono_thread_current() can be called only after
13481         mono_runtime_init(): rearrange code to not call it early on.
13482
13483 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13484
13485         * mini.c: allocate jump tables in the code mempools.
13486
13487 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13488
13489         * mini.c, mini.h: make sure per-thread data allocated by the jit is
13490         freed.
13491
13492 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
13493
13494         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
13495         12 to 16.  This fixes bug #47453.
13496
13497
13498 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13499
13500         * mini-ppc.c: fixed indexed load and unsigned compares.
13501
13502 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
13503
13504         * mini.c: reenabled installation of handler for
13505           thread abort signal.
13506
13507 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13508
13509         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
13510         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
13511         until it's fixed and actually useful.
13512
13513 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13514
13515         * inssel-long32.brg: couple more opcodes implemented.
13516
13517 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
13518         
13519         * mini-sparc.c: Even more opcodes implemeted.
13520
13521 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
13522
13523         * mini-sparc.c: More opcodes implemented.
13524
13525 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
13526
13527         * mini-sparc.c: More opcodes implemented.
13528
13529 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
13530
13531         * inssel-sparc.brg: Add some needed rules.  Direct
13532         copy from PPC.
13533         * Makefile.am: Use inssel-sparc.brg
13534         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
13535         an assert happy for now.
13536
13537 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
13538
13539         * mini-sparc.c: Fixed compile errors.
13540         * exceptions-sparc.c: Same.  We now produce a mono binary 
13541         on sparc-linux.  Yea.
13542
13543 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
13544
13545         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
13546         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
13547         They compile, but do not work.
13548
13549 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13550
13551         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
13552         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
13553         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
13554         (ct@gentoo.org).
13555
13556 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13557
13558         * mini.c: more opcodes implemented and better support for generics.
13559
13560 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
13561
13562         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
13563         * mini.c, mini.h: first cut at generics support: some new instructions 
13564         added and changed the behaviour of some of the existing ones.
13565
13566 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
13567
13568         * mini.c: Removed definition of metadata_shared mutex here.
13569
13570 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
13571
13572         * mini-x86.c: make vararg calls work for instance methods.
13573
13574 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13575
13576         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
13577         returns the arguments in a separte list, now.
13578
13579 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13580
13581         * aot.c, mini.c: updates for array type representation changes.
13582
13583 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
13584
13585         * mini.c: register function to perform jit shutdown.
13586
13587 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13588
13589         * mini.c: use a faster allocator if possible.
13590
13591 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13592
13593         * aot.c: some cleanups and portability changes.
13594
13595 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13596
13597         * mini.c: use faster allocation for CEE_BOX if possible.
13598
13599 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13600
13601         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
13602         Moved inlined mempcy code to its own function so that is can be
13603         reused. Added an inline memset function as well (optimized initobj).
13604         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
13605
13606 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13607
13608         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
13609
13610 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13611
13612         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
13613         arch code can setup the cpu for CLR execution, if needed.
13614         We use it on x86 to set the precision of FP operations.
13615
13616 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13617
13618         * mini.c: disable some optimizations if we can guess they'll cost too
13619         much for a given method.
13620
13621 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13622
13623         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
13624         
13625 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
13626         * mini.h mini.c mini-x86.c: Added instruction level coverage 
13627         info collection support.
13628
13629 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13630
13631         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
13632         is now implemented in the profiling API. Get rid of a couple of
13633         unnecessary global variables.
13634
13635 2003-06-15  Nick Drochak <ndrochak@gol.com>
13636
13637         * basic-long.cs: tests for negative values for bigmul, and unsigned.
13638         * cpu-g4.md: add op_bigmul and op_bigmul_un
13639         * cpu_pentium.md: add op_bigmul_un
13640         * inssel-long32.brg: add rule for unsigned bigmul
13641         * mini-ops.h: define OP_BIGMUL_UN
13642         * mini-x86.c: THE BUG: handle (un)signed properly
13643         * mini.c: choose unsigned opcode if needed.
13644         This set of patches fixes bug #44291
13645
13646 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
13647
13648         * mini.c (optimize_branches): improved to handle all kinds of
13649         conditional branches.
13650
13651 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13652
13653         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
13654         don't raise exceptions.
13655
13656 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13657
13658         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
13659         to arch-specific files.
13660
13661 2003-06-09  Martin Baulig  <martin@ximian.com>
13662
13663         * Makefile.am (libs): Added $(LIBGC_LIBS).
13664
13665 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
13666
13667         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
13668         and OP_ATAN (fixes bug#44293).
13669
13670 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
13671
13672         * Makefile.am, mini-x86.c: rename cpu description array to
13673         pentium_desc, since some compilers define the 'pentium' preprocessor
13674         symbol.
13675
13676 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
13677
13678         * mini.c (mini_select_instructions): add explicit branch if the
13679         following block is not the false target of a conditional branch -
13680         we need this with any optimization that reorder or remove bblocks
13681
13682         * mini.c (optimize_branches): bug fixes
13683
13684 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
13685
13686         * mini.c (mono_method_to_ir): inline static readonly fields
13687
13688         * ssa.c (fold_tree): start cfold support for long (very simple
13689         cases only)
13690
13691         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
13692
13693 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13694
13695         * inssel.brg: fixed memcpy (bug #44219).
13696
13697 2003-06-05  Dick Porter  <dick@ximian.com>
13698
13699         * driver.c: Set the glib log levels to not abort if g_message
13700         recurses.
13701
13702         g_set_prgname() has to happen before mini_init() so that the
13703         process handle gets the info.
13704         
13705 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13706
13707         * driver.c: add intrins to the default optimizations to get wider
13708         exposure.
13709
13710 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13711
13712         * mini.h: some large basic blocks will overflow a 16-bit
13713         integers for symbolic registers.
13714
13715 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13716
13717         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
13718         (mono_arch_output_basic_block): fix bug 43499 
13719
13720 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13721
13722         * mini.c: kill duplicated definition of mono_debug_format.
13723
13724 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13725
13726         * mini-x86.c, arrays.cs: fixed register allocation bug.
13727
13728 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
13729
13730         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
13731
13732         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
13733
13734 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13735
13736         * mini.c:
13737         (print_method_from_ip): also print source location information if
13738         available.
13739
13740 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
13741
13742         * mini.c (mono_find_block_region): bug fix in region code
13743         (mini_method_compile): enable removing unreachable code again, but
13744         only in methods without exception clauses.
13745
13746 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
13747
13748         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
13749         Implemented arglist opcode and handling of TypedReference type.
13750         Fixed x86 call convention when a structure is returned.
13751         Minimal support for calling static vararg methods.
13752
13753 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
13754
13755         * mini.c (mini_method_compile):  always remove unreachable code,
13756         because the code in them may be inconsistent  (access to dead
13757         variables for example).
13758
13759 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13760
13761         * driver.c, debug-mini.c: warning fixes.
13762
13763 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13764
13765         * Makefile.am, jit.h, mini.h: install header for embedding mono.
13766
13767 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
13768
13769         * mini.c: thread-static fields are registered in mono_class_vtable(),
13770         so ensure the function is called before checking for them.
13771
13772 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
13773
13774         * mini.c (optimize_branches): fix for bug 43586
13775
13776         * jit-icalls.c (mono_llmult_ovf): added an additional check for
13777         overflow (fixes Bug #43639)
13778
13779 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13780
13781         * mini.c, objects.cs: allow the use of stobj for primitive types.
13782
13783 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13784
13785         * mini.c: be less strict about argument checking until we support
13786         running the verifier.
13787
13788 2003-05-27  Nick Drochak <ndrochak@gol.com>
13789
13790         * basic-long.cs: tests for (ulong)int * (ulong)int also
13791         * mini.c: use the same trick for (ulong)int * (ulong)int
13792
13793 2003-05-27  Nick Drochak <ndrochak@gol.com>
13794
13795         * basic-long.cs: add regression test for (long)int * (long)int
13796         * cpu-pentium.md: add op_bigmul specification
13797         * inssel-long32.brg: add OP_BIGMUL rule
13798         * mini-ops.h: add OP_BIGMUL
13799         * mini-x86.c: register allocator: handle case where src1 needs to be
13800         in EAX.
13801         * mini.c: substitute special BIGMUL opcode in the tree for 
13802         (long)int * (long)int
13803
13804 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13805
13806         * jit-icalls.c: call the type ctor on field access if needed.
13807
13808 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13809
13810         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
13811         to a method (including results of ldelema, bug#43207).
13812
13813 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
13814
13815         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
13816         colors to show exception handler blocks.
13817
13818         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
13819         (fix for pinvoke7.cs).
13820
13821 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13822
13823         * mini.h, mini.c: ensure correct initialization order for types that
13824         require it. Prepare for lazy compilation of jit icall wrappers.
13825         Provide a name for opcode emulation to reduce unneeded mallocing.
13826
13827 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13828
13829         * mini-x86.c: better register restoring code and profiling
13830         support for tail calls.
13831
13832 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13833
13834         * mini.h, driver.c: prepare for leaf methods optimization.
13835
13836 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13837
13838         * mini.c: get targets of branches before converting a method.
13839
13840 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
13841
13842         * mini.c (optimize_branches): added some experimental code (disbaled) 
13843
13844 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
13845
13846         * mini.c (optimize_branches): fix branch to branch optimization 
13847
13848         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
13849
13850         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
13851
13852         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
13853
13854         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
13855         if needed.
13856
13857 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
13858
13859         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
13860         enable use of interface variables again.
13861
13862         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
13863         I1 to registers because there is no simply way to sign extend 8bit
13864         quantities in caller saved registers on x86.
13865
13866         * inssel-float.brg: set costs of some rules to 2 so
13867         that monobure always select the arch. specific ones if supplied,
13868         regardless of the order we pass the files to monoburg.
13869
13870 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13871
13872         * mini.c, mini-x86.c: since the magic trampoline for jumps
13873         can't patch the code directly, we do it as soon as the
13874         method gets compiled.
13875
13876 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13877
13878         * mini-x86.c, mini.h: introduce a new patching method
13879         to support CEE_JMP and tail calls.
13880         * mini.c: obey tail.call. Don't precompile methods target
13881         of CEE_JMP.
13882         * tramp-x86.c: new trampoline code to handle methods
13883         reached through a jump.
13884
13885 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
13886
13887         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
13888         bit values to registers
13889
13890 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
13891
13892         * mini.c (mono_compile_get_interface_var): share interface
13893         variables if possible.
13894
13895 2003-05-16  Martin Baulig  <martin@ximian.com>
13896
13897         * debug-mini.c (mono_init_debugger): New function to initialize
13898         the debugger.  This is not in the debugger since it needs to
13899         access some of mini's internals.
13900
13901 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13902
13903         * mini.c (mono_method_to_ir): inlining fixes/cleanups
13904
13905 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
13906
13907         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
13908         for value type handling.
13909
13910 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
13911
13912         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
13913         (mono_method_check_inlining): enable inlining of all kinds of wrappers
13914
13915 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
13916
13917         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
13918           the constructor through a proxy.
13919
13920 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13921
13922         * jit-icalls.c, inssel.brg: fixes to array element address
13923         calculations.
13924
13925 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
13926
13927         * mini-x86.c (is_regsize_var): allocate pointer to registers
13928
13929 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13930
13931         * driver.c: fixed typo, added intrins to the set of optimizations
13932         tested with regressions.
13933
13934 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13935
13936         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
13937         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
13938         test case.
13939
13940 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
13941
13942         * inssel.brg: remove some common pop instructions without side effects
13943
13944 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13945
13946         * inssel-x86.brg: fixed thinko in int to double conversions.
13947
13948 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13949
13950         * mini.c, jit-icalls.c: added runtime thread-static variable support.
13951
13952 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13953
13954         * inssel-long32.brg: two more missing instructions.
13955
13956 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
13957
13958         * mini.c (mono_emit_call_args): set the cil_code for all arguments
13959         if not already set.
13960
13961 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
13962
13963         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
13964         correctly.
13965
13966         * basic-float.cs: Added tests for negative zero.
13967
13968 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13969
13970         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
13971         a couple of missing operations for long casts, with test cases.
13972
13973 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13974
13975         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
13976
13977 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
13978
13979         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
13980         code size estimation.
13981
13982 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
13983
13984         * mini.c (mono_jit_create_remoting_trampoline): make it work with
13985         abstract methods (fix bug 42542)
13986
13987         * aot.c: add ability to handle array types
13988         
13989 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
13990
13991         * mini.c: Call the _specific versions of the object allocation
13992         functions if possible.
13993
13994 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13995
13996         * driver.c: call setlocale ().
13997
13998 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13999
14000         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
14001         windows build.
14002
14003 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
14004
14005         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
14006
14007         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
14008         wrappers (fix bug 42122)
14009
14010 2003-05-04  Martin Baulig  <martin@ximian.com>
14011
14012         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
14013
14014         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
14015         s/mini_set_defaults/mono_set_defaults/g.
14016
14017 2003-05-04  Martin Baulig  <martin@ximian.com>
14018
14019         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
14020
14021 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14022
14023         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
14024         (reported by Don Roberts).
14025
14026 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
14027
14028         * mini.c: temporarily work around two bugs for this release.
14029
14030 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14031
14032         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
14033         that contains -export-dynamic and it makes using the ld script
14034         useless.
14035         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
14036
14037 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14038
14039         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
14040         specific cpu.
14041
14042 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14043
14044         * mini.c: make sure leave calls all the needed finally blocks,
14045         even when the target jumps out of multiple exception clauses.
14046
14047 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14048
14049         * ldscript, Makefile.am: add linker script to reduce the number of
14050         exported symbols (should also fix the issues with libwine defining
14051         some of the same symbols in io-layer).
14052
14053 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
14054
14055         * driver.c (mini_main): Avoid assertion when no file name is given on 
14056         the command line.
14057
14058 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
14059
14060         * driver.c: added --version/-V command line option.
14061         Added the inline optimization in the regression tests.
14062
14063 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14064
14065         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
14066         to the type in the method signature (fixes bug#42134).
14067
14068 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
14069
14070         * mini.c: when inlining, check this is not null only when needed (bug #42135).
14071
14072 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
14073
14074         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
14075
14076 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14077
14078         * driver.c: fixed bug #42100.
14079
14080 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
14081
14082         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
14083
14084 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
14085
14086         * mini.c: moved most of the code required to do inlining to its own
14087         function so it can be reused. Inline also ctors if appropriate.
14088
14089 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
14090
14091         * Makefile.am: Link with -export-dynamic so shared libs loaded by
14092         the runtime can call mono API functions.
14093
14094 2003-04-27  Martin Baulig  <martin@ximian.com>
14095
14096         * debug-mini.c (mono_debug_init_method): Added
14097         `guint32 breakpoint_id' argument; if the method has a breakpoint,
14098         send a notification to the debugger.
14099
14100         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
14101         running in the Mono Debugger, just pass the breakpoint number to
14102         mono_debug_init_method().
14103
14104         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
14105
14106 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
14107
14108         * mini.c: allow some more unsafe compares.
14109
14110 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14111
14112         * mini-x86.c, Makefile.am: make distcheck works (partially from
14113         a patch by Richard Lee <r.h.lee@attbi.com>).
14114         * regset.c, regset.h: removed, they are unused.
14115
14116 2003-04-25  Dick Porter  <dick@ximian.com>
14117
14118         * driver.c: Usage reports the name as 'mono' not 'mini'
14119         * exceptions-x86.c: Build and run on freebsd
14120
14121 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
14122
14123         * Makefile.am: install the program with the 'mono' name and
14124         the library as libmono instead of mini and libmini.
14125
14126 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14127
14128         * driver.c: provide the APIs for the embedding interface of the old jit.
14129
14130 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
14131
14132         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
14133
14134 2003-04-23  Martin Baulig  <martin@ximian.com>
14135
14136         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
14137
14138         * driver.c: Added `--debug' command line argument to enable
14139         debugging support.
14140
14141 2003-04-23  Martin Baulig  <martin@ximian.com>
14142
14143         * debug.[ch]: Removed.  The code is now in
14144         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
14145
14146         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
14147         last six months.
14148
14149 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
14150
14151         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
14152
14153 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14154
14155         * mini.c:
14156         (mini_cleanup): moved mono_runtime_cleanup call after the call to
14157         mono_domain_finalize.
14158         (mini_method_compile): use mono_method_profile* if the the option is
14159         enabled.
14160
14161 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
14162
14163         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
14164         methods with their wrapper.
14165
14166         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
14167         methods with their wrapper.
14168
14169         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
14170         their wrapper.
14171
14172         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
14173         wrapper.
14174
14175         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
14176         methods.
14177
14178 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
14179
14180         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
14181
14182 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
14183
14184         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
14185         of the mempool. This is slightly faster and uses less memory
14186
14187 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14188
14189         * mini.c: avoid O(n) allocation for variables.
14190
14191 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14192
14193         * mini.c: handle items on the stack after inlining methods.
14194
14195 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14196
14197         * mini.c: make the method->opcode optimization dependent
14198         on MONO_OPT_INSTRINS and do it lazily.
14199
14200 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14201
14202         * driver.c: print overall results at the end of regression run.
14203
14204 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
14205
14206         * inssel.brg: don't overwrite symbolic registers.
14207
14208 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
14209
14210         * inssel-x86.brg: fix conversion from long to float.
14211
14212 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
14213
14214         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
14215
14216 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
14217
14218         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
14219
14220         * driver.c: Added --print-vtable option as in the old JIT.
14221
14222 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14223
14224         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
14225
14226 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
14227
14228         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
14229
14230 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
14231
14232         * mini.c regalloc.c regalloc.h: Fix memory leak.
14233
14234 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
14235
14236         * aot.c (mono_aot_get_method): register all used strings
14237
14238 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14239
14240         * mini.c: always intern strings references with ldstr at compile time.
14241
14242 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14243
14244         * Makefile.am: add BUILT_SOURCES.
14245
14246 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
14247
14248         * driver.c: give a better error message when the assembly to execute
14249         doesn't have an entry point.
14250
14251 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
14252
14253         * Makefile.am: added hack for automake
14254
14255         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
14256         correct sematics.
14257
14258         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
14259
14260 22003-04-07  Martin Baulig  <martin@ximian.com>
14261
14262         * Makefile.am: Added Makefile.am.
14263
14264         * debugger-main.c: Removed, this is now in the debugger where it
14265         belongs.
14266
14267         * mini.pc.in: Call this package `mini' for the moment.
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279